Skip to content

Commit

Permalink
Rename init method from Shell class (#219)
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Balloffet <[email protected]>
  • Loading branch information
jballoffet authored Feb 14, 2024
1 parent 0a8b443 commit d3b8315
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion andino_firmware/src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void App::setup() {
right_pid_controller_.reset(right_encoder_.read());

// Initialize command shell.
shell_.init(Serial);
shell_.begin(Serial);
shell_.set_default_callback(cmd_unknown_cb);
shell_.register_command(Commands::kReadAnalogGpio, cmd_read_analog_gpio_cb);
shell_.register_command(Commands::kReadDigitalGpio, cmd_read_digital_gpio_cb);
Expand Down
2 changes: 1 addition & 1 deletion andino_firmware/src/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

namespace andino {

void Shell::init(Stream& stream) { stream_ = &stream; }
void Shell::begin(Stream& stream) { stream_ = &stream; }

void Shell::set_default_callback(CommandCallback callback) { default_callback_ = callback; }

Expand Down
2 changes: 1 addition & 1 deletion andino_firmware/src/shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Shell {
/// @brief Initializes the shell.
///
/// @param stream Data stream.
void init(Stream& stream);
void begin(Stream& stream);

/// @brief Sets the default callback for unknown commands.
///
Expand Down

0 comments on commit d3b8315

Please sign in to comment.