Fix usage of PWM defines in VTOL app

This commit is contained in:
Lorenz Meier
2015-12-16 16:38:27 +00:00
parent 9714af3a8b
commit 9bb819b801
2 changed files with 2 additions and 3 deletions
@@ -104,7 +104,7 @@ VtolAttitudeControl::VtolAttitudeControl() :
memset(&_batt_status, 0, sizeof(_batt_status));
memset(&_vehicle_cmd, 0, sizeof(_vehicle_cmd));
_params.idle_pwm_mc = PWM_LOWEST_MIN;
_params.idle_pwm_mc = PWM_DEFAULT_MIN;
_params.vtol_motor_count = 0;
_params.vtol_fw_permanent_stab = 0;
+1 -2
View File
@@ -117,13 +117,12 @@ void VtolType::set_idle_fw()
if (fd < 0) {PX4_WARN("can't open %s", dev);}
unsigned pwm_value = PWM_LOWEST_MIN;
struct pwm_output_values pwm_values;
memset(&pwm_values, 0, sizeof(pwm_values));
for (int i = 0; i < _params->vtol_motor_count; i++) {
pwm_values.values[i] = pwm_value;
pwm_values.values[i] = PWM_MOTOR_OFF;
pwm_values.channel_count++;
}