@@ -90,14 +90,17 @@ def _getCommandName(self, command: int) -> str:
9090 return f"Unknown command { command } "
9191
9292 def getCurrentMission (
93- self , mission_type : int , progressUpdateCallback : Optional [Callable ] = None
93+ self ,
94+ mission_type : int ,
95+ progressUpdateCallback : Optional [Callable [[str , float ], None ]] = None ,
9496 ) -> Response :
9597 """
9698 Get the current mission of a specific type from the drone.
9799
98100 Args:
99101 mission_type (int): The type of mission to get. 0=Mission,1=Fence,2=Rally.
100102 progressUpdateCallback (Optional[Callable]): A callback function to update the progress of the mission fetch.
103+ The callback should accept a string message and a float progress value.
101104 """
102105 mission_type_check = self ._checkMissionType (mission_type )
103106 if not mission_type_check .get ("success" ):
@@ -159,14 +162,17 @@ def getCurrentMissionAll(self) -> Response:
159162 }
160163
161164 def getMissionItems (
162- self , mission_type : int , progressUpdateCallback : Optional [Callable ] = None
165+ self ,
166+ mission_type : int ,
167+ progressUpdateCallback : Optional [Callable [[str , float ], None ]] = None ,
163168 ) -> Response :
164169 """
165170 Get all mission items of a specific type from the drone.
166171
167172 Args:
168173 mission_type (int): The type of mission to get. 0=Mission,1=Fence,2=Rally.
169174 progressUpdateCallback (Optional[Callable]): A callback function to update the progress of the mission fetch.
175+ The callback should accept a string message and a float progress value.
170176 """
171177 mission_type_check = self ._checkMissionType (mission_type )
172178 if not mission_type_check .get ("success" ):
@@ -537,7 +543,7 @@ def uploadMission(
537543 self ,
538544 mission_type : int ,
539545 waypoints : List [dict ],
540- progressUpdateCallback : Optional [Callable ] = None ,
546+ progressUpdateCallback : Optional [Callable [[ str , float ], None ] ] = None ,
541547 ) -> Response :
542548 """
543549 Uploads the current mission to the drone. This method overwrites the current loader if the upload is successful.
@@ -546,6 +552,7 @@ def uploadMission(
546552 mission_type (int): The type of mission to upload. 0=Mission,1=Fence,2=Rally.
547553 waypoints (List[dict]): The list of waypoints to upload. Each waypoint should be a dict with the required fields.
548554 progressUpdateCallback (Optional[Callable]): A callback function to update the progress of the mission writing.
555+ The callback should accept a string message and a float progress value.
549556 """
550557 mission_type_check = self ._checkMissionType (mission_type )
551558 if not mission_type_check .get ("success" ):
0 commit comments