mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-11 02:03:47 +00:00
S-FHSS Failsafe: SFHSS_FAILSAFE_THROTTLE
This commit is contained in:
parent
bd9c772a52
commit
205d728798
@ -157,11 +157,16 @@ static void __attribute__((unused)) SFHSS_build_data_packet()
|
|||||||
|
|
||||||
if(command&0x04)
|
if(command&0x04)
|
||||||
{//Failsafe data are coded for sbus: (ch_value-880)/0.625
|
{//Failsafe data are coded for sbus: (ch_value-880)/0.625
|
||||||
|
#ifndef SFHSS_FAILSAFE_THROTTLE
|
||||||
ch1=((ch1-880)<<3)/5;
|
ch1=((ch1-880)<<3)/5;
|
||||||
ch2=((ch2-880)<<3)/5;
|
ch2=((ch2-880)<<3)/5;
|
||||||
ch3=((ch3-880)<<3)/5;
|
ch3=((ch3-880)<<3)/5;
|
||||||
if((command&0x08)==0) ch3|=0x800; // Special flag for throttle which appears on dumps...
|
if((command&0x08)==0) ch3|=0x800; // Special flag for throttle which appears on dumps...
|
||||||
ch4=((ch4-880)<<3)/5;
|
ch4=((ch4-880)<<3)/5;
|
||||||
|
#else
|
||||||
|
ch1=1024;ch2=1024;ch4=1024; // All channels centered
|
||||||
|
ch3=((command&0x08)==0)?0xF70:1024; // except throttle value set to 970 with 0x800 flag set
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// XK [0]=0x81 [3]=0x00 [4]=0x00
|
// XK [0]=0x81 [3]=0x00 [4]=0x00
|
||||||
|
@ -143,6 +143,10 @@
|
|||||||
/**************************/
|
/**************************/
|
||||||
/*** FAILSAFE SETTINGS ***/
|
/*** FAILSAFE SETTINGS ***/
|
||||||
/**************************/
|
/**************************/
|
||||||
|
//SHFSS failsafe is by default using the values of channels 9 to 16
|
||||||
|
//You can uncomment the setting below to not use channels 9 to 16 but just bring down throttle
|
||||||
|
//#define SFHSS_FAILSAFE_THROTTLE
|
||||||
|
|
||||||
#define AFHDS2A_FAILSAFE
|
#define AFHDS2A_FAILSAFE
|
||||||
#ifdef AFHDS2A_FAILSAFE
|
#ifdef AFHDS2A_FAILSAFE
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user