Skip to content

Commit

Permalink
map: Inform user that the mission download succeeded only once
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl authored and ArturoManzoli committed Sep 20, 2024
1 parent 2558995 commit f56875b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/widgets/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ const downloadMissionFromVehicle = async (): Promise<void> => {
const missionItemsInVehicle = await vehicleStore.fetchMission(loadingCallback)
missionItemsInVehicle.forEach((w) => {
missionStore.currentPlanningWaypoints.push(w)
showDialog({ variant: 'success', message: 'Mission download succeed!', timer: 2000 })
})
openSnackbar({ variant: 'success', message: 'Mission download succeed!', duration: 3000 })
} catch (error) {
showDialog({ variant: 'error', title: 'Mission download failed', message: error as string, timer: 5000 })
} finally {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/vehicle/ardupilot/ardupilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ export abstract class ArduPilotVehicle<Modes> extends Vehicle.AbstractVehicle<Mo
const initTimeDown = new Date().getTime()
let timeoutReachedDownload = false
while (!allItemsDownloaded && !timeoutReachedDownload) {
await sleep(100)
await sleep(10)
timeoutReachedDownload = new Date().getTime() - initTimeDown > 10000
loadingCallback((100 * itemToDownload) / itemsCount)

Expand Down

0 comments on commit f56875b

Please sign in to comment.