diff --git a/src/prog/domod/builders/cmake/CMakeLists.txt b/src/prog/domod/builders/cmake/CMakeLists.txt index b063a1d9..84afb554 100644 --- a/src/prog/domod/builders/cmake/CMakeLists.txt +++ b/src/prog/domod/builders/cmake/CMakeLists.txt @@ -31,7 +31,6 @@ file( ${workspaceRoot}/src/prog/domod/src/ubus/capabilities_shutters.cpp ${workspaceRoot}/src/prog/domod/src/ubus/capabilities_sprinklers.cpp ${workspaceRoot}/src/prog/domod/src/ubus/timers.cpp - # Timers ${workspaceRoot}/src/prog/domod/src/timers/timers-manager.cpp ${workspaceRoot}/src/prog/domod/src/timers/event.cpp diff --git a/src/prog/domod/src/timers/timers-manager.cpp b/src/prog/domod/src/timers/timers-manager.cpp index 1375fcef..ea176a7c 100644 --- a/src/prog/domod/src/timers/timers-manager.cpp +++ b/src/prog/domod/src/timers/timers-manager.cpp @@ -69,7 +69,7 @@ TimerManager::~TimerManager(void) */ int TimerManager::load(void) { - struct json_object *the_root_node, *the_data_node; + struct json_object *the_root_node, *the_timers_node; the_root_node = json_object_from_file(m_timers_path.c_str()); if (the_root_node == NULL) @@ -78,17 +78,17 @@ int TimerManager::load(void) return -1; } - if (json_object_object_get_ex(the_root_node, k_entry_timers, &the_data_node) && (json_object_get_type(the_data_node) == json_type_array)) + if (json_object_object_get_ex(the_root_node, k_entry_timers, &the_timers_node) && (json_object_get_type(the_timers_node) == json_type_array)) { int the_len; - struct json_object *the_timer_node; + struct json_object *the_event_node; - the_len = json_object_array_length(the_data_node); + the_len = json_object_array_length(the_timers_node); for (int i = 0; i < the_len; i++) { Event the_event; - the_timer_node = json_object_array_get_idx(the_data_node, i); - the_event.from_json(the_timer_node); + the_event_node = json_object_array_get_idx(the_timers_node, i); + the_event.from_json(the_event_node); m_timers.push_back(the_event); }