Compare commits

...

2 Commits

3 changed files with 365 additions and 362 deletions

View File

@ -17,4 +17,3 @@ monitor_speed = 74880
lib_deps =
ropg/ezTime@^0.8.3
paulstoffregen/OneWire@^2.3.7
milesburton/DallasTemperature@^3.11.0

View File

@ -189,10 +189,14 @@ void handleTime() {
for (unsigned int arg = 0; arg < 4; arg++) {
if (server.arg(args[arg]) != "") {
char buff_h[2][2] = {server.arg(args[arg])[0], server.arg(args[arg])[1]};
char buff_m[2][2] = {server.arg(args[arg])[3], server.arg(args[arg])[4]};
sprintf(time_all[arg * 2][server.arg("rule").toInt()], "%s", buff_h);
sprintf(time_all[arg * 2 + 1][server.arg("rule").toInt()], "%s", buff_m);
char buff_h[2][2] = {server.arg(args[arg])[0],
server.arg(args[arg])[1]};
char buff_m[2][2] = {server.arg(args[arg])[3],
server.arg(args[arg])[4]};
sprintf(time_all[arg * 2][server.arg("rule").toInt()], "%s%s",
buff_h[0], buff_h[1]);
sprintf(time_all[arg * 2 + 1][server.arg("rule").toInt()], "%s%s",
buff_m[0], buff_m[1]);
EEPROM.put(server.arg("rule").toInt() * 4 + arg * 64,
atoi(time_all[arg * 2][server.arg("rule").toInt()]));