| 1889 | // Send info to RemoteDebugApp |
| 1890 | |
| 1891 | void RemoteDebug::wsSendInfo() { |
| 1892 | |
| 1893 | // Send version, board, debugger disabled and if is low or enough memory board |
| 1894 | |
| 1895 | char features; |
| 1896 | char dbgEnabled; |
| 1897 | |
| 1898 | // Not connected ? |
| 1899 | |
| 1900 | if (!_connectedWS) { |
| 1901 | return; |
| 1902 | } |
| 1903 | |
| 1904 | // Features |
| 1905 | |
| 1906 | #ifndef DEBUGGER_ENABLED |
| 1907 | features = 'M'; // Disabled |
| 1908 | dbgEnabled = 'D'; |
| 1909 | #else |
| 1910 | if (_callbackDbgProcessCmd) { |
| 1911 | features = 'E'; // Enough |
| 1912 | dbgEnabled = 'E'; |
| 1913 | } else { |
| 1914 | features = 'M'; // Medium |
| 1915 | dbgEnabled = 'D'; |
| 1916 | } |
| 1917 | #endif |
| 1918 | |
| 1919 | // Send info |
| 1920 | |
| 1921 | String version = String(VERSION); |
| 1922 | String board; |
| 1923 | |
| 1924 | #ifdef ESP32 |
| 1925 | board = "ESP32"; |
| 1926 | #else |
| 1927 | board = "ESP8266"; |
| 1928 | #endif |
| 1929 | |
| 1930 | DebugWS.println(); // Workaround to not get dirty "[0m" ??? |
| 1931 | DebugWS.printf("$app:V:%s:%s:%c:%lu:%c:N\n", version.c_str(), board.c_str(), features, getFreeMemory(), dbgEnabled); |
| 1932 | |
| 1933 | // Status of debug level |
| 1934 | |
| 1935 | wsSendLevelInfo(); |
| 1936 | |
| 1937 | // Send status of debugger |
| 1938 | |
| 1939 | // TODO: made it |
| 1940 | |
| 1941 | } |
| 1942 | |
| 1943 | void RemoteDebug::wsSendLevelInfo() { |
| 1944 |
nothing calls this directly
no outgoing calls
no test coverage detected