AUX PWM output

Hey all,

Is there a topic i can publish to, so that i can control the PWM signal for the AUX outputs?
An AUX mixer is already set to /dev/pwm_output1 - using default mixers (quad_x.main.mix && mount.aux.mix).

Currently my code is:

const char *dev = "/dev/pwm_output1";
int fd = px4_open(dev,0);
if (fd<0)
{ PX4_ERR("its dead jim!"); }

mode_ret =  px4_ioctl(fd, PWM_SERVO_SET(1), 1750);
pitch_ret = px4_ioctl(fd, PWM_SERVO_SET(2), 1250);

if (mode_ret!=OK || pitch_ret!=OK)
 PX4_ERR("Could not set PWM values!");

This is not giving any errors, but the pwm values (when armed and disarmed) are not what I have stated here.


1 Like