diff --git a/fantemp/terminal.hpp b/fantemp/terminal.hpp index dd9e017..95bbeba 100644 --- a/fantemp/terminal.hpp +++ b/fantemp/terminal.hpp @@ -89,6 +89,8 @@ class Terminal { printHelp(); } else if (strncmp_P(m_inputBuffer, reinterpret_cast(SHOW_CMD), m_inputSize) == 0) { showState(); + } else { + printUnknown(); } } } @@ -112,6 +114,14 @@ class Terminal { m_serial << F("Temperature .: ") << floatBuffer << F(" C") << ENDL; m_serial << F("Fan speed ...: ") << Controller::m_fanSpeed << F("%") << ENDL; } + + static void printUnknown() + { + m_serial << F("Unknown command \""); + for (uint16_t i = 0; i < m_inputSize; ++i) + m_serial << static_cast(m_inputBuffer[i]); + m_serial << F("\"") << ENDL; + } }; template