mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-03 12:07:52 +00:00
some optimizations
This commit is contained in:
parent
882c6e52be
commit
3d9a65cf92
@ -123,7 +123,7 @@ static void __attribute__((unused)) build_ch_data()
|
|||||||
const uint8_t ch[]={AILERON, ELEVATOR, THROTTLE, RUDDER, AUX1, AUX2, AUX3, AUX4};
|
const uint8_t ch[]={AILERON, ELEVATOR, THROTTLE, RUDDER, AUX1, AUX2, AUX3, AUX4};
|
||||||
for (i = 0; i< 8; i++) {
|
for (i = 0; i< 8; i++) {
|
||||||
j=ch[i];
|
j=ch[i];
|
||||||
temp=map(limit_channel_100(j),PPM_MIN_100,PPM_MAX_100,0,1000);
|
temp=map(limit_channel_100(j),servo_min_100,servo_max_100,0,1000);
|
||||||
if (j == THROTTLE) // It is clear that hisky's throttle stick is made reversely, so I adjust it here on purpose
|
if (j == THROTTLE) // It is clear that hisky's throttle stick is made reversely, so I adjust it here on purpose
|
||||||
temp = 1000 -temp;
|
temp = 1000 -temp;
|
||||||
if (j == AUX3)
|
if (j == AUX3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user