Cleanup
This commit is contained in:
parent
815f2ae3a5
commit
f40392f343
1 changed files with 45 additions and 49 deletions
|
|
@ -50,22 +50,20 @@ static void print_usage(void)
|
|||
printf(
|
||||
"Usage:\n"
|
||||
" system chip-info - Show chip and system information\n"
|
||||
" system uptime - Display system uptime\n"
|
||||
" system tasks - List FreeRTOS tasks\n"
|
||||
" system reset-reason - Show last reset reason\n"
|
||||
" system RAM - Display heap memory usage\n"
|
||||
" system flash - Show flash information\n"
|
||||
" system partition - List partition table\n"
|
||||
" system heap-caps - Show heap by capability\n"
|
||||
" system stats - Combined system statistics\n"
|
||||
" system backtrace - Print current backtrace\n"
|
||||
" system coredump - Check coredump status\n"
|
||||
" system sleep <ms> - Enter light sleep\n"
|
||||
" system mac - Show MAC addresses\n"
|
||||
" system hostname [name]- Show/set hostname\n"
|
||||
" system version - Show firmware version\n"
|
||||
" system factory-reset - Clear NVS and restart\n"
|
||||
" system reboot - Reboot the device\n");
|
||||
" system flash - Show flash information\n"
|
||||
" system heap-caps - Show heap by capability\n"
|
||||
" system hostname [name]- Show/set hostname\n"
|
||||
" system mac - Show MAC addresses\n"
|
||||
" system partition - List partition table\n"
|
||||
" system RAM - Display heap memory usage\n"
|
||||
" system reboot - Reboot the device\n"
|
||||
" system reset-reason - Show last reset reason\n"
|
||||
" system stats - Combined system statistics\n"
|
||||
" system tasks - List FreeRTOS tasks\n"
|
||||
" system uptime - Display system uptime\n"
|
||||
" system version - Show firmware version\n");
|
||||
}
|
||||
|
||||
static int system_cmd_chip_info(void)
|
||||
|
|
@ -595,34 +593,34 @@ static int cmd_system(int argc, char **argv)
|
|||
|
||||
if (!strcmp(argv[1], "chip-info"))
|
||||
return system_cmd_chip_info();
|
||||
if (!strcmp(argv[1], "uptime"))
|
||||
return system_cmd_uptime();
|
||||
if (!strcmp(argv[1], "tasks"))
|
||||
return system_cmd_tasks();
|
||||
if (!strcmp(argv[1], "reset-reason"))
|
||||
return system_cmd_reset_reason();
|
||||
if (!strcmp(argv[1], "RAM"))
|
||||
return system_cmd_ram();
|
||||
if (!strcmp(argv[1], "flash"))
|
||||
return system_cmd_flash();
|
||||
if (!strcmp(argv[1], "partition"))
|
||||
return system_cmd_partition();
|
||||
if (!strcmp(argv[1], "heap-caps"))
|
||||
return system_cmd_heap_caps();
|
||||
if (!strcmp(argv[1], "stats"))
|
||||
return system_cmd_stats();
|
||||
if (!strcmp(argv[1], "coredump"))
|
||||
return system_cmd_coredump();
|
||||
if (!strcmp(argv[1], "mac"))
|
||||
return system_cmd_mac();
|
||||
if (!strcmp(argv[1], "hostname"))
|
||||
return system_cmd_hostname(argc, argv);
|
||||
if (!strcmp(argv[1], "version"))
|
||||
return system_cmd_version();
|
||||
if (!strcmp(argv[1], "factory-reset"))
|
||||
return system_cmd_factory_reset();
|
||||
if (!strcmp(argv[1], "flash"))
|
||||
return system_cmd_flash();
|
||||
if (!strcmp(argv[1], "heap-caps"))
|
||||
return system_cmd_heap_caps();
|
||||
if (!strcmp(argv[1], "hostname"))
|
||||
return system_cmd_hostname(argc, argv);
|
||||
if (!strcmp(argv[1], "mac"))
|
||||
return system_cmd_mac();
|
||||
if (!strcmp(argv[1], "partition"))
|
||||
return system_cmd_partition();
|
||||
if (!strcmp(argv[1], "RAM"))
|
||||
return system_cmd_ram();
|
||||
if (!strcmp(argv[1], "reboot"))
|
||||
return system_cmd_reboot();
|
||||
if (!strcmp(argv[1], "reset-reason"))
|
||||
return system_cmd_reset_reason();
|
||||
if (!strcmp(argv[1], "stats"))
|
||||
return system_cmd_stats();
|
||||
if (!strcmp(argv[1], "tasks"))
|
||||
return system_cmd_tasks();
|
||||
if (!strcmp(argv[1], "uptime"))
|
||||
return system_cmd_uptime();
|
||||
if (!strcmp(argv[1], "version"))
|
||||
return system_cmd_version();
|
||||
|
||||
printf("Unknown command\n");
|
||||
print_usage();
|
||||
|
|
@ -634,22 +632,20 @@ static void system_completion(const char *buf, linenoiseCompletions *lc)
|
|||
if (!strncmp(buf, "system", 6))
|
||||
{
|
||||
linenoiseAddCompletion(lc, "system chip-info");
|
||||
linenoiseAddCompletion(lc, "system uptime");
|
||||
linenoiseAddCompletion(lc, "system tasks");
|
||||
linenoiseAddCompletion(lc, "system reset-reason");
|
||||
linenoiseAddCompletion(lc, "system RAM");
|
||||
linenoiseAddCompletion(lc, "system flash");
|
||||
linenoiseAddCompletion(lc, "system partition");
|
||||
linenoiseAddCompletion(lc, "system heap-caps");
|
||||
linenoiseAddCompletion(lc, "system stats");
|
||||
linenoiseAddCompletion(lc, "system coredump");
|
||||
linenoiseAddCompletion(lc, "system sleep");
|
||||
linenoiseAddCompletion(lc, "system mac");
|
||||
linenoiseAddCompletion(lc, "system hostname");
|
||||
linenoiseAddCompletion(lc, "system version");
|
||||
linenoiseAddCompletion(lc, "system idf-version");
|
||||
linenoiseAddCompletion(lc, "system factory-reset");
|
||||
linenoiseAddCompletion(lc, "system flash");
|
||||
linenoiseAddCompletion(lc, "system heap-caps");
|
||||
linenoiseAddCompletion(lc, "system hostname");
|
||||
linenoiseAddCompletion(lc, "system mac");
|
||||
linenoiseAddCompletion(lc, "system partition");
|
||||
linenoiseAddCompletion(lc, "system RAM");
|
||||
linenoiseAddCompletion(lc, "system reboot");
|
||||
linenoiseAddCompletion(lc, "system reset-reason");
|
||||
linenoiseAddCompletion(lc, "system stats");
|
||||
linenoiseAddCompletion(lc, "system tasks");
|
||||
linenoiseAddCompletion(lc, "system uptime");
|
||||
linenoiseAddCompletion(lc, "system version");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue