mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 11:29:51 +03:00
Fixes #2579: Added support for Trainer signal alarm
- added alarm “Trainer signal lost” & “Trainer signal recovered”. - moved PPM capture code to trainer_input.{h,cpp}
This commit is contained in:
parent
3d461b771f
commit
f6bff9683d
12 changed files with 185 additions and 78 deletions
|
@ -455,7 +455,7 @@ void evalInputs(uint8_t mode)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (mode <= e_perout_mode_inactive_flight_mode && isFunctionActive(FUNCTION_TRAINER+ch) && ppmInValid) {
|
||||
if (mode <= e_perout_mode_inactive_flight_mode && isFunctionActive(FUNCTION_TRAINER+ch) && IS_TRAINER_INPUT_VALID()) {
|
||||
// trainer mode
|
||||
TrainerMix* td = &g_eeGeneral.trainer.mix[ch];
|
||||
if (td->mode) {
|
||||
|
@ -662,7 +662,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
|
|||
|
||||
#define MIXER_LINE_DISABLE() (mixCondition = true, mixEnabled = 0)
|
||||
|
||||
if (mixEnabled && md->srcRaw >= MIXSRC_FIRST_TRAINER && md->srcRaw <= MIXSRC_LAST_TRAINER && !ppmInValid) {
|
||||
if (mixEnabled && md->srcRaw >= MIXSRC_FIRST_TRAINER && md->srcRaw <= MIXSRC_LAST_TRAINER && !IS_TRAINER_INPUT_VALID()) {
|
||||
MIXER_LINE_DISABLE();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue