diff --git a/src/js/serial_backend.js b/src/js/serial_backend.js index 37cd4ae02f..82f9658190 100644 --- a/src/js/serial_backend.js +++ b/src/js/serial_backend.js @@ -61,13 +61,13 @@ export function initializeSerialBackend() { EventBus.$on("port-handler:auto-select-serial-device", function () { if ( - !GUI.connected_to && - !GUI.connecting_to && - !["cli", "firmware_flasher"].includes(GUI.active_tab) && - PortHandler.portPicker.autoConnect && - !isCliOnlyMode() && - (connectionTimestamp === null || connectionTimestamp > 0) || - (Date.now() - rebootTimestamp <= REBOOT_CONNECT_MAX_TIME_MS) + (!GUI.connected_to && + !GUI.connecting_to && + !["cli", "firmware_flasher"].includes(GUI.active_tab) && + PortHandler.portPicker.autoConnect && + !isCliOnlyMode() && + (connectionTimestamp === null || connectionTimestamp > 0)) || + Date.now() - rebootTimestamp <= REBOOT_CONNECT_MAX_TIME_MS ) { connectDisconnect(); } @@ -601,6 +601,11 @@ function finishOpen() { if (FC.CONFIG.buildOptions.some((opt) => opt.includes("USE_WING")) && !GUI.allowedTabs.includes("servos")) { GUI.allowedTabs.push("servos"); } + + // CORE_BUILD should include OSD + if (FC.CONFIG.buildOptions.includes("CORE_BUILD")) { + GUI.allowedTabs.push("osd"); + } } else { GUI.allowedTabs = Array.from(GUI.defaultAllowedFCTabsWhenConnected); }