Skip to content

Commit

Permalink
main-vehicle: Get the main connection default path back to `/mavlink2…
Browse files Browse the repository at this point in the history
…rest`

The `:6040` path does not work with BlueSim, for example.
  • Loading branch information
rafaellehmkuhl authored and ArturoManzoli committed Jun 18, 2024
1 parent 2419431 commit 04341ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stores/mainVehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const useMainVehicleStore = defineStore('main-vehicle', () => {
const cpuLoad = ref<number>()
const globalAddress = useStorage('cockpit-vehicle-address', defaultGlobalAddress)

const defaultMainConnectionURI = ref<string>(`${ws_protocol}://${globalAddress.value}:6040/ws/mavlink`)
const defaultMainConnectionURI = ref<string>(`${ws_protocol}://${globalAddress.value}/mavlink2rest/ws/mavlink`)
const defaultWebRTCSignallingURI = ref<string>(`${ws_protocol}://${globalAddress.value}:6021/`)
const customMainConnectionURI = useStorage('cockpit-vehicle-custom-main-connection-uri', {
data: defaultMainConnectionURI.value,
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit 04341ce

Please sign in to comment.