Milestone 1

All function implemented in OOP except WebServer Function.
Most missing documentation and comments
This commit is contained in:
Siwat Sirichai 2024-01-01 00:31:28 +07:00
parent e1f0fd5651
commit d62ffa3606
7 changed files with 10 additions and 29 deletions

View file

@ -60,6 +60,9 @@ void ClimateIoT::publishClimate() {
}
void ClimateIoT::publishRoomTemperature() {
if (this->card->getSensorType() == AC_SENSOR_TYPE_NONE ) {
return;
}
char payload[5];
itoa(this->card->getRoomTemperature(), payload, 10);
this->publishRelative(AC_ROOM_TEMPERATURE_REPORT_TOPIC, payload);