Skip to content

Commit

Permalink
autotest: add battery reproducing second bug in UAVCAN battery backend
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jun 4, 2024
1 parent 4872ee9 commit ccd3d3e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11527,7 +11527,7 @@ def testcan(self):
])
return ret

def BattCAN(self):
def BattCANSplitAuxInfo(self):
'''test CAN battery periphs'''
self.start_subtest("Swap UAVCAN backend at runtime")
self.set_parameters({
Expand Down Expand Up @@ -11557,9 +11557,24 @@ def BattCAN(self):
})
self.delay_sim_time(100000)

def BattCANReplaceRuntime(self):
'''test CAN battery periphs'''
self.start_subtest("Replace UAVCAN backend at runtime")
self.set_parameters({
"CAN_P1_DRIVER": 1,
"BATT_MONITOR": 11, # 4 is ananlog volt+curr
})
self.reboot_sitl()
self.delay_sim_time(5)
self.set_parameters({
"BATT_MONITOR": 8, # 4 is UAVCAN batterinfo
})
self.delay_sim_time(5)

def testcanbatt(self):
ret = ([
self.BattCAN,
self.BattCANReplaceRuntime,
# self.BattCANSplitAuxInfo,
])
return ret

Expand Down

0 comments on commit ccd3d3e

Please sign in to comment.