refactor: rename deep_sleep to deep_sleep_ms for consistency across the codebase

This commit is contained in:
2026-04-30 20:09:48 +02:00
parent e0b8acd55c
commit 9280bbb244
3 changed files with 5 additions and 5 deletions

View File

@@ -149,7 +149,7 @@ pub trait BoardInteraction<'a> {
async fn get_time(&mut self) -> DateTime<Utc>; async fn get_time(&mut self) -> DateTime<Utc>;
async fn set_time(&mut self, time: &DateTime<FixedOffset>) -> FatResult<()>; async fn set_time(&mut self, time: &DateTime<FixedOffset>) -> FatResult<()>;
async fn set_charge_indicator(&mut self, charging: bool) -> Result<(), FatError>; async fn set_charge_indicator(&mut self, charging: bool) -> Result<(), FatError>;
async fn deep_sleep(&mut self, duration_in_ms: u64) -> !; async fn deep_sleep_ms(&mut self, duration_in_ms: u64) -> !;
fn is_day(&self) -> bool; fn is_day(&self) -> bool;
//should be multsampled //should be multsampled

View File

@@ -320,7 +320,7 @@ impl<'a> BoardInteraction<'a> for V4<'a> {
self.charger.set_charge_indicator(charging) self.charger.set_charge_indicator(charging)
} }
async fn deep_sleep(&mut self, duration_in_ms: u64) -> ! { async fn deep_sleep_ms(&mut self, duration_in_ms: u64) -> ! {
self.awake.set_low(); self.awake.set_low();
self.charger.power_save(); self.charger.power_save();
self.esp.deep_sleep(duration_in_ms); self.esp.deep_sleep(duration_in_ms);

View File

@@ -692,7 +692,7 @@ async fn safe_main(spawner: Spawner) -> FatResult<()> {
board.board_hal.get_esp().set_restart_to_conf(false); board.board_hal.get_esp().set_restart_to_conf(false);
board board
.board_hal .board_hal
.deep_sleep(1000 * 1000 * 60 * deep_sleep_duration_minutes as u64) .deep_sleep_ms(1000 * 60 * deep_sleep_duration_minutes as u64)
.await; .await;
} }
} }
@@ -1122,7 +1122,7 @@ async fn wait_infinity(
board.board_hal.get_esp().set_restart_to_conf(false); board.board_hal.get_esp().set_restart_to_conf(false);
// ensure clean http answer / visible confirmation // ensure clean http answer / visible confirmation
Timer::after_millis(500).await; Timer::after_millis(500).await;
board.board_hal.deep_sleep(0).await; board.board_hal.deep_sleep_ms(0).await;
} }
// Short tick while holding so the pattern updates smoothly. // Short tick while holding so the pattern updates smoothly.
@@ -1231,7 +1231,7 @@ async fn wait_infinity(
.lock() .lock()
.await .await
.board_hal .board_hal
.deep_sleep(0) .deep_sleep_ms(0)
.await; .await;
} }
} }