This commit is contained in:
Your Name
2024-02-16 19:18:18 -06:00
parent 915d8a058a
commit 19673dc652
3 changed files with 15 additions and 8 deletions

View File

@@ -18,7 +18,7 @@ class Watcher:
def log_watch(var_name, message): def log_watch(var_name, message):
global watcher_sock global watcher_sock
ensure_socket_connected() # Ensure the socket is connected before attempting to log self.ensure_socket_connected() # Ensure the socket is connected before attempting to log
if watcher_sock: # Proceed only if sock is not None (i.e., is connected) if watcher_sock: # Proceed only if sock is not None (i.e., is connected)
message_json = json.dumps(message) message_json = json.dumps(message)
try: try:

View File

@@ -448,14 +448,14 @@ SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) {
QList<QPair<QString, QWidget *>> panels = { QList<QPair<QString, QWidget *>> panels = {
{tr("Basic"), toggles}, {tr("Basic"), toggles},
{tr("Customization"), frogpilotVisuals}, {tr("Interface"), frogpilotVisuals},
{tr("Advanced"), frogpilotControls}, {tr("Advanced"), frogpilotControls},
{tr("System"), new Networking(this)}, {tr("System"), new Networking(this)},
{tr("Extras"), device}, {tr("Extras"), device},
// {tr("Navigation"), new FrogPilotNavigationPanel(this)}, // {tr("Navigation"), new FrogPilotNavigationPanel(this)},
// {tr("Vehicles"), new FrogPilotVehiclesPanel(this)}, // {tr("Vehicles"), new FrogPilotVehiclesPanel(this)},
// {tr("Visuals"), frogpilotVisuals}, // {tr("Visuals"), frogpilotVisuals},
// {tr("Device"), device}, {tr("Device"), device},
}; };
nav_btns = new QButtonGroup(this); nav_btns = new QButtonGroup(this);

View File

@@ -5,7 +5,7 @@
<title>WebSocket Test</title> <title>WebSocket Test</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script> <script>
$(document).ready(function() { let connect = function() {
let host = window.location.host; let host = window.location.host;
if (host.indexOf(":") != -1) { if (host.indexOf(":") != -1) {
@@ -25,7 +25,14 @@
ws.onclose = function() { ws.onclose = function() {
console.log('WebSocket connection closed'); console.log('WebSocket connection closed');
setTimeout(function() {
connect();
}, 5000);
}; };
};
$(document).ready(function() {
connect();
}); });
</script> </script>
</head> </head>