From 6ad9fb8f272e067eeac973cd2aa2716fb32a65f7 Mon Sep 17 00:00:00 2001 From: pascallanger Date: Sun, 6 Nov 2016 16:36:44 +0100 Subject: [PATCH] AFHDS2A sub protocols and validation --- Multiprotocol/Multiprotocol.h | 10 +++++----- Multiprotocol/Validate.h | 6 +++++- Multiprotocol/_Config.h | 9 +++++++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 8301ec1..ccd2624 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -449,11 +449,11 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p -- FORMAT_HONTAI 0 FORMAT_JJRCX1 1 FORMAT_X5C1 2 - sub_protocol==AFHDS2A - FORMAT_IBUS+PWM 0 - FORMAT_IBUS+PPM 1 - FORMAT_SBUS+PWM 2 - FORMAT_SBUS+PPM 3 + sub_protocol==AFHDS2A + PWM_IBUS 0 + PPM_IBUS 1 + PWM_SBUS 2 + PPM_SBUS 3 Power value => 0x80 0=High/1=Low Stream[3] = option_protocol; option_protocol value is -127..127 diff --git a/Multiprotocol/Validate.h b/Multiprotocol/Validate.h index 9ce4198..277d5b1 100644 --- a/Multiprotocol/Validate.h +++ b/Multiprotocol/Validate.h @@ -72,6 +72,7 @@ #undef DSM_TELEMETRY #undef SPORT_TELEMETRY #undef HUB_TELEMETRY + #undef AFHDS2A_TELEMETRY #else #if not defined(DSM_CYRF6936_INO) #undef DSM_TELEMETRY @@ -82,7 +83,10 @@ #if not defined(FRSKYX_CC2500_INO) #undef SPORT_TELEMETRY #endif - #if not defined(DSM_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(SPORT_TELEMETRY) + #if not defined(AFHDS2A_A7105_INO) + #undef AFHDS2A_TELEMETRY + #endif + #if not defined(DSM_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(SPORT_TELEMETRY) && not defined(AFHDS2A_TELEMETRY) #undef TELEMETRY #undef INVERT_TELEMETRY #endif diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index 5e586f2..88f40f6 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -22,7 +22,9 @@ /********************/ //Uncomment one of the line below if you have a different module not based on the original Multi Atmega328p design which includes the 4-in-1. //If you don't know then leave them commented. -//#define STM32_BOARD +#ifdef __arm__ + #define STM32_BOARD // Let's automatically select this board if arm is selected since this is the only one for now... +#endif /*******************/ @@ -257,7 +259,10 @@ const PPM_Parameters PPM_prot[15]= { FORMAT_JJRCX1 FORMAT_X5C1 MODE_AFHDS2A - NONE + PWM_IBUS + PPM_IBUS + PWM_SBUS + PPM_SBUS */ // RX_Num is used for model match. Using RX_Num values different for each receiver will prevent starting a model with the false config loaded...