mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge pull request #1122 from fschrempf/xiao-nrf-ui-and-power-optimizations
Companion Power Optimizations and UI Support for XIAO NRF52
This commit is contained in:
commit
c17bd5d6fc
14 changed files with 64 additions and 7 deletions
|
|
@ -618,7 +618,7 @@ void UITask::userLedHandler() {
|
|||
led_state = 0;
|
||||
next_led_change = cur_time + LED_CYCLE_MILLIS - last_led_increment;
|
||||
}
|
||||
digitalWrite(PIN_STATUS_LED, led_state);
|
||||
digitalWrite(PIN_STATUS_LED, led_state == LED_STATE_ON);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -650,6 +650,7 @@ void UITask::shutdown(bool restart){
|
|||
_board->reboot();
|
||||
} else {
|
||||
_display->turnOff();
|
||||
radio_driver.powerOff();
|
||||
_board->powerOff();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ void UITask::userLedHandler() {
|
|||
state = 0;
|
||||
next_change = cur_time + LED_CYCLE_MILLIS - last_increment;
|
||||
}
|
||||
digitalWrite(PIN_STATUS_LED, state);
|
||||
digitalWrite(PIN_STATUS_LED, state == LED_STATE_ON);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -292,10 +292,12 @@ void UITask::shutdown(bool restart){
|
|||
|
||||
#endif // PIN_BUZZER
|
||||
|
||||
if (restart)
|
||||
if (restart) {
|
||||
_board->reboot();
|
||||
else
|
||||
} else {
|
||||
radio_driver.powerOff();
|
||||
_board->powerOff();
|
||||
}
|
||||
}
|
||||
|
||||
void UITask::loop() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue