Skip to content

Commit

Permalink
minor update to i2c menu to enable easier reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
finger563 committed Feb 11, 2024
1 parent 892827a commit b5d86c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/i2c/example/main/i2c_menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ class I2cMenu {
public:
explicit I2cMenu(std::reference_wrapper<espp::I2c> i2c) : i2c_(i2c) {}

std::unique_ptr<cli::Menu> get() {
auto i2c_menu = std::make_unique<cli::Menu>("i2c", "I2c menu");
std::unique_ptr<cli::Menu> get(std::string_view name = "i2c",
std::string_view description = "I2c menu") {
auto i2c_menu = std::make_unique<cli::Menu>(std::string(name), std::string(description));

// set the log verbosity for the i2c bus
i2c_menu->Insert(
Expand Down

0 comments on commit b5d86c6

Please sign in to comment.