Fix tests failure
This commit is contained in:
committed by
Malte Langermann
parent
50774cfca3
commit
a8b3525cd6
@@ -62,6 +62,12 @@
|
|||||||
#define TRIMS_GPIO_REG_LVU
|
#define TRIMS_GPIO_REG_LVU
|
||||||
#define TRIMS_GPIO_PIN_LVU
|
#define TRIMS_GPIO_PIN_LVU
|
||||||
|
|
||||||
|
// Switches
|
||||||
|
#define SWITCHES_GPIO_REG_A
|
||||||
|
#define SWITCHES_GPIO_PIN_A
|
||||||
|
#define SWITCHES_GPIO_REG_B
|
||||||
|
#define SWITCHES_GPIO_PIN_B
|
||||||
|
|
||||||
// Keys
|
// Keys
|
||||||
#define KEYS_GPIO_PIN_ENTER
|
#define KEYS_GPIO_PIN_ENTER
|
||||||
#define KEYS_GPIO_REG_ENTER
|
#define KEYS_GPIO_REG_ENTER
|
||||||
|
|||||||
@@ -660,6 +660,8 @@ TEST_F(MixerTest, RecursiveAddChannel)
|
|||||||
|
|
||||||
TEST_F(MixerTest, RecursiveAddChannelAfterInactivePhase)
|
TEST_F(MixerTest, RecursiveAddChannelAfterInactivePhase)
|
||||||
{
|
{
|
||||||
|
if (switchGetMaxSwitches() < 4) return;
|
||||||
|
|
||||||
g_model.flightModeData[1].swtch = SWSRC_FIRST_SWITCH + 1;
|
g_model.flightModeData[1].swtch = SWSRC_FIRST_SWITCH + 1;
|
||||||
g_model.mixData[0].destCh = 0;
|
g_model.mixData[0].destCh = 0;
|
||||||
g_model.mixData[0].mltpx = MLTPX_ADD;
|
g_model.mixData[0].mltpx = MLTPX_ADD;
|
||||||
|
|||||||
@@ -59,9 +59,11 @@ static inline void _init_switches()
|
|||||||
pinInit.Mode = LL_GPIO_MODE_INPUT;
|
pinInit.Mode = LL_GPIO_MODE_INPUT;
|
||||||
pinInit.Pull = LL_GPIO_PULL_UP;
|
pinInit.Pull = LL_GPIO_PULL_UP;
|
||||||
{% for sw_gpio, pins in switch_gpios.items() | sort %}
|
{% for sw_gpio, pins in switch_gpios.items() | sort %}
|
||||||
|
{% if sw_gpio %}
|
||||||
stm32_gpio_enable_clock({{ sw_gpio }});
|
stm32_gpio_enable_clock({{ sw_gpio }});
|
||||||
pinInit.Pin = {{ pins | join('|') }};
|
pinInit.Pin = {{ pins | join('|') }};
|
||||||
LL_GPIO_Init({{ sw_gpio }}, &pinInit);
|
LL_GPIO_Init({{ sw_gpio }}, &pinInit);
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ SWITCH_CONFIG = {
|
|||||||
"SJ": { "default": "3POS" }
|
"SJ": { "default": "3POS" }
|
||||||
},
|
},
|
||||||
"nb4p": {
|
"nb4p": {
|
||||||
"SW2" : { "default": "TOGGLE" },
|
"SA" : { "default": "TOGGLE" },
|
||||||
"SW3" : { "default": "TOGGLE" }
|
"SB" : { "default": "TOGGLE" }
|
||||||
},
|
},
|
||||||
"lr3pro": {
|
"lr3pro": {
|
||||||
# left side
|
# left side
|
||||||
|
|||||||
Reference in New Issue
Block a user