From 50feb4fb0b27757a2e8404296b2f7c5031b51ec1 Mon Sep 17 00:00:00 2001 From: Javier Balloffet Date: Sun, 16 Aug 2026 13:46:50 +0200 Subject: [PATCH] Remove unused read analog GPIO command Signed-off-by: Javier Balloffet --- andino_firmware/include/andino/app/app.h | 3 --- andino_firmware/include/andino/app/commands.h | 2 -- andino_firmware/src/app/app.cpp | 10 ---------- 3 files changed, 15 deletions(-) diff --git a/andino_firmware/include/andino/app/app.h b/andino_firmware/include/andino/app/app.h index 9dd0a96..f5a0c34 100644 --- a/andino_firmware/include/andino/app/app.h +++ b/andino_firmware/include/andino/app/app.h @@ -98,9 +98,6 @@ class App { /// Callback method for an unknown command (default). static void cmd_unknown_cb(void* context, int argc, char** argv); - /// Callback method for the `Commands::kReadAnalogGpio` command. - static void cmd_read_analog_gpio_cb(void* context, int argc, char** argv); - /// Callback method for the `Commands::kReadDigitalGpio` command. static void cmd_read_digital_gpio_cb(void* context, int argc, char** argv); diff --git a/andino_firmware/include/andino/app/commands.h b/andino_firmware/include/andino/app/commands.h index 8136f2e..e9da125 100644 --- a/andino_firmware/include/andino/app/commands.h +++ b/andino_firmware/include/andino/app/commands.h @@ -68,8 +68,6 @@ namespace andino { /// @brief CLI commands. struct Commands { - /// @brief Reads an analog GPIO. - static constexpr const char* kReadAnalogGpio{"a"}; /// @brief Reads a digital GPIO. static constexpr const char* kReadDigitalGpio{"d"}; /// @brief Reads the encoders tick count values. diff --git a/andino_firmware/src/app/app.cpp b/andino_firmware/src/app/app.cpp index 1b04435..424cef8 100644 --- a/andino_firmware/src/app/app.cpp +++ b/andino_firmware/src/app/app.cpp @@ -97,7 +97,6 @@ void App::setup() { // Initialize command shell. shell_.set_serial_stream(&serial_stream_); shell_.set_default_callback(cmd_unknown_cb); - shell_.register_command(Commands::kReadAnalogGpio, cmd_read_analog_gpio_cb, this); shell_.register_command(Commands::kReadDigitalGpio, cmd_read_digital_gpio_cb, this); shell_.register_command(Commands::kReadEncoders, cmd_read_encoders_cb, this); shell_.register_command(Commands::kResetEncoders, cmd_reset_encoders_cb, this); @@ -140,15 +139,6 @@ void App::cmd_unknown_cb(void*, int, char**) { Serial.println("Unknown command."); } -void App::cmd_read_analog_gpio_cb(void*, int argc, char** argv) { - if (argc < 2) { - return; - } - - const int pin = atoi(argv[1]); - Serial.println(analogRead(pin)); -} - void App::cmd_read_digital_gpio_cb(void*, int argc, char** argv) { if (argc < 2) { return;