rtc craziness

This commit is contained in:
Thaddeus Hughes
2026-03-11 09:01:32 -05:00
parent e2451fce78
commit f4077e5e26
40 changed files with 45559 additions and 131 deletions

View File

@@ -98,10 +98,10 @@ static void cmd_post(char *json_data) {
}
if (should_sleep) {
printf("\nEntering deep sleep in 2 seconds...\n");
printf("\nEntering soft idle in 2 seconds...\n");
fflush(stdout);
vTaskDelay(pdMS_TO_TICKS(2000));
rtc_enter_deep_sleep();
soft_idle_enter();
}
}
@@ -111,6 +111,7 @@ static void cmd_help(void) {
printf("\nCommands:\n");
printf(" GET - Get complete system status (JSON)\n");
printf(" POST: {json} - Send command or update parameters (JSON)\n");
printf(" RTCDEBUG - Dump RTC timekeeping state (time, backup, sleep entry, clock source)\n");
printf(" HELP - Show this help\n");
printf("\nPOST JSON Format:\n");
printf("{\n");
@@ -186,6 +187,9 @@ static void process_command(char *cmd) {
else if (strcmp(command, "HELP") == 0) {
cmd_help();
}
else if (strcmp(command, "RTCDEBUG") == 0) {
rtc_print_debug();
}
else {
printf("ERROR: Unknown command '%s'\n", command);
printf("Type 'HELP' for available commands\n");