Next iteration with backoffs, tasks, basic skeleton for events

This commit is contained in:
2025-09-20 20:50:30 +02:00
parent 0315b4a559
commit 29ba78d5b2
15 changed files with 4926 additions and 211 deletions

19
src/events.rs Normal file
View File

@@ -0,0 +1,19 @@
#[derive(Clone, Copy)]
pub enum Scene {
ParkedIdle, // Default state when booting up or waking up from long term (overnight, eg) parking, or entered when accelerometers and GPS both show zero motion for ~30 seconds
StoplightIdle, // Entered when GPS speed is zero after decelerating
Accelerating, // GPS speed is increasing
Decelerating, // GPS speed is decreasing
ParkedLongTerm, // GPS has not changed location in the last ~5 minutes
}
#[derive(Clone, Copy)]
pub enum Notification {
SceneChange(Scene),
WifiConnected,
WifiDisconnected,
GPSLost,
GPSAcquired,
BPMBeat
}