mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-12-31 09:43:17 +00:00
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:
@@ -50,16 +50,13 @@ void ASSAN_init()
|
||||
|
||||
void ASSAN_send_packet()
|
||||
{
|
||||
uint16_t temp;
|
||||
for(uint8_t i=0;i<8;i++)
|
||||
{
|
||||
if(mode_select != MODE_SERIAL) // If in PPM mode extend the output to 1000...2000µs
|
||||
temp=convert_channel_16b_nolim(i,1000,2000);
|
||||
else
|
||||
temp=Servo_data[i];
|
||||
temp<<=3;
|
||||
packet[2*i]=temp>>8;
|
||||
packet[2*i+1]=temp;
|
||||
uint16_t val=Channel_data[i];
|
||||
val=((val<<2)+val)+(860<<3); // PPM value <<3
|
||||
|
||||
packet[2*i]=val>>8;
|
||||
packet[2*i+1]=val;
|
||||
}
|
||||
for(uint8_t i=0;i<ASSAN_ADDRESS_LENGTH;i++)
|
||||
packet[16+i]=packet[23-i];
|
||||
|
||||
Reference in New Issue
Block a user