Updating dependencies

This commit is contained in:
Ryan Summers 2021-03-17 14:47:14 +01:00
parent 8c616cebec
commit 331e21b00a
3 changed files with 16 additions and 7 deletions

2
Cargo.lock generated
View File

@ -707,7 +707,7 @@ dependencies = [
[[package]] [[package]]
name = "smoltcp-nal" name = "smoltcp-nal"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/quartiq/smoltcp-nal.git?branch=feature/dhcp-support#b3de37939140d04a64c79afddb97b81ff49e1f23" source = "git+https://github.com/quartiq/smoltcp-nal.git?branch=feature/dhcp-support#79fd03e3d051402c71116839606e5b3294372c98"
dependencies = [ dependencies = [
"embedded-nal", "embedded-nal",
"heapless 0.6.1", "heapless 0.6.1",

View File

@ -148,7 +148,7 @@ const APP: () = {
Ok(updated) => !updated, Ok(updated) => !updated,
Err(err) => { Err(err) => {
log::info!("Network error: {:?}", err); log::info!("Network error: {:?}", err);
true false
} }
} }
}); });

View File

@ -217,15 +217,24 @@ const APP: () = {
} }
}); });
if c.resources match c
.resources
.mqtt_interface .mqtt_interface
.lock(|interface| interface.update().unwrap()) .lock(|interface| interface.update())
{ {
c.spawn.settings_update().unwrap() Ok(update) => {
if update {
c.spawn.settings_update().unwrap();
} else if sleep { } else if sleep {
cortex_m::asm::wfi(); cortex_m::asm::wfi();
} }
} }
Err(miniconf::MqttError::Network(
smoltcp_nal::NetworkError::NoIpAddress,
)) => {}
Err(error) => log::info!("Unexpected error: {:?}", error),
}
}
} }
#[task(priority = 1, resources=[mqtt_interface, settings, afes])] #[task(priority = 1, resources=[mqtt_interface, settings, afes])]