Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions radio/app/controllers/missionController.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,11 +799,11 @@ def exportMissionToFile(
if loader.count() == 0:
return {
"success": False,
"message": f"No waypoints loaded for the mission type of {mission_type}",
"message": f"No waypoints loaded for the mission type of {self._getMissionName(mission_type)}",
}

self.drone.logger.debug(
f"Exporting waypoint file to {file_path} for mission type {mission_type}"
f"Exporting waypoint file to {file_path} for mission type {self._getMissionName(mission_type)}"
)

try:
Expand Down
2 changes: 1 addition & 1 deletion radio/app/endpoints/mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def importMissionFromFile(data: ImportMissionFileType) -> None:
"import_mission_result",
{
"success": True,
"message": "Mission imported successfully.",
"message": result.get("message", ""),
"items": result.get("data", []),
"mission_type": mission_type,
},
Expand Down
14 changes: 14 additions & 0 deletions radio/tests/mission_test_files/exported_fence_check.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
QGC WPL 110
0 0 0 5001 6.000000 0.000000 0.000000 0.000000 52.781462 -0.710571 0.000000 0
1 0 0 5001 6.000000 0.000000 0.000000 0.000000 52.781053 -0.710292 0.000000 0
2 0 0 5001 6.000000 0.000000 0.000000 0.000000 52.780034 -0.710839 0.000000 0
3 0 0 5001 6.000000 0.000000 0.000000 0.000000 52.781851 -0.703543 0.000000 0
4 0 0 5001 6.000000 0.000000 0.000000 0.000000 52.783058 -0.706011 0.000000 0
5 0 0 5001 6.000000 0.000000 0.000000 0.000000 52.782546 -0.708157 0.000000 0
6 0 0 5004 25.000000 0.000000 0.000000 0.000000 52.779658 -0.709216 0.000000 0
7 0 0 5003 50.000000 0.000000 0.000000 0.000000 52.780190 -0.704402 0.000000 0
8 0 0 5002 5.000000 0.000000 0.000000 0.000000 52.782825 -0.706108 0.000000 0
9 0 0 5002 5.000000 0.000000 0.000000 0.000000 52.781871 -0.704155 0.000000 0
10 0 0 5002 5.000000 0.000000 0.000000 0.000000 52.781449 -0.705818 0.000000 0
11 0 0 5002 5.000000 0.000000 0.000000 0.000000 52.782189 -0.705807 0.000000 0
12 0 0 5002 5.000000 0.000000 0.000000 0.000000 52.782636 -0.706891 0.000000 0
9 changes: 9 additions & 0 deletions radio/tests/mission_test_files/exported_mission_check.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
QGC WPL 110
0 0 0 16 0.000000 0.000000 0.000000 0.000000 52.780569 -0.707924 0.100000 1
1 0 3 22 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 30.000000 1
2 0 3 16 0.000000 0.000000 0.000000 0.000000 52.780320 -0.709793 30.000000 1
3 0 3 16 0.000000 0.000000 0.000000 0.000000 52.781228 -0.709895 30.000000 1
4 0 3 16 0.000000 0.000000 0.000000 0.000000 52.781699 -0.707953 30.000000 1
5 0 3 16 0.000000 0.000000 0.000000 0.000000 52.781442 -0.705716 30.000000 1
6 0 3 16 0.000000 0.000000 0.000000 0.000000 52.780797 -0.706596 30.000000 1
7 0 3 21 0.000000 0.000000 0.000000 1.000000 52.780440 -0.708200 0.000000 1
3 changes: 3 additions & 0 deletions radio/tests/mission_test_files/exported_rally_check.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
QGC WPL 110
0 0 3 5100 0.000000 0.000000 0.000000 0.000000 52.781001 -0.709487 10.000000 0
1 0 3 5100 0.000000 0.000000 0.000000 0.000000 52.782111 -0.705678 10.000000 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
{
"success": true,
"message": "Waypoint file loaded 13 points successfully",
"mission_type": "fence",
"items": [
{
"autocontinue": 1,
"command": 5001,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 6.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 0,
"target_component": 0,
"target_system": 1,
"x": 527814618,
"y": -7105708,
"z": 0.0
},
{
"autocontinue": 1,
"command": 5001,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 6.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 1,
"target_component": 0,
"target_system": 1,
"x": 527810530,
"y": -7102918,
"z": 1.0
},
{
"autocontinue": 1,
"command": 5001,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 6.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 2,
"target_component": 0,
"target_system": 1,
"x": 527800342,
"y": -7108390,
"z": 2.0
},
{
"autocontinue": 1,
"command": 5001,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 6.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 3,
"target_component": 0,
"target_system": 1,
"x": 527818512,
"y": -7035434,
"z": 3.0
},
{
"autocontinue": 1,
"command": 5001,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 6.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 4,
"target_component": 0,
"target_system": 1,
"x": 527830582,
"y": -7060110,
"z": 4.0
},
{
"autocontinue": 1,
"command": 5001,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 6.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 5,
"target_component": 0,
"target_system": 1,
"x": 527825456,
"y": -7081568,
"z": 5.0
},
{
"autocontinue": 1,
"command": 5004,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 25.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 6,
"target_component": 0,
"target_system": 1,
"x": 527796578,
"y": -7092163,
"z": 0.0
},
{
"autocontinue": 1,
"command": 5003,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 50.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 7,
"target_component": 0,
"target_system": 1,
"x": 527801900,
"y": -7044017,
"z": 0.0
},
{
"autocontinue": 1,
"command": 5002,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 5.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 8,
"target_component": 0,
"target_system": 1,
"x": 527828246,
"y": -7061076,
"z": 0.0
},
{
"autocontinue": 1,
"command": 5002,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 5.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 9,
"target_component": 0,
"target_system": 1,
"x": 527818707,
"y": -7041549,
"z": 1.0
},
{
"autocontinue": 1,
"command": 5002,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 5.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 10,
"target_component": 0,
"target_system": 1,
"x": 527814489,
"y": -7058179,
"z": 2.0
},
{
"autocontinue": 1,
"command": 5002,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 5.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 11,
"target_component": 0,
"target_system": 1,
"x": 527821887,
"y": -7058072,
"z": 3.0
},
{
"autocontinue": 1,
"command": 5002,
"current": 0,
"frame": 3,
"mavpackettype": "MISSION_ITEM",
"mission_type": 1,
"param1": 5.0,
"param2": 0.0,
"param3": 0.0,
"param4": 0.0,
"seq": 12,
"target_component": 0,
"target_system": 1,
"x": 527826364,
"y": -7068908,
"z": 4.0
}
]
}
Loading
Loading