some optimizations

This commit is contained in:
midelic 2016-08-31 17:35:46 +01:00 committed by GitHub
parent 882c6e52be
commit 3d9a65cf92

View File

@ -123,7 +123,7 @@ static void __attribute__((unused)) build_ch_data()
const uint8_t ch[]={AILERON, ELEVATOR, THROTTLE, RUDDER, AUX1, AUX2, AUX3, AUX4};
for (i = 0; i< 8; 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
temp = 1000 -temp;
if (j == AUX3)