Hi
Does anyone know how to reverse the output from APM to the servo (tricopter)? I
think that I can fix this by rotating the servo, but it might be easier to just
change something in the code, since the DIP switches are not used anymore.
**The APM is mounted correctly; it's only the output to the yaw servo that is reversed
i.e. stabilize corrections are reversed, but manual input from the transmitter is correct.**
Permalink Reply by Sean O'Connor on August 23, 2011 at 1:36am I just tried it with 2.0.38 (from the downloads) and I think that you are now right. The direction seemed to change in the earlier versions - but it doesn't now. Anyone know how to fix this?

You can either modify your build to accommodate this or you can do this in code easily. I patched my AC2 code as described here:
http://diydrones.com/forum/topics/how-to-reverse-yaw-control-on-tri...
Its only one line change, works well.
Permalink Reply by Sean O'Connor on August 23, 2011 at 4:43pm
OK. Just for completeness, and to make it easier for others coming across this. This is the code fix:
#if FRAME_CONFIG == TRI_FRAME
// servo Yaw
g.rc_4.calc_pwm();
if(g.rc_4.get_reverse() == true)
{
APM_RC.OutputCh(CH_7, ( (-1 * (g.rc_4.radio_out - g.rc_4.radio_trim) ) + g.rc_4.radio_trim ) );
}
else
{
APM_RC.OutputCh(CH_7, g.rc_4.radio_out);
}
#endif
At line 831 in 2.0.38 in the ArduCopterMega.pde tab
This should let you reverse channel 4 in the planner by putting in a '-1' which will reverse the way the copter compensates with the yaw gyro.
Thank you Don for the fix!

You will want to check for channel 7 reverse not channel 4 (as the other respondent did the other thread did).
If channel 4 is reversed now only the servo travel is reversed, the gyro commands are not. The above code would reverse the gyro properly but re-reverse the servo travel.
Changing
if(g.rc_4.get_reverse() == true)
to
if(g.rc_7.get_reverse() == true)
and reversing channel 7 instead of 4 would work fine.
Season Two of the Trust Time Trial (T3) Contest has now begun. The third round was a reliablilty/aerial photography round for both planes and copters, which is now closed. Stay tuned for the next round, beginning soon.94 members
57 members
60 members
115 members
29 members
© 2012 Created by Chris Anderson.
