Channel layout

More
26 Apr 2013 18:16 #9237 by victzh
Channel layout was created by victzh
Can you briefly explain Channels usage and EATRG/TAERG/AETRG business. What they are used for and which one should I use for my V202 module (the packet layout is throttle, yaw, pitch, roll). Is it just for simplification of packet forming procedure or is there some higher sense I can't see? Also, what is the range of sticks movement as it is encoded in Channels?

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 19:49 - 26 Apr 2013 19:52 #9243 by PhracturedBlue
Replied by PhracturedBlue on topic Channel layout
EATRG is Elevator, Aileron, Throttle, Rudder, Gear
it specifies the order of the 1st 5 channels. It is only really relevant for protocols that have a real receiver with specified channel order (it does not necessarily correspond to the order sent by the protocol).
For the V202, I'd probably use TAERG. What you've described is TREA I think, so you'll need to map the channels (or define a new ordering which I don't recommend)

The Channel array is generally defined as being -10000 : 10000 for -100% to 100%. Values can be larger than this (generally upto 150-200%)

You should just use the same mechanism I use in the other protocols to adjust the values:
s32 value = (s32)Channels[i] * 0x1f1 / CHAN_MAX_VALUE + 0x5d9;
just change 0x151 to the delta from 0 to 100% and 0x5d9 to the center point (value when channel is 0%)
Last edit: 26 Apr 2013 19:52 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 20:09 #9248 by victzh
Replied by victzh on topic Channel layout
Yes, that much I read from the code. What I don't understand is how do I know which channel is which stick. I understand that I can remap any stick to any channel from tx.ini, or pass it through mixer etc., but is there a standard channel layout for module - e.g. can I be sure that channel 1 is elevator, 2 - aileron, 3 - throttle, 4 - rudder (or any other predefined order). I can not figure such knowledge from the code itself, as it is a convention and is not documented anywhere.

Also, as I understood from your explanation about EATRG and brothers, it is unimportant how I declare the protocol in the definition, it's not used in the code and does not affect the order in which channels are reported to the protocol code. Am I correct?

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 21:37 #9250 by PhracturedBlue
Replied by PhracturedBlue on topic Channel layout
If you choose 'EATRG' then you have defined how the Channels are ordered:
0 = elevator
1= aileron
2 = throttle
3= rudder

so you absolutely need to code the protocol mapping based on your choice of channel layout.

the definition of 'EATRG' tells the user what decisions you've made in the protocol. They can always choose to ignore it, but usually that means their model won't fly.

Please Log in or Create an account to join the conversation.

Time to create page: 0.037 seconds
Powered by Kunena Forum