mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
fix: set month of date to OT fixed
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user