File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -8653,9 +8653,10 @@ def verify_yaw(mav, m):
8653
8653
if m .yawspeed > yawspeed_thresh_rads :
8654
8654
raise NotAchievedException ("Excessive yaw on takeoff: %f deg/s > %f deg/s (frame=%s)" %
8655
8655
(math .degrees (m .yawspeed ), math .degrees (yawspeed_thresh_rads ), frame ))
8656
- self .install_message_hook (verify_yaw )
8656
+ self .context_push ()
8657
+ self .install_message_hook_context (verify_yaw )
8657
8658
self .takeoff (10 )
8658
- self .remove_message_hook ( verify_yaw )
8659
+ self .context_pop ( )
8659
8660
self .hover ()
8660
8661
self .change_mode ('ALT_HOLD' )
8661
8662
self .delay_sim_time (1 )
@@ -8671,13 +8672,14 @@ def verify_rollpitch(mav, m):
8671
8672
if m .roll > roll_thresh_rad :
8672
8673
raise NotAchievedException ("Excessive roll %f deg > %f deg" %
8673
8674
(math .degrees (m .roll ), math .degrees (roll_thresh_rad )))
8674
- self .install_message_hook (verify_rollpitch )
8675
+ self .context_push ()
8676
+ self .install_message_hook_context (verify_rollpitch )
8675
8677
for i in range (5 ):
8676
8678
self .set_rc (4 , 2000 )
8677
8679
self .delay_sim_time (0.5 )
8678
8680
self .set_rc (4 , 1500 )
8679
8681
self .delay_sim_time (5 )
8680
- self .remove_message_hook ( verify_rollpitch )
8682
+ self .context_pop ( )
8681
8683
8682
8684
self .do_RTL ()
8683
8685
You can’t perform that action at this time.
0 commit comments