Merge pull request #8291 from gemu2015/sml-update

fix sml transmit timer
This commit is contained in:
Theo Arends 2020-04-27 09:16:29 +02:00 committed by GitHub
commit 18ea230803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -2206,7 +2206,10 @@ void SML_Check_Send(void) {
char *cp;
for (uint32_t cnt=sml_desc_cnt; cnt<meters_used; cnt++) {
if (script_meter_desc[cnt].trxpin>=0 && script_meter_desc[cnt].txmem) {
if ((sml_100ms_cnt%script_meter_desc[cnt].tsecs)==0) {
//AddLog_P2(LOG_LEVEL_INFO, PSTR("100 ms>> %d - %s - %d"),sml_desc_cnt,script_meter_desc[cnt].txmem,script_meter_desc[cnt].tsecs);
if ((sml_100ms_cnt>=script_meter_desc[cnt].tsecs)) {
sml_100ms_cnt=0;
//AddLog_P2(LOG_LEVEL_INFO, PSTR("100 ms>> 2"),cp);
if (script_meter_desc[cnt].max_index>1) {
script_meter_desc[cnt].index++;
if (script_meter_desc[cnt].index>=script_meter_desc[cnt].max_index) {