Skip to content

Commit d844373

Browse files
committed
gettime: fix alignment
1 parent c54d6a7 commit d844373

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

UNOR4USBBridge/cmds_esp_generic.h

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -364,32 +364,31 @@ void CAtHandler::add_cmds_esp_generic() {
364364
}
365365
};
366366

367-
/* ....................................................................... */
367+
/* ....................................................................... */
368368
command_table[_GETTIME] = [this](auto & srv, auto & parser) {
369-
/* ....................................................................... */
369+
/* ....................................................................... */
370370

371-
switch (parser.cmd_mode) {
372-
case chAT::CommandMode::Write: {
373-
374-
configTime(0, 0, "pool.ntp.org");
375-
time_t now = time(nullptr);
376-
377-
while (now < SECS_YR_2000) {
378-
delay(100);
379-
now = time(nullptr);
380-
}
381-
382-
srv.write_response_prompt();
383-
sprintf(epoch,"%d", (unsigned long) now);
384-
srv.write_cstr((const char *) epoch);
385-
srv.write_line_end();
386-
387-
return chAT::CommandStatus::OK;
371+
switch (parser.cmd_mode) {
372+
case chAT::CommandMode::Write: {
373+
configTime(0, 0, "pool.ntp.org");
374+
time_t now = time(nullptr);
375+
376+
while (now < SECS_YR_2000) {
377+
delay(100);
378+
now = time(nullptr);
379+
}
380+
381+
srv.write_response_prompt();
382+
sprintf(epoch,"%d", (unsigned long) now);
383+
srv.write_cstr((const char *) epoch);
384+
srv.write_line_end();
385+
386+
return chAT::CommandStatus::OK;
387+
}
388+
default:
389+
return chAT::CommandStatus::ERROR;
388390
}
389-
default:
390-
return chAT::CommandStatus::ERROR;
391-
}
392-
};
391+
};
393392
}
394393

395394
#endif

0 commit comments

Comments
 (0)