From 331e21b00a83e40222c6ab8e053f25106d100183 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Wed, 17 Mar 2021 14:47:14 +0100 Subject: [PATCH] Updating dependencies --- Cargo.lock | 2 +- src/bin/dual-iir.rs | 2 +- src/bin/lockin-external.rs | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 42d6914..b1fc810 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -707,7 +707,7 @@ dependencies = [ [[package]] name = "smoltcp-nal" 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 = [ "embedded-nal", "heapless 0.6.1", diff --git a/src/bin/dual-iir.rs b/src/bin/dual-iir.rs index 34b852a..4a27d48 100644 --- a/src/bin/dual-iir.rs +++ b/src/bin/dual-iir.rs @@ -148,7 +148,7 @@ const APP: () = { Ok(updated) => !updated, Err(err) => { log::info!("Network error: {:?}", err); - true + false } } }); diff --git a/src/bin/lockin-external.rs b/src/bin/lockin-external.rs index 8635dc9..cd03202 100644 --- a/src/bin/lockin-external.rs +++ b/src/bin/lockin-external.rs @@ -217,13 +217,22 @@ const APP: () = { } }); - if c.resources + match c + .resources .mqtt_interface - .lock(|interface| interface.update().unwrap()) + .lock(|interface| interface.update()) { - c.spawn.settings_update().unwrap() - } else if sleep { - cortex_m::asm::wfi(); + Ok(update) => { + if update { + c.spawn.settings_update().unwrap(); + } else if sleep { + cortex_m::asm::wfi(); + } + } + Err(miniconf::MqttError::Network( + smoltcp_nal::NetworkError::NoIpAddress, + )) => {} + Err(error) => log::info!("Unexpected error: {:?}", error), } } }