mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 13:53:34 +08:00
Fix usage of PWM defines in VTOL app
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user