mirror of https://github.com/arendst/Tasmota.git
reset OT protocol internal state on handshake
This commit is contained in:
parent
f49adad496
commit
08cea20132
|
@ -313,6 +313,8 @@ void sns_ot_start_handshake()
|
||||||
|
|
||||||
AddLog(LOG_LEVEL_DEBUG, PSTR("[OTH]: perform handshake"));
|
AddLog(LOG_LEVEL_DEBUG, PSTR("[OTH]: perform handshake"));
|
||||||
|
|
||||||
|
sns_opentherm_protocol_reset();
|
||||||
|
|
||||||
sns_ot_master->sendRequestAync(
|
sns_ot_master->sendRequestAync(
|
||||||
OpenTherm::buildRequest(OpenThermMessageType::READ_DATA, OpenThermMessageID::SConfigSMemberIDcode, 0));
|
OpenTherm::buildRequest(OpenThermMessageType::READ_DATA, OpenThermMessageID::SConfigSMemberIDcode, 0));
|
||||||
|
|
||||||
|
|
|
@ -438,4 +438,15 @@ void sns_opentherm_dump_telemetry()
|
||||||
add_coma = true;
|
add_coma = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sns_opentherm_protocol_reset()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < SNS_OT_COMMANDS_COUNT; ++i)
|
||||||
|
{
|
||||||
|
struct OpenThermCommandT *cmd = &sns_opentherm_commands[i];
|
||||||
|
cmd->m_flags.m_flags = 0;
|
||||||
|
memset(cmd->m_results, 0, sizeof(OpenThermCommandT::m_results));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue