From 04341ce45a15dee25e14dabb34da45d1bdaff623 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Tue, 18 Jun 2024 15:36:59 -0300 Subject: [PATCH] main-vehicle: Get the main connection default path back to `/mavlink2rest` The `:6040` path does not work with BlueSim, for example. --- src/stores/mainVehicle.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stores/mainVehicle.ts b/src/stores/mainVehicle.ts index 64e5ec3ec..c0f061f24 100644 --- a/src/stores/mainVehicle.ts +++ b/src/stores/mainVehicle.ts @@ -65,7 +65,7 @@ export const useMainVehicleStore = defineStore('main-vehicle', () => { const cpuLoad = ref() const globalAddress = useStorage('cockpit-vehicle-address', defaultGlobalAddress) - const defaultMainConnectionURI = ref(`${ws_protocol}://${globalAddress.value}:6040/ws/mavlink`) + const defaultMainConnectionURI = ref(`${ws_protocol}://${globalAddress.value}/mavlink2rest/ws/mavlink`) const defaultWebRTCSignallingURI = ref(`${ws_protocol}://${globalAddress.value}:6021/`) const customMainConnectionURI = useStorage('cockpit-vehicle-custom-main-connection-uri', { data: defaultMainConnectionURI.value, @@ -319,6 +319,7 @@ export const useMainVehicleStore = defineStore('main-vehicle', () => { ConnectionManager.onMainConnection.add(() => { const newMainConnection = ConnectionManager.mainConnection() + console.log('Main connection changed:', newMainConnection?.uri().toString()) if (newMainConnection !== undefined) { customMainConnectionURI.value.data = newMainConnection.uri().toString() }