Skip to content

Commit ea70be2

Browse files
authored
Merge pull request mavlink#401 from mavlink/pr-update
Update mavsdk_server version and proto submodule
2 parents 927ff95 + 2f627b3 commit ea70be2

31 files changed

+376
-337
lines changed

MAVSDK_SERVER_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.44.0
1+
v0.46.1

mavsdk/action.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def __init__(
206206
self.result = result
207207
self.result_str = result_str
208208

209-
def __equals__(self, to_compare):
209+
def __eq__(self, to_compare):
210210
""" Checks if two ActionResult are the same """
211211
try:
212212
# Try to compare - this likely fails when it is compared to a non
@@ -308,7 +308,7 @@ async def arm(self):
308308

309309
result = self._extract_result(response)
310310

311-
if result.result is not ActionResult.Result.SUCCESS:
311+
if result.result != ActionResult.Result.SUCCESS:
312312
raise ActionError(result, "arm()")
313313

314314

@@ -331,7 +331,7 @@ async def disarm(self):
331331

332332
result = self._extract_result(response)
333333

334-
if result.result is not ActionResult.Result.SUCCESS:
334+
if result.result != ActionResult.Result.SUCCESS:
335335
raise ActionError(result, "disarm()")
336336

337337

@@ -356,7 +356,7 @@ async def takeoff(self):
356356

357357
result = self._extract_result(response)
358358

359-
if result.result is not ActionResult.Result.SUCCESS:
359+
if result.result != ActionResult.Result.SUCCESS:
360360
raise ActionError(result, "takeoff()")
361361

362362

@@ -378,7 +378,7 @@ async def land(self):
378378

379379
result = self._extract_result(response)
380380

381-
if result.result is not ActionResult.Result.SUCCESS:
381+
if result.result != ActionResult.Result.SUCCESS:
382382
raise ActionError(result, "land()")
383383

384384

@@ -400,7 +400,7 @@ async def reboot(self):
400400

401401
result = self._extract_result(response)
402402

403-
if result.result is not ActionResult.Result.SUCCESS:
403+
if result.result != ActionResult.Result.SUCCESS:
404404
raise ActionError(result, "reboot()")
405405

406406

@@ -424,7 +424,7 @@ async def shutdown(self):
424424

425425
result = self._extract_result(response)
426426

427-
if result.result is not ActionResult.Result.SUCCESS:
427+
if result.result != ActionResult.Result.SUCCESS:
428428
raise ActionError(result, "shutdown()")
429429

430430

@@ -446,7 +446,7 @@ async def terminate(self):
446446

447447
result = self._extract_result(response)
448448

449-
if result.result is not ActionResult.Result.SUCCESS:
449+
if result.result != ActionResult.Result.SUCCESS:
450450
raise ActionError(result, "terminate()")
451451

452452

@@ -469,7 +469,7 @@ async def kill(self):
469469

470470
result = self._extract_result(response)
471471

472-
if result.result is not ActionResult.Result.SUCCESS:
472+
if result.result != ActionResult.Result.SUCCESS:
473473
raise ActionError(result, "kill()")
474474

475475

@@ -493,7 +493,7 @@ async def return_to_launch(self):
493493

494494
result = self._extract_result(response)
495495

496-
if result.result is not ActionResult.Result.SUCCESS:
496+
if result.result != ActionResult.Result.SUCCESS:
497497
raise ActionError(result, "return_to_launch()")
498498

499499

@@ -536,7 +536,7 @@ async def goto_location(self, latitude_deg, longitude_deg, absolute_altitude_m,
536536

537537
result = self._extract_result(response)
538538

539-
if result.result is not ActionResult.Result.SUCCESS:
539+
if result.result != ActionResult.Result.SUCCESS:
540540
raise ActionError(result, "goto_location()", latitude_deg, longitude_deg, absolute_altitude_m, yaw_deg)
541541

542542

@@ -587,7 +587,7 @@ async def do_orbit(self, radius_m, velocity_ms, yaw_behavior, latitude_deg, long
587587

588588
result = self._extract_result(response)
589589

590-
if result.result is not ActionResult.Result.SUCCESS:
590+
if result.result != ActionResult.Result.SUCCESS:
591591
raise ActionError(result, "do_orbit()", radius_m, velocity_ms, yaw_behavior, latitude_deg, longitude_deg, absolute_altitude_m)
592592

593593

@@ -613,7 +613,7 @@ async def hold(self):
613613

614614
result = self._extract_result(response)
615615

616-
if result.result is not ActionResult.Result.SUCCESS:
616+
if result.result != ActionResult.Result.SUCCESS:
617617
raise ActionError(result, "hold()")
618618

619619

@@ -643,7 +643,7 @@ async def set_actuator(self, index, value):
643643

644644
result = self._extract_result(response)
645645

646-
if result.result is not ActionResult.Result.SUCCESS:
646+
if result.result != ActionResult.Result.SUCCESS:
647647
raise ActionError(result, "set_actuator()", index, value)
648648

649649

@@ -667,7 +667,7 @@ async def transition_to_fixedwing(self):
667667

668668
result = self._extract_result(response)
669669

670-
if result.result is not ActionResult.Result.SUCCESS:
670+
if result.result != ActionResult.Result.SUCCESS:
671671
raise ActionError(result, "transition_to_fixedwing()")
672672

673673

@@ -691,7 +691,7 @@ async def transition_to_multicopter(self):
691691

692692
result = self._extract_result(response)
693693

694-
if result.result is not ActionResult.Result.SUCCESS:
694+
if result.result != ActionResult.Result.SUCCESS:
695695
raise ActionError(result, "transition_to_multicopter()")
696696

697697

@@ -716,7 +716,7 @@ async def get_takeoff_altitude(self):
716716

717717
result = self._extract_result(response)
718718

719-
if result.result is not ActionResult.Result.SUCCESS:
719+
if result.result != ActionResult.Result.SUCCESS:
720720
raise ActionError(result, "get_takeoff_altitude()")
721721

722722

@@ -745,7 +745,7 @@ async def set_takeoff_altitude(self, altitude):
745745

746746
result = self._extract_result(response)
747747

748-
if result.result is not ActionResult.Result.SUCCESS:
748+
if result.result != ActionResult.Result.SUCCESS:
749749
raise ActionError(result, "set_takeoff_altitude()", altitude)
750750

751751

@@ -770,7 +770,7 @@ async def get_maximum_speed(self):
770770

771771
result = self._extract_result(response)
772772

773-
if result.result is not ActionResult.Result.SUCCESS:
773+
if result.result != ActionResult.Result.SUCCESS:
774774
raise ActionError(result, "get_maximum_speed()")
775775

776776

@@ -799,7 +799,7 @@ async def set_maximum_speed(self, speed):
799799

800800
result = self._extract_result(response)
801801

802-
if result.result is not ActionResult.Result.SUCCESS:
802+
if result.result != ActionResult.Result.SUCCESS:
803803
raise ActionError(result, "set_maximum_speed()", speed)
804804

805805

@@ -824,7 +824,7 @@ async def get_return_to_launch_altitude(self):
824824

825825
result = self._extract_result(response)
826826

827-
if result.result is not ActionResult.Result.SUCCESS:
827+
if result.result != ActionResult.Result.SUCCESS:
828828
raise ActionError(result, "get_return_to_launch_altitude()")
829829

830830

@@ -853,6 +853,6 @@ async def set_return_to_launch_altitude(self, relative_altitude_m):
853853

854854
result = self._extract_result(response)
855855

856-
if result.result is not ActionResult.Result.SUCCESS:
856+
if result.result != ActionResult.Result.SUCCESS:
857857
raise ActionError(result, "set_return_to_launch_altitude()", relative_altitude_m)
858858

mavsdk/action_server.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def __init__(
171171
self.can_guided_mode = can_guided_mode
172172
self.can_stabilize_mode = can_stabilize_mode
173173

174-
def __equals__(self, to_compare):
174+
def __eq__(self, to_compare):
175175
""" Checks if two AllowableFlightModes are the same """
176176
try:
177177
# Try to compare - this likely fails when it is compared to a non
@@ -256,7 +256,7 @@ def __init__(
256256
self.arm = arm
257257
self.force = force
258258

259-
def __equals__(self, to_compare):
259+
def __eq__(self, to_compare):
260260
""" Checks if two ArmDisarm are the same """
261261
try:
262262
# Try to compare - this likely fails when it is compared to a non
@@ -454,7 +454,7 @@ def __init__(
454454
self.result = result
455455
self.result_str = result_str
456456

457-
def __equals__(self, to_compare):
457+
def __eq__(self, to_compare):
458458
""" Checks if two ActionServerResult are the same """
459459
try:
460460
# Try to compare - this likely fails when it is compared to a non
@@ -566,7 +566,7 @@ async def arm_disarm(self):
566566
if result.result not in success_codes:
567567
raise ActionServerError(result, "arm_disarm()")
568568

569-
if result.result is ActionServerResult.Result.SUCCESS:
569+
if result.result == ActionServerResult.Result.SUCCESS:
570570
arm_disarm_stream.cancel();
571571
return
572572

@@ -605,7 +605,7 @@ async def flight_mode_change(self):
605605
if result.result not in success_codes:
606606
raise ActionServerError(result, "flight_mode_change()")
607607

608-
if result.result is ActionServerResult.Result.SUCCESS:
608+
if result.result == ActionServerResult.Result.SUCCESS:
609609
flight_mode_change_stream.cancel();
610610
return
611611

@@ -644,7 +644,7 @@ async def takeoff(self):
644644
if result.result not in success_codes:
645645
raise ActionServerError(result, "takeoff()")
646646

647-
if result.result is ActionServerResult.Result.SUCCESS:
647+
if result.result == ActionServerResult.Result.SUCCESS:
648648
takeoff_stream.cancel();
649649
return
650650

@@ -683,7 +683,7 @@ async def land(self):
683683
if result.result not in success_codes:
684684
raise ActionServerError(result, "land()")
685685

686-
if result.result is ActionServerResult.Result.SUCCESS:
686+
if result.result == ActionServerResult.Result.SUCCESS:
687687
land_stream.cancel();
688688
return
689689

@@ -722,7 +722,7 @@ async def reboot(self):
722722
if result.result not in success_codes:
723723
raise ActionServerError(result, "reboot()")
724724

725-
if result.result is ActionServerResult.Result.SUCCESS:
725+
if result.result == ActionServerResult.Result.SUCCESS:
726726
reboot_stream.cancel();
727727
return
728728

@@ -761,7 +761,7 @@ async def shutdown(self):
761761
if result.result not in success_codes:
762762
raise ActionServerError(result, "shutdown()")
763763

764-
if result.result is ActionServerResult.Result.SUCCESS:
764+
if result.result == ActionServerResult.Result.SUCCESS:
765765
shutdown_stream.cancel();
766766
return
767767

@@ -800,7 +800,7 @@ async def terminate(self):
800800
if result.result not in success_codes:
801801
raise ActionServerError(result, "terminate()")
802802

803-
if result.result is ActionServerResult.Result.SUCCESS:
803+
if result.result == ActionServerResult.Result.SUCCESS:
804804
terminate_stream.cancel();
805805
return
806806

@@ -832,7 +832,7 @@ async def set_allow_takeoff(self, allow_takeoff):
832832

833833
result = self._extract_result(response)
834834

835-
if result.result is not ActionServerResult.Result.SUCCESS:
835+
if result.result != ActionServerResult.Result.SUCCESS:
836836
raise ActionServerError(result, "set_allow_takeoff()", allow_takeoff)
837837

838838

@@ -862,7 +862,7 @@ async def set_armable(self, armable, force_armable):
862862

863863
result = self._extract_result(response)
864864

865-
if result.result is not ActionServerResult.Result.SUCCESS:
865+
if result.result != ActionServerResult.Result.SUCCESS:
866866
raise ActionServerError(result, "set_armable()", armable, force_armable)
867867

868868

@@ -892,7 +892,7 @@ async def set_disarmable(self, disarmable, force_disarmable):
892892

893893
result = self._extract_result(response)
894894

895-
if result.result is not ActionServerResult.Result.SUCCESS:
895+
if result.result != ActionServerResult.Result.SUCCESS:
896896
raise ActionServerError(result, "set_disarmable()", disarmable, force_disarmable)
897897

898898

@@ -920,7 +920,7 @@ async def set_allowable_flight_modes(self, flight_modes):
920920

921921
result = self._extract_result(response)
922922

923-
if result.result is not ActionServerResult.Result.SUCCESS:
923+
if result.result != ActionServerResult.Result.SUCCESS:
924924
raise ActionServerError(result, "set_allowable_flight_modes()", flight_modes)
925925

926926

mavsdk/calibration.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def __init__(
138138
self.result = result
139139
self.result_str = result_str
140140

141-
def __equals__(self, to_compare):
141+
def __eq__(self, to_compare):
142142
""" Checks if two CalibrationResult are the same """
143143
try:
144144
# Try to compare - this likely fails when it is compared to a non
@@ -224,7 +224,7 @@ def __init__(
224224
self.has_status_text = has_status_text
225225
self.status_text = status_text
226226

227-
def __equals__(self, to_compare):
227+
def __eq__(self, to_compare):
228228
""" Checks if two ProgressData are the same """
229229
try:
230230
# Try to compare - this likely fails when it is compared to a non
@@ -359,7 +359,7 @@ async def calibrate_gyro(self):
359359
if result.result not in success_codes:
360360
raise CalibrationError(result, "calibrate_gyro()")
361361

362-
if result.result is CalibrationResult.Result.SUCCESS:
362+
if result.result == CalibrationResult.Result.SUCCESS:
363363
calibrate_gyro_stream.cancel();
364364
return
365365

@@ -399,7 +399,7 @@ async def calibrate_accelerometer(self):
399399
if result.result not in success_codes:
400400
raise CalibrationError(result, "calibrate_accelerometer()")
401401

402-
if result.result is CalibrationResult.Result.SUCCESS:
402+
if result.result == CalibrationResult.Result.SUCCESS:
403403
calibrate_accelerometer_stream.cancel();
404404
return
405405

@@ -439,7 +439,7 @@ async def calibrate_magnetometer(self):
439439
if result.result not in success_codes:
440440
raise CalibrationError(result, "calibrate_magnetometer()")
441441

442-
if result.result is CalibrationResult.Result.SUCCESS:
442+
if result.result == CalibrationResult.Result.SUCCESS:
443443
calibrate_magnetometer_stream.cancel();
444444
return
445445

@@ -479,7 +479,7 @@ async def calibrate_level_horizon(self):
479479
if result.result not in success_codes:
480480
raise CalibrationError(result, "calibrate_level_horizon()")
481481

482-
if result.result is CalibrationResult.Result.SUCCESS:
482+
if result.result == CalibrationResult.Result.SUCCESS:
483483
calibrate_level_horizon_stream.cancel();
484484
return
485485

@@ -519,7 +519,7 @@ async def calibrate_gimbal_accelerometer(self):
519519
if result.result not in success_codes:
520520
raise CalibrationError(result, "calibrate_gimbal_accelerometer()")
521521

522-
if result.result is CalibrationResult.Result.SUCCESS:
522+
if result.result == CalibrationResult.Result.SUCCESS:
523523
calibrate_gimbal_accelerometer_stream.cancel();
524524
return
525525

@@ -545,6 +545,6 @@ async def cancel(self):
545545

546546
result = self._extract_result(response)
547547

548-
if result.result is not CalibrationResult.Result.SUCCESS:
548+
if result.result != CalibrationResult.Result.SUCCESS:
549549
raise CalibrationError(result, "cancel()")
550550

0 commit comments

Comments
 (0)