From e81ee38fa578839a02f0ce2c0621b3bde8601cf2 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Tue, 9 Jan 2018 11:56:42 +0100 Subject: [PATCH] DSM: match Spektrum standard for servo throw --- Multiprotocol/DSM_cyrf6936.ino | 7 +++---- Multiprotocol/Multiprotocol.h | 2 +- Protocols_Details.md | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Multiprotocol/DSM_cyrf6936.ino b/Multiprotocol/DSM_cyrf6936.ino index c68b3b9..09c4ecc 100644 --- a/Multiprotocol/DSM_cyrf6936.ino +++ b/Multiprotocol/DSM_cyrf6936.ino @@ -269,10 +269,9 @@ static void __attribute__((unused)) DSM_build_data_packet(uint8_t upper) uint16_t value = 0xffff;; if (idx != 0xff) { - /* Spektrum own remotes transmit normal values during bind and actually - * use this (e.g. Nano CP X) to select the transmitter mode (e.g. computer vs - * non-computer radio, so always end normal output */ - value=Channel_data[CH_TAER[idx]]; + /* Spektrum own remotes transmit normal values during bind and actually use this (e.g. Nano CP X) to + select the transmitter mode (e.g. computer vs non-computer radio), so always send normal output */ + value=convert_channel_16b_nolimit(CH_TAER[idx],0x150,0x6B0); // -100%..+100% => 1100..1900us and -125%..+125% => 1000..2000µs based on Redcon 6 channel DSM2 RX if(bits==10) value>>=1; value |= (upper && i==0 ? 0x8000 : 0) | (idx << bits); } diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index a563b91..d67cc30 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_REVISION 0 -#define VERSION_PATCH_LEVEL 8 +#define VERSION_PATCH_LEVEL 9 //****************** // Protocols //****************** diff --git a/Protocols_Details.md b/Protocols_Details.md index ca55ce8..f948ae3 100644 --- a/Protocols_Details.md +++ b/Protocols_Details.md @@ -355,7 +355,8 @@ A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12 Notes: - model/type/number of channels indicated on the RX can be different from what the RX is in fact wanting to see. So don't hesitate to test different combinations until you have something working. Using Auto is the best way to find these settings. - - RX ouput will always be TAER independently of the input AETR, RETA... + - RX output will match the Spektrum standard TAER independently of the input configuration AETR, RETA... + - RX output will match the Spektrum standard throw (1500µs +/- 400µs -> 1100..1900µs) for a 100% input. This is true for both Serial and PPM input. For PPM, make sure the end points PPM_MIN_100 and PPM_MAX_100 in _config.h are matching your TX ouput. The maximum ouput is 1000..2000µs based on an input of 125%. ### Sub_protocol DSM2_22 - *0* DSM2, Resolution 1024, refresh rate 22ms @@ -368,7 +369,7 @@ DSMX, Resolution 2048, refresh rate 11ms ### Sub_protocol AUTO - *4* The "AUTO" feature enables the TX to automatically choose what are the best settings for your DSM RX and update your model protocol settings accordingly. -The current radio firmware which are able to use the "AUTO" feature are ersky9x (9XR Pro, 9Xtreme, Taranis, ...) and er9x for M128 (9XR) and M2561. +The current radio firmware which are able to use the "AUTO" feature are ersky9x (9XR Pro, 9Xtreme, Taranis, ...), er9x for M128(9XR)&M2561 and OpenTX (mostly Taranis). For these firmwares, you must have a telemetry enabled TX and you have to make sure you set the Telemetry "Usr proto" to "DSMx". Also on er9x you will need to be sure to match the polarity of the telemetry serial (normal or inverted by bitbashing), while on ersky9x you can set "Invert COM1" accordinlgy.