Fix FrskyX failsafe hold/no pulse inversion

This commit is contained in:
pascallanger 2019-09-22 17:12:00 +02:00
parent 1fb2a38bc1
commit 61a1c3742c
2 changed files with 5 additions and 6 deletions

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 2 #define VERSION_MINOR 2
#define VERSION_REVISION 1 #define VERSION_REVISION 1
#define VERSION_PATCH_LEVEL 79 #define VERSION_PATCH_LEVEL 80
//****************** //******************
// Protocols // Protocols
@ -405,8 +405,8 @@ enum MultiPacketTypes
#define IS_WAIT_BIND_off ( ( protocol_flags2 & _BV(7) ) ==0 ) #define IS_WAIT_BIND_off ( ( protocol_flags2 & _BV(7) ) ==0 )
// Failsafe // Failsafe
#define FAILSAFE_CHANNEL_HOLD 2047 #define FAILSAFE_CHANNEL_HOLD 0
#define FAILSAFE_CHANNEL_NOPULSES 0 #define FAILSAFE_CHANNEL_NOPULSES 2047
//******************** //********************
//** Debug messages ** //** Debug messages **
@ -574,7 +574,7 @@ enum {
#define AFHDS2A_EEPROM_OFFSET 50 // RX ID, 4 bytes per model id, end is 50+64=114 #define AFHDS2A_EEPROM_OFFSET 50 // RX ID, 4 bytes per model id, end is 50+64=114
#define BUGS_EEPROM_OFFSET 114 // RX ID, 2 bytes per model id, end is 114+32=146 #define BUGS_EEPROM_OFFSET 114 // RX ID, 2 bytes per model id, end is 114+32=146
#define BUGSMINI_EEPROM_OFFSET 146 // RX ID, 2 bytes per model id, end is 146+32=178 #define BUGSMINI_EEPROM_OFFSET 146 // RX ID, 2 bytes per model id, end is 146+32=178
#define FRSKYX_RX_EEPROM_OFFSET 178 // TX ID + channels, 50 bytes per model, end is 178+200=378 #define FRSKYX_RX_EEPROM_OFFSET 178 // (3) TX ID + (47) channels + (1) freq_tune, 51 bytes per model, end is 178+51=229
//#define CONFIG_EEPROM_OFFSET 210 // Current configuration of the multimodule //#define CONFIG_EEPROM_OFFSET 210 // Current configuration of the multimodule
//**************************************** //****************************************
@ -877,7 +877,6 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
*No* usual frsky byte stuffing and without start/stop byte (0x7e) *No* usual frsky byte stuffing and without start/stop byte (0x7e)
Type 0x04 Spektrum telemetry data Type 0x04 Spektrum telemetry data
data[0] TX RSSI data[0] TX RSSI
data[1-15] telemetry data data[1-15] telemetry data

View File

@ -1473,7 +1473,7 @@ void update_serial_data()
uint16_t temp=((*((uint32_t *)p))>>dec)&0x7FF; uint16_t temp=((*((uint32_t *)p))>>dec)&0x7FF;
#ifdef FAILSAFE_ENABLE #ifdef FAILSAFE_ENABLE
if(failsafe) if(failsafe)
Failsafe_data[i]=temp; //value range 0..2047, 0=no pulses, 2047=hold Failsafe_data[i]=temp; //value range 0..2047, 0=hold, 2047=no pulses
else else
#endif #endif
Channel_data[i]=temp; //value range 0..2047, 0=-125%, 2047=+125% Channel_data[i]=temp; //value range 0..2047, 0=-125%, 2047=+125%