mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 11:10:52 +00:00
Add Shutdown and reboot to CardKB and friends (#3487)
* Add Shutdown and reboot to CardKB and friends * aw shucks
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
|
||||
#include "mqtt/MQTT.h"
|
||||
|
||||
#define DEFAULT_REBOOT_SECONDS 7
|
||||
|
||||
AdminModule *adminModule;
|
||||
bool hasOpenEditTransaction;
|
||||
|
||||
|
||||
@@ -409,6 +409,16 @@ int32_t CannedMessageModule::runOnce()
|
||||
case 0xb7: // right
|
||||
// already handled above
|
||||
break;
|
||||
// handle fn+s for shutdown
|
||||
case 0x9b:
|
||||
screen->startShutdownScreen();
|
||||
shutdownAtMsec = millis() + DEFAULT_SHUTDOWN_SECONDS * 1000;
|
||||
break;
|
||||
// and fn+r for reboot
|
||||
case 0x90:
|
||||
screen->startRebootScreen();
|
||||
rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;
|
||||
break;
|
||||
default:
|
||||
if (this->cursor == this->freetext.length()) {
|
||||
this->freetext += this->payload;
|
||||
|
||||
Reference in New Issue
Block a user