first version of cron, does not read configuation from file
This commit is contained in:
@@ -56,6 +56,9 @@ namespace commands
|
||||
|
||||
static TimerHandle_t s_irrigationPumpTimer = NULL;
|
||||
|
||||
// define command callback type
|
||||
using Command = std::function<const ArduinoJson::JsonDocument(const devices_t &, const ArduinoJson::JsonDocument &)>;
|
||||
|
||||
class Commands
|
||||
{
|
||||
Commands() = delete;
|
||||
@@ -86,7 +89,7 @@ namespace commands
|
||||
static const ArduinoJson::JsonDocument getIrrigation(const devices_t &dev, const ArduinoJson::JsonDocument ¶ms);
|
||||
};
|
||||
|
||||
static const std::map<const std::string, std::function<const ArduinoJson::JsonDocument(const devices_t &, const ArduinoJson::JsonDocument &)>> commandMap = {
|
||||
static const std::map<const std::string, Command> commandMap = {
|
||||
{"setConfig", Commands::setConfig},
|
||||
{"getConfig", Commands::getConfig},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user