File tree 1 file changed +15
-0
lines changed 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -11521,6 +11521,20 @@ def Clamp(self):
11521
11521
11522
11522
self .reboot_sitl () # because we set home
11523
11523
11524
+ def MAV_STATE_BOOT (self ):
11525
+ '''check mav state is boot during init'''
11526
+ self .context_push ()
11527
+ self .context_collect ('HEARTBEAT' )
11528
+ self .set_parameter ("BRD_BOOT_DELAY" , 30 )
11529
+ self .reboot_sitl ()
11530
+ heartbeats = self .context_collection ('HEARTBEAT' )
11531
+ count = len (list (filter (lambda hb : hb .system_status == mavutil .mavlink .MAV_STATE_BOOT , heartbeats )))
11532
+ self .progress (f"Saw { count } MAV_STATE_BOOT heartbeats" )
11533
+ if count == 0 :
11534
+ raise NotAchievedException ('Never saw heartbeat with MAV_STATE_BOOT' )
11535
+ self .context_pop ()
11536
+ self .reboot_sitl ()
11537
+
11524
11538
def tests2b (self ): # this block currently around 9.5mins here
11525
11539
'''return list of all tests'''
11526
11540
ret = ([
@@ -11611,6 +11625,7 @@ def tests2b(self): # this block currently around 9.5mins here
11611
11625
self .GuidedForceArm ,
11612
11626
self .GuidedWeatherVane ,
11613
11627
self .Clamp ,
11628
+ self .MAV_STATE_BOOT ,
11614
11629
])
11615
11630
return ret
11616
11631
You can’t perform that action at this time.
0 commit comments