diff --git a/consolereader.cpp b/consolereader.cpp index b6b101a..2ce42d1 100644 --- a/consolereader.cpp +++ b/consolereader.cpp @@ -134,15 +134,21 @@ void ConsoleReader::listSockets() } std::cout << "a - add unpaired socket (WiFi needed)\n"; std::cout << "A - add unpaired socket (no WiFi needed)\n"; - std::cout << "d - update table data\n"; - std::cout << "D - resend discovery packet to the current socket\n"; - std::cout << "n - change socket name (max 16 characters)\n"; - std::cout << "o - set switch off timer\n"; - std::cout << "O - enable/disable switch off timer\n"; - std::cout << "p - toggle power state (there are also \"on\" and \"off\" commands)\n"; - std::cout << "P - change remote password (max 12 characters)\nq - quit\ns - select another socket (default is 1)\n"; - std::cout << "t - change timezone" << std::endl; - std::cout << "Enter command: " << std::endl; + if (sockets->size() > 0) { + std::cout << "d - update table data\n"; + std::cout << "D - resend discovery packet to the current socket\n"; + std::cout << "n - change socket name (max 16 characters)\n"; + std::cout << "o - set switch off timer\n"; + std::cout << "O - enable/disable switch off timer\n"; + std::cout << "p - toggle power state (there are also \"on\" and \"off\" commands)\n"; + std::cout << "P - change remote password (max 12 characters)\n"; + } + std::cout << "q - quit\n"; + if (sockets->size() > 0) { + std::cout << "s - select another socket (default is 1)\n"; + std::cout << "t - change timezone" << std::endl; + } + std::cout << "Enter command: " << std::endl; } void ConsoleReader::connectSignals()