MCPcopy Create free account
hub / github.com/JoaoLopesF/RemoteDebug / isActive

Method isActive

src/RemoteDebug.cpp:802–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800// Is active ? client telnet connected and level of debug equal or greater then set by user in telnet
801
802boolean RemoteDebug::isActive(uint8_t debugLevel) {
803
804 // Active ->
805 // Not in silence (new)
806 // Debug level ok and
807 // Telnet connected or
808 // Serial enabled (use only if need)
809 // Password ok (if enabled) - 18/08/18
810
811#ifndef WEBSOCKET_DISABLED // For web socket server (app)
812
813 boolean ret = (debugLevel >= _clientDebugLevel &&
814 !_silence &&
815 (_connected || _connectedWS || _serialEnabled));
816
817#else // Telnet only
818
819 boolean ret = (debugLevel >= _clientDebugLevel &&
820 !_silence &&
821 (_connected || _serialEnabled));
822
823#endif
824
825
826 if (ret) {
827 _lastDebugLevel = debugLevel;
828 }
829
830 return ret;
831
832}
833
834// Set help for commands over telnet set by sketch
835

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected