mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Add command `Delay -1
`
Add command ``Delay -1`` to wait until next second (#18984)
This commit is contained in:
parent
a542122eb1
commit
504b51a9b4
@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## [13.0.0.1]
|
## [13.0.0.1]
|
||||||
### Added
|
### Added
|
||||||
|
- Command ``Delay -1`` to wait until next second (#18984)
|
||||||
|
|
||||||
### Breaking Changed
|
### Breaking Changed
|
||||||
- Berry `bool( [] )` and `bool( {} )` now evaluate as `false` (#18986)
|
- Berry `bool( [] )` and `bool( {} )` now evaluate as `false` (#18986)
|
||||||
|
@ -112,6 +112,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
|||||||
|
|
||||||
## Changelog v13.0.0.1
|
## Changelog v13.0.0.1
|
||||||
### Added
|
### Added
|
||||||
|
- Command ``Delay -1`` to wait until next second [#18984](https://github.com/arendst/Tasmota/issues/18984)
|
||||||
|
|
||||||
### Breaking Changed
|
### Breaking Changed
|
||||||
- Berry `bool( [] )` and `bool( {} )` now evaluate as `false` [#18986](https://github.com/arendst/Tasmota/issues/18986)
|
- Berry `bool( [] )` and `bool( {} )` now evaluate as `false` [#18986](https://github.com/arendst/Tasmota/issues/18986)
|
||||||
|
@ -651,9 +651,15 @@ void CmndJson(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmndDelay(void)
|
void CmndDelay(void) {
|
||||||
{
|
// Delay -1 - Wait until next second
|
||||||
if ((XdrvMailbox.payload >= (MIN_BACKLOG_DELAY / 100)) && (XdrvMailbox.payload <= 3600)) {
|
// Delay 1 - Wait default time (200ms)
|
||||||
|
// Delay 2 - Wait 2 x 100ms
|
||||||
|
// Delay 10 - Wait 10 x 100ms
|
||||||
|
if (XdrvMailbox.payload == -1) {
|
||||||
|
TasmotaGlobal.backlog_timer = millis() + (1000 - RtcMillis()); // Next second (#18984)
|
||||||
|
}
|
||||||
|
else if ((XdrvMailbox.payload >= (MIN_BACKLOG_DELAY / 100)) && (XdrvMailbox.payload <= 3600)) {
|
||||||
TasmotaGlobal.backlog_timer = millis() + (100 * XdrvMailbox.payload);
|
TasmotaGlobal.backlog_timer = millis() + (100 * XdrvMailbox.payload);
|
||||||
}
|
}
|
||||||
uint32_t bl_delay = 0;
|
uint32_t bl_delay = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user