@@ -364,32 +364,31 @@ void CAtHandler::add_cmds_esp_generic() {
364
364
}
365
365
};
366
366
367
- /* ....................................................................... */
367
+ /* ....................................................................... */
368
368
command_table[_GETTIME] = [this ](auto & srv, auto & parser) {
369
- /* ....................................................................... */
369
+ /* ....................................................................... */
370
370
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;
388
390
}
389
- default :
390
- return chAT::CommandStatus::ERROR;
391
- }
392
- };
391
+ };
393
392
}
394
393
395
394
#endif
0 commit comments