Add runtime UV protection toggle and treat near-zero sense as external power.
Per-pod NVS enable (default off) via UART/ESP-NOW/dashboard, and skip UV latch when LiPo ADC reads ~0 mV so USB/external supply still boots. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -33,6 +33,8 @@ enum EspNowMessageType {
|
||||
ESPNOW_CLEAR_ID_BINDING = 23;
|
||||
/** Master → slave: accel/tap ESP-NOW send path (best_effort/fast/wait/reliable). */
|
||||
ESPNOW_SET_INPUT_SEND_MODE = 24;
|
||||
/** Master → slave: enable/disable software LiPo UV protection (NVS). */
|
||||
ESPNOW_SET_BATTERY_UV = 25;
|
||||
}
|
||||
|
||||
message EspNowUnicastTest {
|
||||
@@ -154,6 +156,12 @@ message EspNowInputSendMode {
|
||||
uint32 mode = 2;
|
||||
}
|
||||
|
||||
/** Master → slave: software LiPo UV protection enable (persisted in NVS). */
|
||||
message EspNowBatteryUv {
|
||||
uint32 client_id = 1; // 0 = all slaves; otherwise only matching slave_id applies
|
||||
bool enabled = 2;
|
||||
}
|
||||
|
||||
/** Slave → master: LiPo voltages (periodic ~30 s and on query). */
|
||||
message EspNowBatteryReport {
|
||||
uint32 client_id = 1;
|
||||
@@ -225,5 +233,6 @@ message EspNowMessage {
|
||||
EspNowAssignId assign_id = 23;
|
||||
EspNowClearIdBinding clear_id_binding = 24;
|
||||
EspNowInputSendMode input_send_mode = 25;
|
||||
EspNowBatteryUv battery_uv = 26;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user