Merge pull request #7355 from andrethomas/counter

Counter - SetOption79 to enable reset of counters after telemetry sent
This commit is contained in:
Theo Arends 2019-12-28 16:27:19 +01:00 committed by GitHub
commit 172e315408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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
};

View File

@ -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}"),