From a0133d51923f4fdaa7ac1d8ea5f0071e02ca6428 Mon Sep 17 00:00:00 2001 From: Silver Valdvee Date: Tue, 28 Mar 2023 17:14:34 +0300 Subject: [PATCH] Fix Windows transport list lacking info, electron announce --- yukon/version.py | 2 +- yukon/web/main/main.js | 2 ++ yukon/web/modules/panels/registers.module.js | 1 - yukon/web/modules/panels/transports.module.js | 7 ++++++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/yukon/version.py b/yukon/version.py index 6567cfcc..bcbba9d6 100644 --- a/yukon/version.py +++ b/yukon/version.py @@ -1 +1 @@ -__version__ = "2023.3.41" +__version__ = "2023.3.42" diff --git a/yukon/web/main/main.js b/yukon/web/main/main.js index 3566b504..55a4c220 100644 --- a/yukon/web/main/main.js +++ b/yukon/web/main/main.js @@ -116,6 +116,8 @@ window.console = new Proxy(old_console, { if (!isRunningInElectron(yukon_state)) { zubax_api.announce_running_in_browser(); document.title = "Yukon (browser)"; + } else { + zubax_api.announce_running_in_electron(); } function setUpMonitorComponent() { diff --git a/yukon/web/modules/panels/registers.module.js b/yukon/web/modules/panels/registers.module.js index 61457500..37bb8e5e 100644 --- a/yukon/web/modules/panels/registers.module.js +++ b/yukon/web/modules/panels/registers.module.js @@ -119,7 +119,6 @@ export function add_node_id_headers(table_header_row, yukon_state) { table_header_cell.style.setProperty("max-width", widthFromSettings + "px", "important"); // Add a listener to the hover event of table_header_cell table_header_cell.addEventListener('mouseover', function () { - console.log("Mouse over node id header"); isMouseOverLoopRunning = true; let myInterval = null; myInterval = setInterval(function () { diff --git a/yukon/web/modules/panels/transports.module.js b/yukon/web/modules/panels/transports.module.js index d02ad05c..62da16b1 100644 --- a/yukon/web/modules/panels/transports.module.js +++ b/yukon/web/modules/panels/transports.module.js @@ -26,7 +26,7 @@ export function initTransports(container, yukon_state) { if (productId == 24600) { return "Dronecode probe" } else if (productId == 24775) { - return "Babel (CAN to USB)" + return "Zubax" } return null; @@ -55,9 +55,14 @@ export function initTransports(container, yukon_state) { option.disabled = true; } let device_name = port.usb_description; + // If the operating system is windows, then display detectDeviceFromProductId instead + if (window.navigator.platform == "Win32") { + device_name = detectDeviceFromProductId(port.product_id); + } if (device_name == null) { device_name = port.description; } + option.title = JSON.stringify(port); option.text = port.device + " — " + device_name; sTransport.add(option); }