| 1789 | // Silence |
| 1790 | |
| 1791 | void RemoteDebug::silence(boolean activate, boolean showMessage, boolean fromBreak, uint32_t timeout) { |
| 1792 | |
| 1793 | // Set silence and timeout |
| 1794 | |
| 1795 | if (showMessage) { |
| 1796 | |
| 1797 | if (activate) { |
| 1798 | |
| 1799 | debugPrintln("* Debug now is in silent mode!"); |
| 1800 | #ifndef WEBSOCKET_DISABLED // For web socket server (app) |
| 1801 | if (_connectedWS) { |
| 1802 | debugPrintln("* Press button \"Silence\" or another command to return show debugs"); |
| 1803 | } else { |
| 1804 | debugPrintln("* Press s again or another command to return show debugs"); |
| 1805 | } |
| 1806 | #else |
| 1807 | debugPrintln("* Press s again or another command to return show debugs"); |
| 1808 | #endif |
| 1809 | } else { |
| 1810 | |
| 1811 | debugPrintln("* Debug now exit from silent mode!"); |
| 1812 | } |
| 1813 | } |
| 1814 | |
| 1815 | // Set it |
| 1816 | |
| 1817 | _silence = activate; |
| 1818 | _silenceTimeout = (timeout == 0)?0:(millis() + timeout); |
| 1819 | |
| 1820 | #ifndef WEBSOCKET_DISABLED // For web socket server (app) |
| 1821 | |
| 1822 | // Send status to app |
| 1823 | |
| 1824 | if (_connectedWS) { |
| 1825 | DebugWS.printf("$app:S:%c\n", ((_silence)? '1':'0')); |
| 1826 | } |
| 1827 | |
| 1828 | #endif |
| 1829 | |
| 1830 | } |
| 1831 | |
| 1832 | boolean RemoteDebug::isSilence() { |
| 1833 |
nothing calls this directly
no outgoing calls
no test coverage detected