main: fix cfg warn

This commit is contained in:
occheung 2020-09-25 17:06:33 +08:00
parent e35c573a09
commit 6280e092e3
1 changed files with 1 additions and 7 deletions

View File

@ -1,6 +1,5 @@
#![no_main] #![no_main]
#![no_std] #![no_std]
#![feature(str_strip)]
#![feature(core_intrinsics)] #![feature(core_intrinsics)]
use log::{ trace }; use log::{ trace };
@ -200,7 +199,7 @@ fn main() -> ! {
); );
/* /*
* I/O_Update -> PB15 * I/O_Update -> PB15
*/ */
let io_update = gpiob.pb15.into_push_pull_output(); let io_update = gpiob.pb15.into_push_pull_output();
@ -220,7 +219,6 @@ fn main() -> ! {
); );
urukul.reset().unwrap(); urukul.reset().unwrap();
// info!("Test value: {}", urukul.test().unwrap());
let mut mqtt_mux = MqttMux::new(urukul); let mut mqtt_mux = MqttMux::new(urukul);
@ -238,9 +236,6 @@ fn main() -> ! {
let tcp_stack = NetworkStack::new(&mut net_interface, sockets); let tcp_stack = NetworkStack::new(&mut net_interface, sockets);
// Case dealt: Ethernet connection break down, neither side has timeout
// Limitation: Timeout inequality will cause TCP socket state to desync
// Probably fixed in latest smoltcp commit
let mut client = MqttClient::<consts::U256, _>::new( let mut client = MqttClient::<consts::U256, _>::new(
IpAddr::V4(Ipv4Addr::new(192, 168, 1, 125)), IpAddr::V4(Ipv4Addr::new(192, 168, 1, 125)),
"Urukul", "Urukul",
@ -269,7 +264,6 @@ fn main() -> ! {
// Process MQTT messages about Urukul/Control // Process MQTT messages about Urukul/Control
let connection = client let connection = client
.poll(|_client, topic, message, _properties| { .poll(|_client, topic, message, _properties| {
// info!("On {:?}, received: {:?}", topic, message);
// Why is topic a string while message is a slice? // Why is topic a string while message is a slice?
mqtt_mux.process_mqtt(topic, message).unwrap(); mqtt_mux.process_mqtt(topic, message).unwrap();
}).is_ok(); }).is_ok();