@@ -271,13 +271,13 @@ def __process_autopilot_version(self, m):
271271 self .info .set_vendor_id_and_product_id (m .vendor_id , m .product_id )
272272 return ""
273273
274- def download_params (self , progress_callback = None ) -> Tuple [Dict [str , float ], Dict [str , float ]]:
274+ def download_params (self , progress_callback = None ) -> Tuple [Dict [str , float ], Dict [str , 'Par' ]]:
275275 """
276276 Requests all flight controller parameters from a MAVLink connection.
277277
278278 Returns:
279279 Dict[str, float]: A dictionary of flight controller parameters.
280- Dict[str, float ]: A dictionary of flight controller default parameters.
280+ Dict[str, Par ]: A dictionary of flight controller default parameters.
281281 """
282282 # FIXME this entire if statement is for testing only, remove it later pylint: disable=fixme
283283 if self .master is None and self .comport is not None and self .comport .device == 'test' :
@@ -332,7 +332,7 @@ def __download_params_via_mavlink(self, progress_callback=None) -> Dict[str, flo
332332 break
333333 return parameters
334334
335- def download_params_via_mavftp (self , progress_callback = None ) -> Tuple [Dict [str , float ], Dict [str , float ]]:
335+ def download_params_via_mavftp (self , progress_callback = None ) -> Tuple [Dict [str , float ], Dict [str , 'Par' ]]:
336336 # FIXME global variables should be avoided but I found no other practical way get the FTP result pylint: disable=fixme
337337 global ftp_should_run # pylint: disable=global-variable-undefined
338338 global pdict # pylint: disable=global-variable-undefined
@@ -362,7 +362,7 @@ def callback(fh):
362362 logging_info ("got %u parameter values" , len (pdict ))
363363 if pdata .defaults :
364364 for (name , value , _ptype ) in pdata .defaults :
365- defdict [name .decode ('utf-8' )] = value
365+ defdict [name .decode ('utf-8' )] = Par ( value )
366366 logging_info ("got %u parameter default values" , len (defdict ))
367367 ftp_should_run = False
368368 progress_callback (len (data ), len (data ))
0 commit comments