File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ def getMissionItems(
231231
232232 if progressUpdateCallback :
233233 progressUpdateCallback (
234- f"Received count of { response .count } waypoints" , 0
234+ f"Received count of { response .count } waypoints" , 0.0
235235 )
236236
237237 self .drone .is_listening = True
@@ -253,7 +253,7 @@ def getMissionItems(
253253 if item_response_data :
254254 loader .add (item_response_data )
255255
256- if progressUpdateCallback :
256+ if progressUpdateCallback and response . count != 0 :
257257 progressUpdateCallback (
258258 f"Received waypoint { i + 1 } " , (i + 1 ) / response .count
259259 )
@@ -611,7 +611,7 @@ def uploadMission(
611611 )
612612 self .drone .master .mav .send (new_loader .item (response .seq ))
613613
614- if progressUpdateCallback :
614+ if progressUpdateCallback and new_loader . count () != 0 :
615615 progressUpdateCallback (
616616 f"Sending waypoint { response .seq + 1 } " ,
617617 (response .seq + 1 ) / (new_loader .count ()),
Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ def test_writeCurrentMission_correctState(
365365 }
366366
367367 socketio_client .emit ("write_current_mission" , data )
368- socketio_result = socketio_client .get_received ()[0 ]
368+ socketio_result = socketio_client .get_received ()[- 1 ]
369369
370370 assert socketio_result ["name" ] == "write_mission_result"
371371 assert socketio_result ["args" ][0 ] == {
You can’t perform that action at this time.
0 commit comments