Skip to content

Commit 0fd0529

Browse files
committed
By default, keep respecting the THR_KILL functionality (CH14)
1 parent cd381f1 commit 0fd0529

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Multiprotocol/DSM_cyrf6936.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static void __attribute__((unused)) DSM_build_data_packet(uint8_t upper)
208208
}
209209
#endif
210210

211-
#if defined(DSM_THROTTLE_KILL_CH) && not defined(DSM_X_PLUS)
211+
#if defined(DSM_THROTTLE_KILL_CH)
212212
uint16_t kill_ch=Channel_data[DSM_THROTTLE_KILL_CH-1];
213213
#endif
214214
for (uint8_t i = 0; i < 7; i++)
@@ -224,7 +224,7 @@ static void __attribute__((unused)) DSM_build_data_packet(uint8_t upper)
224224
{
225225
/* Spektrum own remotes transmit normal values during bind and actually use this (e.g. Nano CP X) to
226226
select the transmitter mode (e.g. computer vs non-computer radio), so always send normal output */
227-
#if defined(DSM_THROTTLE_KILL_CH) && not defined(DSM_X_PLUS)
227+
#if defined(DSM_THROTTLE_KILL_CH)
228228
if(idx==CH1 && kill_ch<=604)
229229
{//Activate throttle kill only if channel is throttle and DSM_THROTTLE_KILL_CH below -50%
230230
if(kill_ch<CHANNEL_MIN_100) // restrict val to 0...400
@@ -257,7 +257,7 @@ static void __attribute__((unused)) DSM_build_data_packet(uint8_t upper)
257257
// CH13-16 lower frame, and Ch17-20 upper. We only do lower right now, since MM cannot handle more than 16ch
258258
// Channel value is 9 bits, and upper 2 bits is the X-Plus channel (CH13..CH16).
259259
value >>= 2; // Convert to 9 bits
260-
value |= (XP_CH << 11) | (x_plus_ch << 9); // CH13 (4bits), XPlus Ch (2 bits), Value (9 bits)
260+
value |= (XP_CH << 11) | (x_plus_ch << 9); // constant 12 (4 bits), XPlus Ch (2 bits), Value (9 bits)
261261
x_plus_ch = (x_plus_ch + 1) % 4; // only 0..3
262262
} else
263263
#endif

Multiprotocol/_Config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,17 @@
294294
//The DSM protocol is using by default the Spektrum throw of 1100..1900us @100% and 1000..2000us @125%.
295295
// For more throw, 1024..1976us @100% and 904..2096us @125%, remove the "//" on the line below. Be aware that too much throw can damage some UMX servos. To achieve standard throw in this mode use a channel weight of 84%.
296296
//#define DSM_MAX_THROW
297+
297298
//Some models (X-Vert, Blade 230S...) require a special value to instant stop the motor(s).
298299
// You can disable this feature by adding "//" on the line below. You have to specify which channel (14 by default) will be used to kill the throttle channel.
299-
300300
// If the channel 14 is above -50% the throttle is untouched but if it is between -50% and -100%, the throttle output will be forced between -100% and -150%.
301301
// For example, a value of -80% applied on channel 14 will instantly kill the motors on the X-Vert.
302302
#define DSM_THROTTLE_KILL_CH 14
303303

304304
//Enable DSM Forward Programming
305305
#define DSM_FWD_PGM
306306

307-
//Enable X-Plus channels, Ch13-16.. if Enabled, will ignore the DSM_THROTTLE_KILL_CH feature
307+
//Enable X-Plus channels, Ch13-16.. if Enabled, will still respect the DSM_THROTTLE_KILL_CH feature
308308
#define DSM_X_PLUS
309309

310310
/**************************/

0 commit comments

Comments
 (0)