From a1ad9b2456c3dda178173f67822147a3db22ed81 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 24 Sep 2020 23:08:42 +0200 Subject: [PATCH] main: load config from eeprom on boot --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 20eee14..0eb93f2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -124,6 +124,9 @@ fn main() -> ! { usb::State::setup(usb); let mut channels = Channels::new(pins); + let _ = Config::load(&mut eeprom) + .map(|config| config.apply(&mut channels)) + .map_err(|e| warn!("error loading config: {:?}", e)); // EEPROM ships with a read-only EUI-48 identifier let mut eui48 = [0; 6];