mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Добавляем модуль RTC и его поддержку в систему
This commit is contained in:
@@ -29,6 +29,8 @@ void configure(String path) {
|
||||
void* driver;
|
||||
// пробуем спросить драйвер GPIO
|
||||
if (driver = myIoTItem->getGpioDriver()) IoTgpio.regDriver((IoTGpio*)driver);
|
||||
// пробуем спросить драйвер RTC
|
||||
if (driver = myIoTItem->getRtcDriver()) rtcItem = (IoTItem*)driver;
|
||||
|
||||
IoTItems.push_back(myIoTItem);
|
||||
}
|
||||
@@ -41,6 +43,9 @@ void configure(String path) {
|
||||
|
||||
void clearConfigure() {
|
||||
Serial.printf("Start clearing config\n");
|
||||
rtcItem = nullptr;
|
||||
IoTgpio.clearDrivers();
|
||||
|
||||
for (std::list<IoTItem*>::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it) {
|
||||
Serial.printf("Start delete iotitem %s \n", (*it)->getID().c_str());
|
||||
if (*it) delete *it;
|
||||
|
||||
Reference in New Issue
Block a user