From aa1264cf91cf9509d25708e83f046c42aa1f1029 Mon Sep 17 00:00:00 2001 From: Totoo Date: Tue, 27 May 2025 09:18:33 +0200 Subject: [PATCH] getres cmd (#2671) --- firmware/application/usb_serial_shell.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/firmware/application/usb_serial_shell.cpp b/firmware/application/usb_serial_shell.cpp index ecb17ef66..64b51d3ca 100644 --- a/firmware/application/usb_serial_shell.cpp +++ b/firmware/application/usb_serial_shell.cpp @@ -1375,6 +1375,13 @@ static void cmd_setfreq(BaseSequentialStream* chp, int argc, char* argv[]) { chprintf(chp, "ok\r\n"); } +static void cmd_getres(BaseSequentialStream* chp, int argc, char* argv[]) { + (void)argc; + (void)argv; + std::string res = to_string_dec_uint(screen_width) + "x" + to_string_dec_uint(screen_height) + "\r\nok\r\n"; + chprintf(chp, res.c_str()); +} + static const ShellCommand commands[] = { {"reboot", cmd_reboot}, {"dfu", cmd_dfu}, @@ -1410,6 +1417,7 @@ static const ShellCommand commands[] = { {"sendpocsag", cmd_sendpocsag}, {"asyncmsg", cmd_asyncmsg}, {"setfreq", cmd_setfreq}, + {"getres", cmd_getres}, {NULL, NULL}}; static const ShellConfig shell_cfg1 = {