refactor: rename deep_sleep to deep_sleep_ms for consistency across the codebase
This commit is contained in:
@@ -149,7 +149,7 @@ pub trait BoardInteraction<'a> {
|
||||
async fn get_time(&mut self) -> DateTime<Utc>;
|
||||
async fn set_time(&mut self, time: &DateTime<FixedOffset>) -> FatResult<()>;
|
||||
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;
|
||||
//should be multsampled
|
||||
|
||||
@@ -320,7 +320,7 @@ impl<'a> BoardInteraction<'a> for V4<'a> {
|
||||
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.charger.power_save();
|
||||
self.esp.deep_sleep(duration_in_ms);
|
||||
|
||||
@@ -692,7 +692,7 @@ async fn safe_main(spawner: Spawner) -> FatResult<()> {
|
||||
board.board_hal.get_esp().set_restart_to_conf(false);
|
||||
board
|
||||
.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;
|
||||
}
|
||||
}
|
||||
@@ -1122,7 +1122,7 @@ async fn wait_infinity(
|
||||
board.board_hal.get_esp().set_restart_to_conf(false);
|
||||
// ensure clean http answer / visible confirmation
|
||||
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.
|
||||
@@ -1231,7 +1231,7 @@ async fn wait_infinity(
|
||||
.lock()
|
||||
.await
|
||||
.board_hal
|
||||
.deep_sleep(0)
|
||||
.deep_sleep_ms(0)
|
||||
.await;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user