OTA fixes + enable when network connected and switch pressed
This commit is contained in:
@@ -8,30 +8,10 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <devices.h>
|
||||
#include <pinlist.h>
|
||||
|
||||
namespace commands
|
||||
{
|
||||
enum RO // relay output channels
|
||||
{
|
||||
P1,
|
||||
P2,
|
||||
P3,
|
||||
P4,
|
||||
NC_1,
|
||||
FST_FLOOR,
|
||||
GND_FLOOR,
|
||||
PUMP_HT,
|
||||
IRR_PUMP,
|
||||
Z1,
|
||||
Z2,
|
||||
Z3,
|
||||
AUX,
|
||||
RETURN,
|
||||
NC_3,
|
||||
NC_4,
|
||||
RO_MAX // unused to detect invalid values
|
||||
};
|
||||
|
||||
static const std::map<const std::string, uint8_t> c_hpLimitsMap = {{"P1", RO::P1},
|
||||
{"P2", RO::P2},
|
||||
{"P3", RO::P3},
|
||||
@@ -43,10 +23,10 @@ namespace commands
|
||||
{"ground", RO::GND_FLOOR}};
|
||||
|
||||
static const std::map<const std::string, uint8_t> c_irrigationValveMap = {{"ricircolo", RO::RETURN},
|
||||
{"zone1", RO::Z1},
|
||||
{"zone2", RO::Z2},
|
||||
{"zone3", RO::Z3},
|
||||
{"rubinetti", RO::AUX}};
|
||||
{"zone1", RO::ZONE1},
|
||||
{"zone2", RO::ZONE2},
|
||||
{"zone3", RO::ZONE3},
|
||||
{"rubinetti", RO::DRIP}};
|
||||
|
||||
static std::map<const std::string, std::pair<const char *, TimerHandle_t>> c_irrigationTimerMap = {{"ricircolo", {"ricircolo", NULL}},
|
||||
{"zone1", {"zone1", NULL}},
|
||||
@@ -97,28 +77,26 @@ namespace commands
|
||||
};
|
||||
|
||||
static const std::map<const std::string, Command> s_commandMap = {
|
||||
|
||||
// TEST
|
||||
{"setBuzz", Commands::setBuzz},
|
||||
|
||||
// CONFIG
|
||||
{"setConfig", Commands::setConfig},
|
||||
{"getConfig", Commands::getConfig},
|
||||
|
||||
// CRONJOBS
|
||||
{"loadCronJob", Commands::loadCronJob},
|
||||
{"setCronJob", Commands::setCronJob},
|
||||
{"getCronJob", Commands::getCronJob},
|
||||
{"delCronJob", Commands::delCronJob},
|
||||
{"storeCronJob", Commands::storeCronJob},
|
||||
|
||||
// SETTERS
|
||||
{"setHPlimit", Commands::setHPlimit},
|
||||
{"setHeating", Commands::setHeating},
|
||||
{"setIrrigation", Commands::setIrrigation},
|
||||
|
||||
// GETTERS
|
||||
{"getHPpower", Commands::getHPpower},
|
||||
{"setHeating", Commands::setHeating},
|
||||
|
||||
{"getInputStatus", Commands::getInputStatus},
|
||||
{"getOutputStatus", Commands::getOutputStatus},
|
||||
|
||||
// NTP and Time
|
||||
{"getTimeDrift", Commands::getTimeDrift},
|
||||
{"setTimeNTP", Commands::setTimeNTP},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user