diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 3d6c1d16aa3d99..a4fcd8da6372b7 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -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({ @@ -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