binaries: move MQTT_ADDRESS to design_parameters
until some better design with DHCP and/or (m)DNS is implemented
This commit is contained in:
parent
baa2d0cdd5
commit
e2b54d0e53
|
@ -6,10 +6,7 @@ use stm32h7xx_hal as hal;
|
|||
|
||||
use stabilizer::hardware;
|
||||
|
||||
use miniconf::{
|
||||
embedded_nal::{IpAddr, Ipv4Addr},
|
||||
minimq, Miniconf, MqttInterface,
|
||||
};
|
||||
use miniconf::{minimq, Miniconf, MqttInterface};
|
||||
use serde::Deserialize;
|
||||
|
||||
use dsp::iir;
|
||||
|
@ -62,9 +59,12 @@ const APP: () = {
|
|||
|
||||
let mqtt_interface = {
|
||||
let mqtt_client = {
|
||||
let broker = IpAddr::V4(Ipv4Addr::new(10, 34, 16, 10));
|
||||
minimq::MqttClient::new(broker, "", stabilizer.net.stack)
|
||||
.unwrap()
|
||||
minimq::MqttClient::new(
|
||||
hardware::design_parameters::MQTT_BROKER.into(),
|
||||
"",
|
||||
stabilizer.net.stack,
|
||||
)
|
||||
.unwrap()
|
||||
};
|
||||
|
||||
MqttInterface::new(
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
|
||||
use generic_array::typenum::U4;
|
||||
|
||||
use miniconf::{
|
||||
embedded_nal::{IpAddr, Ipv4Addr},
|
||||
minimq, Miniconf, MqttInterface,
|
||||
};
|
||||
use miniconf::{minimq, Miniconf, MqttInterface};
|
||||
use serde::Deserialize;
|
||||
|
||||
use dsp::{Accu, Complex, ComplexExt, Lockin, RPLL};
|
||||
|
@ -77,11 +74,12 @@ const APP: () = {
|
|||
let (mut stabilizer, _pounder) = setup(c.core, c.device);
|
||||
|
||||
let mqtt_interface = {
|
||||
let mqtt_client = {
|
||||
let broker = IpAddr::V4(Ipv4Addr::new(10, 34, 16, 10));
|
||||
minimq::MqttClient::new(broker, "", stabilizer.net.stack)
|
||||
.unwrap()
|
||||
};
|
||||
let mqtt_client = minimq::MqttClient::new(
|
||||
design_parameters::MQTT_BROKER.into(),
|
||||
"",
|
||||
stabilizer.net.stack,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
MqttInterface::new(
|
||||
mqtt_client,
|
||||
|
|
|
@ -49,3 +49,6 @@ pub const ADC_SAMPLE_TICKS: u16 = 1 << ADC_SAMPLE_TICKS_LOG2;
|
|||
// The desired ADC sample processing buffer size.
|
||||
pub const SAMPLE_BUFFER_SIZE_LOG2: u8 = 3;
|
||||
pub const SAMPLE_BUFFER_SIZE: usize = 1 << SAMPLE_BUFFER_SIZE_LOG2;
|
||||
|
||||
// The MQTT broker IPv4 address
|
||||
pub const MQTT_BROKER: [u8; 4] = [10, 34, 16, 10];
|
||||
|
|
Loading…
Reference in New Issue