Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions core/frontend/src/components/wizard/Wizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@
</v-row>
</v-stepper-content>
<v-stepper-content step="2">
<v-alert
v-if="board_not_detected"
type="warning"
class="ma-2"
dense
>
No flight controller detected.
</v-alert>
<div class="d-flex justify-space-between">
<model-viewer
v-if="model_viewer_supported && model_viewer_ready"
Expand Down Expand Up @@ -300,6 +308,7 @@ import Vue from 'vue'

import {
availableFirmwares,
fetchCurrentBoard,
fetchFirmwareInfo,
installFirmwareFromUrl,
} from '@/components/autopilot/AutopilotManagerUpdater'
Expand Down Expand Up @@ -386,6 +395,7 @@ export default Vue.extend({
configuration_page_index: 0,
model_viewer_supported: MODEL_VIEWER_SUPPORTED,
model_viewer_ready: false,
board_not_detected: false,
}
},
computed: {
Expand Down Expand Up @@ -526,7 +536,13 @@ export default Vue.extend({
? ApplyStatus.Done : ApplyStatus.Failed
this.retry_count += 1
},
setupBoat() {
async setupBoat() {
await fetchCurrentBoard()
if (!autopilot.current_board) {
this.board_not_detected = true
return
}
this.board_not_detected = false
this.vehicle_type = Vehicle.Rover
this.vehicle_name = 'BlueBoat'
this.vehicle_image = '/assets/vehicles/images/bb120.png'
Expand Down Expand Up @@ -586,7 +602,13 @@ export default Vue.extend({
this.finalConfigurations()
}
},
setupROV() {
async setupROV() {
await fetchCurrentBoard()
if (!autopilot.current_board) {
this.board_not_detected = true
return
}
this.board_not_detected = false
this.vehicle_type = Vehicle.Sub
this.vehicle_name = 'BlueROV'
this.vehicle_image = '/assets/vehicles/images/bluerov2.png'
Expand Down Expand Up @@ -661,6 +683,11 @@ export default Vue.extend({
.catch((error) => `Failed to disable smart wifi hotspot: ${error.message ?? error.response?.data}.`)
},
async installLatestStableFirmware(vehicle: Vehicle): Promise<ConfigurationStatus> {
await fetchCurrentBoard()
if (!autopilot.current_board) {
return 'No flight controller board detected.'
}

if (this.retry_count) {
console.debug('Going to reboot flight controller on retry.')
mavlink2rest.sendMessage(
Expand Down