mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 02:45:41 +00:00
Update ButtonThread.cpp
Fixed formatting. Added exclusion for devices with eink. This functionality make only sense for trackers.
This commit is contained in:
parent
91b6cbfc4b
commit
28141c91fe
@ -192,16 +192,17 @@ int32_t ButtonThread::runOnce()
|
|||||||
screen->forceDisplay(true); // Force a new UI frame, then force an EInk update
|
screen->forceDisplay(true); // Force a new UI frame, then force an EInk update
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if !defined(USE_EINK)
|
||||||
// 4 clicks: toggle Lost and found
|
// 4 clicks: toggle Lost and found
|
||||||
case 4:
|
case 4:
|
||||||
if (config.device.role == meshtastic_Config_DeviceConfig_Role_CLIENT) {
|
if (config.device.role == meshtastic_Config_DeviceConfig_Role_CLIENT) {
|
||||||
LOG_WARN("Changing mode to LOST_AND_FOUND");
|
LOG_WARN("Changing mode to LOST_AND_FOUND");
|
||||||
config.device.role = meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND;
|
config.device.role = meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND;
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->startAlert("Switching to LOST!");
|
screen->startAlert("Switching to LOST!");
|
||||||
nodeDB->saveToDisk(SEGMENT_CONFIG);
|
nodeDB->saveToDisk(SEGMENT_CONFIG);
|
||||||
}else{
|
} else {
|
||||||
LOG_WARN("Changing mode to Client");
|
LOG_WARN("Changing mode to Client");
|
||||||
config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;
|
config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;
|
||||||
if (screen)
|
if (screen)
|
||||||
|
Loading…
Reference in New Issue
Block a user