add get_system_status command
This commit is contained in:
parent
1b3e251783
commit
11f0f12ee1
1 changed files with 11 additions and 1 deletions
12
src/main.cpp
12
src/main.cpp
|
|
@ -60,6 +60,7 @@ const Command core_commands[] = {
|
|||
{"version", get_version},
|
||||
{"list_modules", get_modules},
|
||||
{"eeprom_last_commit", get_eeprom_last_commit},
|
||||
{"system_status", get_system_status},
|
||||
END_COMMAND};
|
||||
|
||||
void register_module(const Command commands[], void (*loop_fn)(void))
|
||||
|
|
@ -171,6 +172,16 @@ void get_eeprom_last_commit(String)
|
|||
return;
|
||||
}
|
||||
|
||||
void get_system_status(String)
|
||||
{
|
||||
comPort->println(F(BOARD_STRING));
|
||||
comPort->println(F(VERSION_STRING));
|
||||
#ifdef MCU_PICO
|
||||
comPort->print(F("Heap remaining:"));
|
||||
comPort->println(rp2040.getFreeHeap());
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef UNIT_TEST // don't define setup() and loop() for unit testing
|
||||
void setup()
|
||||
{
|
||||
|
|
@ -199,7 +210,6 @@ void setup()
|
|||
delay(1);
|
||||
|
||||
register_module(core_commands, NULL);
|
||||
|
||||
#ifdef HELP
|
||||
help_setup();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue