Depth Hold does not work when pwm limits change

Hello, I want to reduce the pwm output range of my vehicle, but when I do this, the depth hold mode does not work. At 1100-1900 pwm, the up-down engines work around 1430-1570, while in the 1200-1800 pwm range, the engines work around 1450-1550 and therefore the vehicle cannot maintain its depth.
Note: I don’t want to restrict the pwm limit via js_gain parameter because in depth and stable mode the engines are free to use power up to the max and min limits set by the rc3 or mot_pwm parameters, I want to lower the pwm limit due to power problems.

Hi @Furkan,

Which ArduSub version are you using?

This issue may have been fixed in the latest ArduSub beta release :slight_smile:

I tried version 4.1.1 Beta2 24-October-2022 and it was able to provide depth hold with the pwm limits set by MOT_PWM. However, if the pitch or roll angle of the vehicle changes while lifting weights or sudden movements, the vehicle remains at these angles. In the 4.0 version I used before, the vehicle kept its initial stance unless the user changed the roll pitch angle voluntarily, but in the 4.1.1 version, if the vehicle’s angles change even without giving the roll-pitch command, it continues to protect it. Shouldn’t it have to fix itself again instead?

Good to hear! :slight_smile:

I brought this up internally and it’s a known issue. You’re correct that the intended behaviour is for it to maintain only the attitude commanded by the operator :slight_smile: