diff --git a/src/main.cpp b/src/main.cpp index ba48ed3..6c5e692 100644 --- a/src/main.cpp +++ b/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