mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Merge pull request #7355 from andrethomas/counter
Counter - SetOption79 to enable reset of counters after telemetry sent
This commit is contained in:
commit
172e315408
@ -92,7 +92,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
|
||||
uint32_t bootcount_update : 1; // bit 26 (v7.0.0.4) - SetOption76 - Enable incrementing bootcount when deepsleep is enabled
|
||||
uint32_t slider_dimmer_stay_on : 1; // bit 27 (v7.0.0.6) - SetOption77 - Do not power off if slider moved to far left
|
||||
uint32_t compatibility_check : 1; // bit 28 (v7.1.2.6) - SetOption78 - Disable OTA compatibility check
|
||||
uint32_t spare29 : 1;
|
||||
uint32_t counter_reset_on_tele : 1; // bit 29 (v8.1.0.1) - SetOption79 - Enable resetting of counters after telemetry was sent
|
||||
uint32_t shutter_mode : 1; // bit 30 (v6.6.0.14) - SetOption80 - Enable shutter support
|
||||
uint32_t pcf8574_ports_inverted : 1; // bit 31 (v6.6.0.14) - SetOption81 - Invert all ports on PCF8574 devices
|
||||
};
|
||||
|
@ -157,6 +157,9 @@ void CounterShow(bool json)
|
||||
dsxflg++;
|
||||
}
|
||||
#endif // USE_DOMOTICZ
|
||||
if ((0 == tele_period ) && (Settings.flag3.counter_reset_on_tele)) {
|
||||
RtcSettings.pulse_counter[i] = 0;
|
||||
}
|
||||
#ifdef USE_WEBSERVER
|
||||
} else {
|
||||
WSContentSend_PD(PSTR("{s}" D_COUNTER "%d{m}%s%s{e}"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user