diff --git a/flix/cli.ino b/flix/cli.ino index cfe0664..36d281d 100644 --- a/flix/cli.ino +++ b/flix/cli.ino @@ -78,6 +78,8 @@ void doCommand(String str, bool echo = false) { print("> %s\n", str.c_str()); } + command.toLowerCase(); + // execute command if (command == "help" || command == "motd") { print("%s\n", motd); diff --git a/gazebo/Arduino.h b/gazebo/Arduino.h index 77841cf..775d0fc 100644 --- a/gazebo/Arduino.h +++ b/gazebo/Arduino.h @@ -52,6 +52,10 @@ public: this->erase(0, this->find_first_not_of(" \t\n\r")); this->erase(this->find_last_not_of(" \t\n\r") + 1); } + void toLowerCase() { + std::transform(this->begin(), this->end(), this->begin(), + [](unsigned char c) { return std::tolower(c); }); + } }; class Print;