Skip to content
June 19, 2010 / ygramulqc

OSP expo stick control

As I mentioned, I played a little bit with the OSP Code. This time I modified the stick input control in the controller.c a bit to this:

void CTRL_XattitudeHH(void)
int expo_nick, expo_roll;

int expo;

// Expo on nick/roll stick - faster reactions on the stick outside
if (CTRL_InternalOut.stick_nick < 0) {
expo_nick =-(CTRL_InternalOut.stick_nick*CTRL_InternalOut.stick_nick) / 512;
} else {
expo_nick=(CTRL_InternalOut.stick_nick*CTRL_InternalOut.stick_nick) / 512;
if (CTRL_InternalOut.stick_roll < 0) {
expo_roll=-(CTRL_InternalOut.stick_roll*CTRL_InternalOut.stick_roll) / 512;
} else {
expo_roll=(CTRL_InternalOut.stick_roll*CTRL_InternalOut.stick_roll) / 512;

So what’s the use of this? I hope to have slow motions on the stick mittle position to do a precise hover and fast reactions on the outside stick position for flips and similar.

But it’s very unusual at the fist time. Here are my first attempts.

So, what’s the advantage compared to “expo” funtion on the rc control? Well, it’s much more customable an you might get a better granularity of your data because the data range of the wireless connection is limited to 255.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: