oled: rewrite the oled UI to have animations, and support a version of sleeping where the display is blank, at least
This commit is contained in:
@@ -61,7 +61,7 @@ async fn main(spawner: Spawner) {
|
||||
let timer1 = TimerGroup::new(peripherals.TIMG1);
|
||||
let mut ui_wdt = timer1.wdt;
|
||||
ui_wdt.set_timeout(esp_hal::timer::timg::MwdtStage::Stage0, esp_hal::time::Duration::from_secs(10));
|
||||
ui_wdt.enable(); //FIXME: Re-enable UI watchdog once we have a brain task running
|
||||
ui_wdt.enable();
|
||||
|
||||
let garage = BUS_GARAGE.init(Default::default());
|
||||
|
||||
@@ -104,19 +104,12 @@ async fn main(spawner: Spawner) {
|
||||
use esp_hal::i2c::master::{Config, I2c};
|
||||
|
||||
let mut rst = Output::new(peripherals.GPIO21, esp_hal::gpio::Level::Low, OutputConfig::default());
|
||||
Timer::after_millis(10).await;
|
||||
rst.set_high();
|
||||
Timer::after_millis(10).await;
|
||||
rst.set_low();
|
||||
Timer::after_millis(10).await;
|
||||
rst.set_high();
|
||||
|
||||
let i2c = I2c::new(
|
||||
peripherals.I2C0,
|
||||
Config::default().with_frequency(Rate::from_khz(400))
|
||||
).unwrap().with_scl(peripherals.GPIO18).with_sda(peripherals.GPIO17).into_async();
|
||||
|
||||
spawner.must_spawn(renderbug_embassy::tasks::oled::oled_task(i2c, garage.telemetry.dyn_subscriber().unwrap()));
|
||||
spawner.must_spawn(renderbug_embassy::tasks::oled::oled_task(i2c, rst, garage.telemetry.dyn_subscriber().unwrap()));
|
||||
}
|
||||
|
||||
#[cfg(feature="simulation")]
|
||||
|
||||
Reference in New Issue
Block a user