Switch all protocols to use a resolution of 2048

- Change how PPM is handled with a resolution of 2048 and scaled to match serial input range. PPM is now fully scaled for all protocols which was not the case before. If you are using PPM, you might have to adjust the end points depending on the protocols.
 - Change all range conversions to use 2048 where possible
 - Updated all protocols with new range functions
 - Protocols which are taking advantage of 2048 are Assan, FrSky V/D/X, DSM, Devo, WK2x01
 - Renamed AUX xto CHx for code readbility
This commit is contained in:
Pascal Langer
2018-01-08 19:37:14 +01:00
parent 11287cb9c0
commit 984aa3f413
39 changed files with 462 additions and 506 deletions

View File

@@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_REVISION 0
#define VERSION_PATCH_LEVEL 5
#define VERSION_PATCH_LEVEL 7
//******************
// Protocols
//******************
@@ -364,16 +364,18 @@ enum MultiPacketTypes
//*** AUX flags ***
//*******************
#define GET_FLAG(ch, mask) ( ch ? mask : 0)
#define Servo_AUX1 (Servo_AUX & _BV(0))
#define Servo_AUX2 (Servo_AUX & _BV(1))
#define Servo_AUX3 (Servo_AUX & _BV(2))
#define Servo_AUX4 (Servo_AUX & _BV(3))
#define Servo_AUX5 (Servo_AUX & _BV(4))
#define Servo_AUX6 (Servo_AUX & _BV(5))
#define Servo_AUX7 (Servo_AUX & _BV(6))
#define Servo_AUX8 (Servo_AUX & _BV(7))
#define Servo_AUX9 (Servo_data[AUX9 ]>PPM_SWITCH)
#define Servo_AUX10 (Servo_data[AUX10]>PPM_SWITCH)
#define CH5_SW (Channel_AUX & _BV(0))
#define CH6_SW (Channel_AUX & _BV(1))
#define CH7_SW (Channel_AUX & _BV(2))
#define CH8_SW (Channel_AUX & _BV(3))
#define CH9_SW (Channel_AUX & _BV(4))
#define CH10_SW (Channel_AUX & _BV(5))
#define CH11_SW (Channel_AUX & _BV(6))
#define CH12_SW (Channel_AUX & _BV(7))
#define CH13_SW (Channel_data[CH13]>CHANNEL_SWITCH)
#define CH14_SW (Channel_data[CH14]>CHANNEL_SWITCH)
#define CH15_SW (Channel_data[CH15]>CHANNEL_SWITCH)
#define CH16_SW (Channel_data[CH16]>CHANNEL_SWITCH)
//************************
//*** Power settings ***