Skip to content

Commit

Permalink
Set all LEDs to white while updating, bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
ImTheSquid committed Oct 12, 2024
1 parent ff6fd24 commit 460a270
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sign-firmware"
version = "0.1.0"
version = "0.1.1"
authors = ["Jack Hogan <jackhogan11@gmail.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down
12 changes: 12 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use esp_idf_svc::{
use http::Request;
use lightning_time::LightningTime;
use log::info;
use palette::rgb::Rgb;
use sign_firmware::{Block, EspTlsSocket, Leds};
use std::net::TcpStream;
use url::Url;
Expand Down Expand Up @@ -330,6 +331,17 @@ async fn amain(mut leds: Leds, mut wifi: AsyncWifi<EspWifi<'static>>) {
.await
.expect("wifi connection");

// Set all LEDs to white while checking for update
for block in [
Block::Top,
Block::Center,
Block::BottomLeft,
Block::Right,
Block::BottomRight,
] {
leds.set_color(Rgb::new(255, 255, 255), block).await;
}

// Check for update
self_update().await.expect("Self-update to work");

Expand Down

0 comments on commit 460a270

Please sign in to comment.