Remove the deep-sleep feature entirely (user decision): power manager, Settings switch, NVS key, sleep bit in the shared header, docs
Firmware / build (push) Successful in 2m58s
Firmware / build (push) Successful in 2m58s
This commit is contained in:
@@ -45,9 +45,6 @@ bool handleCommand(const char* line);
|
||||
|
||||
const char* version();
|
||||
|
||||
/** A check or install is queued or running (the power manager must not sleep). */
|
||||
bool isBusy();
|
||||
|
||||
} // namespace Ota
|
||||
|
||||
#endif // OTA_UPDATE_H
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/**
|
||||
* Power Manager (Inst. Cluster) - deep sleep when the Main CTRL goes quiet.
|
||||
*
|
||||
* Controlled from the Main CTRL's Settings switch "Sleep when the car is off":
|
||||
* it arrives as the CFG_SLEEP_WHEN_SILENT bit of the CONFIG frame and is
|
||||
* cached in NVS with the rest of the gauge config, so it is known even while
|
||||
* the Main CTRL is already asleep.
|
||||
*
|
||||
* Sleep when: the bit is set, no DATA frame on any transport for
|
||||
* SLEEP_AFTER_MS, no update job running, up for at least SLEEP_AFTER_MS.
|
||||
* Gauges are driven low and the backlight off first.
|
||||
*
|
||||
* Wake:
|
||||
* - UART RX (IO1, RTC IO) goes low: the Main CTRL's first frame on the wire
|
||||
* - a timer every PROBE_PERIOD_S: a short "probe boot" with the backlight
|
||||
* off that listens for ESP-NOW frames for a few seconds and goes straight
|
||||
* back to sleep if nothing arrives. This is what wakes the board when the
|
||||
* link is radio-only (no wire in the car).
|
||||
*
|
||||
* Console: sleep status | now
|
||||
*/
|
||||
|
||||
#ifndef POWER_MANAGER_H
|
||||
#define POWER_MANAGER_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
namespace PowerManager {
|
||||
|
||||
/** Right after DisplayInit::init(): detects a probe boot and keeps the panel dark. */
|
||||
void init();
|
||||
|
||||
/** True during a timer-wake probe boot (setup() skips its waits). */
|
||||
bool isProbeBoot();
|
||||
|
||||
void tick();
|
||||
bool handleCommand(const char* line);
|
||||
|
||||
} // namespace PowerManager
|
||||
|
||||
#endif // POWER_MANAGER_H
|
||||
@@ -187,10 +187,6 @@ typedef struct __attribute__((packed)) {
|
||||
|
||||
#define OUT_ENABLE_TACH (1 << 0)
|
||||
#define OUT_ENABLE_TEMP (1 << 1)
|
||||
// Not an output: the Main CTRL's "Sleep when the car is off" switch, carried in
|
||||
// the same byte so the CONFIG layout (and PACKET_VERSION) stay unchanged. The
|
||||
// Inst. Cluster caches CONFIG in NVS, so it knows the setting while A sleeps.
|
||||
#define CFG_SLEEP_WHEN_SILENT (1 << 7)
|
||||
#define OVERRIDE_TACH (1 << 0)
|
||||
#define OVERRIDE_TEMP (1 << 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user