mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 13:46:37 +00:00
Add teleperiod data on empty teleperiod command if set to zero
Add teleperiod data on empty teleperiod command if set to zero (#12023)
This commit is contained in:
parent
572fddef73
commit
94485913e5
@ -1857,10 +1857,11 @@ void CmndTeleperiod(void)
|
||||
{
|
||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
|
||||
Settings.tele_period = (1 == XdrvMailbox.payload) ? TELE_PERIOD : XdrvMailbox.payload;
|
||||
if ((Settings.tele_period > 0) && (Settings.tele_period < 10)) Settings.tele_period = 10; // Do not allow periods < 10 seconds
|
||||
// TasmotaGlobal.tele_period = Settings.tele_period;
|
||||
if ((Settings.tele_period > 0) && (Settings.tele_period < 10)) {
|
||||
Settings.tele_period = 10; // Do not allow periods < 10 seconds
|
||||
}
|
||||
}
|
||||
TasmotaGlobal.tele_period = Settings.tele_period; // Show teleperiod data also on empty command
|
||||
TasmotaGlobal.tele_period = (Settings.tele_period) ? Settings.tele_period : 3601; // Show teleperiod data also on empty command
|
||||
ResponseCmndNumber(Settings.tele_period);
|
||||
}
|
||||
|
||||
|
@ -929,7 +929,7 @@ void PerformEverySecond(void)
|
||||
|
||||
ResetGlobalValues();
|
||||
|
||||
if (Settings.tele_period) {
|
||||
if (Settings.tele_period || (3601 == TasmotaGlobal.tele_period)) {
|
||||
if (TasmotaGlobal.tele_period >= 9999) {
|
||||
if (!TasmotaGlobal.global_state.network_down) {
|
||||
TasmotaGlobal.tele_period = 0; // Allow teleperiod once wifi is connected
|
||||
|
Loading…
x
Reference in New Issue
Block a user