|
|
@@ -428,18 +428,28 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, char* command, char* re
|
|
|
}
|
|
|
#endif
|
|
|
} else if (memcmp(command, "powersaving on", 14) == 0) {
|
|
|
+#if defined(NRF52_PLATFORM)
|
|
|
_prefs->powersaving_enabled = 1;
|
|
|
savePrefs();
|
|
|
- strcpy(reply, "ok"); // TODO: to return Not supported if required
|
|
|
+ strcpy(reply, "On - Immediate effect");
|
|
|
+#elif defined(ESP32) && !defined(WITH_BRIDGE)
|
|
|
+ _prefs->powersaving_enabled = 1;
|
|
|
+ savePrefs();
|
|
|
+ strcpy(reply, "On - After 2 minutes");
|
|
|
+#elif defined(WITH_BRIDGE)
|
|
|
+ strcpy(reply, "Bridge not supported");
|
|
|
+#else
|
|
|
+ strcpy(reply, "Board not supported");
|
|
|
+#endif
|
|
|
} else if (memcmp(command, "powersaving off", 15) == 0) {
|
|
|
_prefs->powersaving_enabled = 0;
|
|
|
savePrefs();
|
|
|
- strcpy(reply, "ok");
|
|
|
+ strcpy(reply, "Off");
|
|
|
} else if (memcmp(command, "powersaving", 11) == 0) {
|
|
|
if (_prefs->powersaving_enabled) {
|
|
|
- strcpy(reply, "on");
|
|
|
+ strcpy(reply, "On");
|
|
|
} else {
|
|
|
- strcpy(reply, "off");
|
|
|
+ strcpy(reply, "Off");
|
|
|
}
|
|
|
} else if (memcmp(command, "log start", 9) == 0) {
|
|
|
_callbacks->setLoggingOn(true);
|