diff --git a/Multiprotocol/DSM_cyrf6936.ino b/Multiprotocol/DSM_cyrf6936.ino index def9a86..0fb52b9 100644 --- a/Multiprotocol/DSM_cyrf6936.ino +++ b/Multiprotocol/DSM_cyrf6936.ino @@ -230,7 +230,7 @@ static void __attribute__((unused)) DSM_update_channels() if(sub_protocol==DSM_AUTO) num_ch=12; // Force 12 channels in mode Auto else - num_ch=option; + num_ch=option & 0x7F; // Remove the Max Throw flag if(num_ch<4 || num_ch>12) num_ch=6; // Default to 6 channels if invalid choice... @@ -286,7 +286,10 @@ static void __attribute__((unused)) DSM_build_data_packet(uint8_t upper) #ifdef DSM_MAX_THROW value=Channel_data[CH_TAER[idx]]; // -100%..+100% => 1024..1976us and -125%..+125% => 904..2096us based on Redcon 6 channel DSM2 RX #else - value=convert_channel_16b_nolimit(CH_TAER[idx],0x150,0x6B0); // -100%..+100% => 1100..1900us and -125%..+125% => 1000..2000us based on Redcon 6 channel DSM2 RX + if(option & 0x80) + value=Channel_data[CH_TAER[idx]]; // -100%..+100% => 1024..1976us and -125%..+125% => 904..2096us based on Redcon 6 channel DSM2 RX + else + value=convert_channel_16b_nolimit(CH_TAER[idx],0x150,0x6B0); // -100%..+100% => 1100..1900us and -125%..+125% => 1000..2000us based on Redcon 6 channel DSM2 RX #endif if(bits==10) value>>=1; value |= (upper && i==0 ? 0x8000 : 0) | (idx << bits); diff --git a/Multiprotocol/Multi_Names.ino b/Multiprotocol/Multi_Names.ino index e7c84f9..83bebf9 100644 --- a/Multiprotocol/Multi_Names.ino +++ b/Multiprotocol/Multi_Names.ino @@ -118,6 +118,7 @@ enum OPTION_FIXEDID, OPTION_TELEM, OPTION_SRVFREQ, + OPTION_MAXTHR, }; #define NO_SUBTYPE nullptr @@ -140,7 +141,7 @@ const mm_protocol_definition multi_protocols[] = { {PROTO_V2X2, STR_V2X2, 2, STR_SUBTYPE_V2X2, OPTION_NONE }, #endif #if defined(DSM_CYRF6936_INO) - {PROTO_DSM, STR_DSM, 4, STR_SUBTYPE_DSM, OPTION_NONE }, + {PROTO_DSM, STR_DSM, 4, STR_SUBTYPE_DSM, OPTION_MAXTHR }, #endif #if defined(DEVO_CYRF6936_INO) {PROTO_DEVO, STR_DEVO, 5, STR_SUBTYPE_DEVO, OPTION_FIXEDID },