apply formatting guidelines to existing files & remove unused dep

This commit is contained in:
gilex-dev 2023-11-12 22:47:57 +01:00
parent 61aaca8510
commit 8791fc1ed0
3 changed files with 365 additions and 362 deletions

View File

@ -17,4 +17,3 @@ monitor_speed = 74880
lib_deps = lib_deps =
ropg/ezTime@^0.8.3 ropg/ezTime@^0.8.3
paulstoffregen/OneWire@^2.3.7 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++) { for (unsigned int arg = 0; arg < 4; arg++) {
if (server.arg(args[arg]) != "") { if (server.arg(args[arg]) != "") {
char buff_h[2][2] = {server.arg(args[arg])[0], server.arg(args[arg])[1]}; char buff_h[2][2] = {server.arg(args[arg])[0],
char buff_m[2][2] = {server.arg(args[arg])[3], server.arg(args[arg])[4]}; server.arg(args[arg])[1]};
sprintf(time_all[arg * 2][server.arg("rule").toInt()], "%s", buff_h); char buff_m[2][2] = {server.arg(args[arg])[3],
sprintf(time_all[arg * 2 + 1][server.arg("rule").toInt()], "%s", buff_m); 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);
EEPROM.put(server.arg("rule").toInt() * 4 + arg * 64, EEPROM.put(server.arg("rule").toInt() * 4 + arg * 64,
atoi(time_all[arg * 2][server.arg("rule").toInt()])); atoi(time_all[arg * 2][server.arg("rule").toInt()]));