Improve mission data persistence on flight mode#2403
Improve mission data persistence on flight mode#2403ArturoManzoli merged 4 commits intobluerobotics:masterfrom
Conversation
e149f34 to
5145c40
Compare
| seq: 0, | ||
| frame: { type: MavFrame.MAV_FRAME_GLOBAL_RELATIVE_ALT }, | ||
| command: { type: MavCmd.MAV_CMD_GET_HOME_POSITION }, | ||
| command: { type: MavCmd.MAV_CMD_NAV_WAYPOINT }, |
There was a problem hiding this comment.
Was this working at all?
If not, the commit message should mention that as a fix.
There was a problem hiding this comment.
Indeed, it wasn't working. I'll reword the commit message
src/views/MissionPlanningView.vue
Outdated
| await nextTick() | ||
| if (vehicleStore.isVehicleOnline && !home.value && planningMap.value) { | ||
| try { | ||
| const homeWaypoint = await vehicleStore.fetchHomeWaypoint() | ||
| if (homeWaypoint?.coordinates) { | ||
| home.value = homeWaypoint.coordinates | ||
| } | ||
| } catch (error) { | ||
| console.error('Failed to fetch home waypoint:', error) | ||
| } | ||
| } |
There was a problem hiding this comment.
Since both changes (here and line 3263) are doing the same thing, can we make a function and reuse it?
| } | ||
| } | ||
|
|
||
| // There are small differences in the waypoint data between the one downloaded from the vehicle and the stored mission. |
There was a problem hiding this comment.
Nice catch here!
One question: should this be done in the mission planning view as well? If so, should we store that method in the store for reuse?
There was a problem hiding this comment.
Mission planning does not handle automatic mission downloads from the vehicle as Map does. The only option is a button that will overwrite what is currently on the planning map.
With that said, I don't think this method will be needed soon on Mission Planning. If we end up needing that, we extract it to the store on demand.
|
Apart from the code comments, the functionality itself appears to be working! |
…ET_HOME_POSITION command Signed-off-by: Arturo Manzoli <[email protected]>
5145c40 to
69ccb19
Compare
…y if already defined Signed-off-by: Arturo Manzoli <[email protected]>
…is back online Signed-off-by: Arturo Manzoli <[email protected]>
Signed-off-by: Arturo Manzoli <[email protected]>
69ccb19 to
5db5e9b
Compare
There was a problem hiding this comment.
I have disconnected my vehicle ethernet cable and connected back, and it re-downloaded the mission. Is this the expected behavior?
Also if I switch back and fourth from the mission planning mode, it always re-downloads the mission when the Map widget is opened.
That's weird. Are you sure you have the earliest version of the branch? I've pushed some modifications 18h ago. Both things you mentioned should be solved. |
Indeed! I was using the original version of the branch, where the problem still occurred. In the updated version its working flawleslly! |
Close #2364
Close #2365
Close #2163
Close #2143