Quantcast
Channel: ArduPlane - ArduPilot Discourse
Viewing all articles
Browse latest Browse all 7900

Custom flight mode using SRV_Channels::set_output_pwm_chan() not working

$
0
0

@dodobird wrote:

I created a new flight mode and am trying to directly send a PWM command to the throttle and aileron channels using the lines:

SRV_Channels::set_output_pwm_chan(SRV_Channel::k_aileron, 1900)
and
SRV_Channels::set_output_pwm_chan(SRV_Channel::k_throttle, 1300)

but it doesn’t seem to be doing anything.

I am testing this on the ground, and I know that the code is entering the ::update() function of the new flight mode because I’ve added a hal.console->printf("updating") for debugging purposes and am watching the serial monitor.

FWIW, I have all arming checks disabled, and also one thing I can’t figure out is that when I’m in this new mode, I can’t seem to move the throttle to spin up the motors but my control surfaces can move (throttle not working with both plane.throttle_allows_nudging = false and = true).

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7900

Latest Images

Trending Articles



Latest Images