Skip to content

Commit 88d278c

Browse files
committed
BLUEBERRYF405: Patch less-accessible S1 and S2
1 parent ed57071 commit 88d278c

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

src/main/target/BLUEBERRYF405/config.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,25 @@
2020
#include "fc/fc_msp_box.h"
2121
#include "fc/config.h"
2222
#include "drivers/pwm_mapping.h"
23+
#include "flight/mixer_profile.h"
2324
#include "io/piniobox.h"
2425

2526
void targetConfiguration(void)
2627
{
2728
pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1;
2829
pinioBoxConfigMutable()->permanentId[1] = BOX_PERMANENT_ID_USER2;
2930

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;
3134
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 };
3344
}

0 commit comments

Comments
 (0)