mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
feat(wio-tracker-l1): energy optimizations
- CPU sleep: board.sleep(0) in main loop puts NRF52 into WFE/sd_app_evt_wait between iterations; wakes on any interrupt (radio, BLE, timer). Largest power saving of the three changes. - VBAT_ENABLE gating: voltage divider now powered only during ADC read (HIGH for 10ms, then LOW). Previously stayed HIGH continuously. Fixed in both variant.cpp (init) and WioTrackerL1Board::getBattMilliVolts(). - LED off with display: PIN_LED is cleared when auto-off triggers and restored (handed back to userLedHandler) when display wakes. Avoids idle LED current draw during screen-off periods. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -67,9 +67,9 @@ void initVariant() {
|
||||
pinMode(PIN_QSPI_CS, OUTPUT);
|
||||
digitalWrite(PIN_QSPI_CS, HIGH);
|
||||
|
||||
// VBAT_ENABLE
|
||||
// VBAT_ENABLE: keep LOW by default, WioTrackerL1Board::getBattMilliVolts() toggles it
|
||||
pinMode(VBAT_ENABLE, OUTPUT);
|
||||
digitalWrite(VBAT_ENABLE, HIGH);
|
||||
digitalWrite(VBAT_ENABLE, LOW);
|
||||
|
||||
// set LED pin as output and set it low
|
||||
pinMode(PIN_LED, OUTPUT);
|
||||
|
||||
Reference in New Issue
Block a user