mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 22:52:19 +03:00
Добавялем в RTC команды получения числовых значений времнени по частям
This commit is contained in:
@@ -75,7 +75,22 @@ class IarduinoRTC : public IoTItem {
|
||||
if (param.size()) {
|
||||
watch->settimeUnix(param[0].valD);
|
||||
}
|
||||
}
|
||||
} else if (command == "getHours") {
|
||||
tmpValue.valD = watch->Hours; // Часы 0-23
|
||||
return tmpValue;
|
||||
} else if (command == "getMinutes") {
|
||||
tmpValue.valD = watch->minutes; // Минуты 0-59
|
||||
return tmpValue;
|
||||
} else if (command == "getSeconds") {
|
||||
tmpValue.valD = watch->seconds; // Секунды 0-59
|
||||
return tmpValue;
|
||||
} else if (command == "getMonth") {
|
||||
tmpValue.valD = watch->month; // Месяц 1-12
|
||||
return tmpValue;
|
||||
} else if (command == "getDay") {
|
||||
tmpValue.valD = watch->day; // День месяца 1-31
|
||||
return tmpValue;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user