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 dd55af6d9c
3 changed files with 365 additions and 363 deletions

View File

@ -16,5 +16,3 @@ upload_speed = 921600
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",
buff_h);
sprintf(time_all[arg * 2 + 1][server.arg("rule").toInt()], "%s",
buff_m);
EEPROM.put(server.arg("rule").toInt() * 4 + arg * 64,
atoi(time_all[arg * 2][server.arg("rule").toInt()]));