Bsongis/x9d+ 2019 (#6588)

X9D+ 2019 added
This commit is contained in:
Bertrand Songis
2019-07-26 19:18:29 +02:00
committed by GitHub
parent 37e1e0ef33
commit 151827ada5
44 changed files with 704 additions and 321 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ void enablePulsesExternalModule(uint8_t protocol)
break;
#endif
#if defined(PXX2)
#if defined(PXX2) && defined(HARDWARE_EXTERNAL_MODULE_SIZE_SML)
case PROTOCOL_CHANNELS_PXX2_HIGHSPEED:
extmoduleInvertedSerialStart(PXX2_HIGHSPEED_BAUDRATE);
break;
-10
View File
@@ -45,16 +45,6 @@
#define INTMODULE_PXX1_SERIAL_PERIOD 9/*ms*/
#endif
#if defined(PXX_FREQUENCY_HIGH) && (!defined(INTMODULE_USART) || !defined(EXTMODULE_USART))
/* PXX uses 20 bytes (as of Rev 1.1 document) with 8 changes per byte + stop bit ~= 162 max pulses */
/* DSM2 uses 2 header + 12 channel bytes, with max 10 changes (8n2) per byte + 16 bits trailer ~= 156 max pulses */
/* Multimodule uses 3 bytes header + 22 channel bytes with max 11 changes per byte (8e2) + 16 bits trailer ~= 291 max pulses */
/* Multimodule reuses some of the DSM2 function and structs since the protocols are similar enough */
/* sbus is 1 byte header, 22 channel bytes (11bit * 16ch) + 1 byte flags */
#error "Pulses array needs to be increased (PXX_FREQUENCY=HIGH)"
#endif
// Used by the Sky9x family boards
class SerialPxxBitTransport: public DataBuffer<uint8_t, 64> {
protected:
+8 -2
View File
@@ -67,7 +67,9 @@ enum PXX2ModuleModelID {
PXX2_MODULE_R9M,
PXX2_MODULE_R9M_LITE,
PXX2_MODULE_R9M_LITE_PRO,
PXX2_MODULE_ISRM_N
PXX2_MODULE_ISRM_N,
PXX2_MODULE_ISRM_S_X9,
PXX2_MODULE_ISRM_S_X10
};
static const char * const PXX2ModulesNames[] = {
@@ -79,7 +81,9 @@ static const char * const PXX2ModulesNames[] = {
"R9M",
"R9MLite",
"R9MLite-PRO",
"ISRM-N"
"ISRM-N",
"ISRM-S-X9",
"ISRM-S-X10",
};
inline const char * getPXX2ModuleName(uint8_t modelId)
@@ -117,6 +121,8 @@ static const uint8_t PXX2ModuleOptions[] = {
0b11110010, // R9MLite
0b11110110, // R9MLite-PRO
0b11110100, // ISRM-N
0b11110100, // ISRM-S-X9
0b11110100, // ISRM-S-X10
};
inline uint8_t getPXX2ModuleOptions(uint8_t modelId)