fix: set month of date to OT fixed

This commit is contained in:
Yurii
2025-05-19 23:16:34 +03:00
parent 7b31315242
commit f986129c72

View File

@@ -1418,9 +1418,8 @@ protected:
} }
bool setDayAndMonth(const struct tm *ptm) { bool setDayAndMonth(const struct tm *ptm) {
const unsigned int request = ((ptm->tm_mon + 1) & 0xFF << 8) const uint8_t month = (ptm->tm_mon + 1) & 0xFF;
| (ptm->tm_mday & 0xFF); const unsigned int request = (month << 8) | (ptm->tm_mday & 0xFF);
const unsigned long response = this->instance->sendRequest(CustomOpenTherm::buildRequest( const unsigned long response = this->instance->sendRequest(CustomOpenTherm::buildRequest(
OpenThermRequestType::WRITE_DATA, OpenThermRequestType::WRITE_DATA,
OpenThermMessageID::Date, OpenThermMessageID::Date,