Autotest: Sub: Add depth hold cases of large buoyancies and small inputs

This commit is contained in:
Willian Galvani 2020-09-04 00:28:25 -03:00
parent 16a8400f85
commit e23e2cb63f
1 changed files with 13 additions and 1 deletions

View File

@ -152,9 +152,21 @@ class AutoTestSub(AutoTest):
# let the vehicle settle (momentum / stopping point shenanigans....) # let the vehicle settle (momentum / stopping point shenanigans....)
self.delay_sim_time(1) self.delay_sim_time(1)
self.watch_altitude_maintained() self.watch_altitude_maintained()
# Make sure the code can handle buoyancy changes
self.set_parameter("SIM_BUOYANCY", 10)
self.watch_altitude_maintained()
self.set_parameter("SIM_BUOYANCY", -10)
self.watch_altitude_maintained()
# Make sure that the ROV will dive with a small input down even if there is a 10N buoyancy force upwards
self.set_parameter("SIM_BUOYANCY", 10)
self.set_rc(Joystick.Throttle, 1450)
self.wait_altitude(altitude_min=-6, altitude_max=-5.5)
self.set_rc(Joystick.Throttle, 1500)
self.watch_altitude_maintained()
self.disarm_vehicle() self.disarm_vehicle()
def test_pos_hold(self): def test_pos_hold(self):