|
20 | 20 | #include "fc/fc_msp_box.h" |
21 | 21 | #include "fc/config.h" |
22 | 22 | #include "drivers/pwm_mapping.h" |
| 23 | +#include "flight/mixer_profile.h" |
23 | 24 | #include "io/piniobox.h" |
24 | 25 |
|
25 | 26 | void targetConfiguration(void) |
26 | 27 | { |
27 | 28 | pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1; |
28 | 29 | pinioBoxConfigMutable()->permanentId[1] = BOX_PERMANENT_ID_USER2; |
29 | 30 |
|
30 | | - // S1 and S2 are not as readily accessible |
| 31 | + // S1 and S2 are not as readily accessible, set default mixer to skip them |
| 32 | + timerOverridesMutable(timer2id(TIM8))->outputMode = OUTPUT_MODE_SERVOS; |
| 33 | + timerOverridesMutable(timer2id(TIM2))->outputMode = OUTPUT_MODE_SERVOS; |
31 | 34 | timerOverridesMutable(timer2id(TIM1))->outputMode = OUTPUT_MODE_MOTORS; |
32 | | - timerOverridesMutable(timer2id(TIM2))->outputMode = OUTPUT_MODE_SERVOS; |
| 35 | + |
| 36 | + *primaryMotorMixerMutable(0) = (motorMixer_t){ 1.0f, 0.0f, 0.0f, 0.0f }; |
| 37 | + |
| 38 | + *customServoMixersMutable(0) = (servoMixer_t){ .targetChannel = 1, .inputSource = 29, .rate = 100, .speed = 0 }; |
| 39 | + *customServoMixersMutable(1) = (servoMixer_t){ .targetChannel = 2, .inputSource = 29, .rate = 100, .speed = 0 }; |
| 40 | + *customServoMixersMutable(2) = (servoMixer_t){ .targetChannel = 3, .inputSource = 1, .rate = 100, .speed = 0 }; |
| 41 | + *customServoMixersMutable(3) = (servoMixer_t){ .targetChannel = 4, .inputSource = 0, .rate = 100, .speed = 0 }; |
| 42 | + *customServoMixersMutable(4) = (servoMixer_t){ .targetChannel = 5, .inputSource = 0, .rate = 100, .speed = 0 }; |
| 43 | + *customServoMixersMutable(5) = (servoMixer_t){ .targetChannel = 6, .inputSource = 2, .rate = 100, .speed = 0 }; |
33 | 44 | } |
0 commit comments