mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Clean up support command code
This commit is contained in:
parent
597c3655b0
commit
16aab339e7
@ -249,18 +249,6 @@ void CmndWifiTest(void)
|
||||
#endif //USE_WEBSERVER
|
||||
}
|
||||
|
||||
void UpdateBatteryPercent(int batt_percentage) {
|
||||
if (batt_percentage > 101) { batt_percentage = 100; }
|
||||
if (batt_percentage >= 0) {
|
||||
Settings->battery_level_percent = batt_percentage;
|
||||
}
|
||||
}
|
||||
|
||||
void CmndBatteryPercent(void) {
|
||||
UpdateBatteryPercent(XdrvMailbox.payload);
|
||||
ResponseCmndNumber(Settings->battery_level_percent);
|
||||
}
|
||||
|
||||
#endif // not defined FIRMWARE_MINIMAL_ONLY
|
||||
|
||||
void ResponseCmndNumber(int value) {
|
||||
@ -2606,6 +2594,18 @@ void CmndDnsTimeout(void) {
|
||||
ResponseCmndNumber(Settings->dns_timeout);
|
||||
}
|
||||
|
||||
void UpdateBatteryPercent(int batt_percentage) {
|
||||
if (batt_percentage > 101) { batt_percentage = 100; }
|
||||
if (batt_percentage >= 0) {
|
||||
Settings->battery_level_percent = batt_percentage;
|
||||
}
|
||||
}
|
||||
|
||||
void CmndBatteryPercent(void) {
|
||||
UpdateBatteryPercent(XdrvMailbox.payload);
|
||||
ResponseCmndNumber(Settings->battery_level_percent);
|
||||
}
|
||||
|
||||
#ifdef USE_I2C
|
||||
void CmndI2cScan(void) {
|
||||
// I2CScan0 - Scan bus1 and bus2
|
||||
|
Loading…
x
Reference in New Issue
Block a user