diff --git a/components/i2c/example/main/i2c_menu.hpp b/components/i2c/example/main/i2c_menu.hpp index fb498c78e..4a6136a02 100644 --- a/components/i2c/example/main/i2c_menu.hpp +++ b/components/i2c/example/main/i2c_menu.hpp @@ -12,8 +12,9 @@ class I2cMenu { public: explicit I2cMenu(std::reference_wrapper i2c) : i2c_(i2c) {} - std::unique_ptr get() { - auto i2c_menu = std::make_unique("i2c", "I2c menu"); + std::unique_ptr get(std::string_view name = "i2c", + std::string_view description = "I2c menu") { + auto i2c_menu = std::make_unique(std::string(name), std::string(description)); // set the log verbosity for the i2c bus i2c_menu->Insert(