Commit 6a44fc7c authored by Beat Küng's avatar Beat Küng Committed by Daniel Agar
Browse files

fix vtol_att_control: set _current_max_pwm_values to current values on init

parent 894ecac8
......@@ -77,8 +77,6 @@ VtolType::VtolType(VtolAttitudeControl *att_controller) :
for (auto &pwm_disarmed : _disarmed_pwm_values.values) {
pwm_disarmed = PWM_MOTOR_OFF;
}
_current_max_pwm_values = _max_mc_pwm_values;
}
bool VtolType::init()
......@@ -93,7 +91,7 @@ bool VtolType::init()
}
int ret = px4_ioctl(fd, PWM_SERVO_GET_MAX_PWM, (long unsigned int)&_max_mc_pwm_values);
_current_max_pwm_values = _max_mc_pwm_values;
if (ret != PX4_OK) {
PX4_ERR("failed getting max values");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment