sys: clean-up system-specific functions

- shrink utils source file, move heartbeat and boot management into system
- improvise with 'heartbeat' functionality. include scheduler implementation that will
manage the per-module heartbeat callbacks with individual 'mode' and
'interval' settings. current ones are mqtt (including relays, lights, thermostat), debug and
influxdb. preserve heartbeat NONE, ONCE and REPEAT, REPEAT_STATUS is effectively a hbReport & status bit.
- mqtt heartbeat is managed through mqttHeartbeat() callbacks
- tweak mqtt callbacks to use lists instead of the vector, slighly reducing the size of the .bin
- update WebUI, include report setting and update hbMode values
- make sure general.h settings include new heartbeat,
move constant definitions outside of the header
- correctly include dependencies through the .cpp, avoid leaking
internal details.
- as a side-effect, base headers are no longer included recursively
This commit is contained in:
Maxim Prokhorov
2021-01-22 22:03:05 +03:00
parent c4f0ceb1ae
commit 021f0afb86
130 changed files with 27250 additions and 26943 deletions

View File

@@ -25,7 +25,7 @@ bool rpcHandleAction(const String& action) {
});
} else if (action.equals("heartbeat")) {
result = true;
schedule_function(heartbeat);
systemScheduleHeartbeat();
}
return result;
}