mirror of https://github.com/arendst/Tasmota.git
commit
da3c00c218
|
@ -371,7 +371,12 @@ bool CseSerialInput()
|
|||
return 1;
|
||||
}
|
||||
} else {
|
||||
if (0x5A == serial_in_byte) { // 0x5A - Packet header 2
|
||||
if ((0x5A == serial_in_byte) && (serial_in_byte_counter)) { // 0x5A - Packet header 2
|
||||
if (serial_in_byte_counter > 1) { // Sync buffer with data (issue #1907)
|
||||
serial_in_buffer[0] = serial_in_buffer[--serial_in_byte_counter];
|
||||
serial_in_byte_counter = 1;
|
||||
AddLog_P(LOG_LEVEL_DEBUG, PSTR("CSE: Fixed out-of-sync"));
|
||||
}
|
||||
cse_receive_flag = 1;
|
||||
} else {
|
||||
serial_in_byte_counter = 0;
|
||||
|
|
|
@ -262,8 +262,8 @@ void SDM120Show(boolean json)
|
|||
#ifdef USE_WEBSERVER
|
||||
} else {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SDM120_DATA, mqtt_data, voltage, current, active_power, apparent_power, reactive_power, power_factor, frequency, energy_total);
|
||||
}
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************************************\
|
||||
|
|
|
@ -317,8 +317,8 @@ void SDM630Show(boolean json)
|
|||
active_power_l1, active_power_l2, active_power_l3,
|
||||
reactive_power_l1, reactive_power_l2, reactive_power_l3,
|
||||
power_factor_l1, power_factor_l2, power_factor_l3, energy_total);
|
||||
}
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************************************\
|
||||
|
|
Loading…
Reference in New Issue