Fix tests failure

This commit is contained in:
Richard Li
2025-01-24 19:00:12 +01:00
committed by Malte Langermann
parent 50774cfca3
commit a8b3525cd6
4 changed files with 12 additions and 2 deletions
+6
View File
@@ -62,6 +62,12 @@
#define TRIMS_GPIO_REG_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
#define KEYS_GPIO_PIN_ENTER
#define KEYS_GPIO_REG_ENTER
+2
View File
@@ -660,6 +660,8 @@ TEST_F(MixerTest, RecursiveAddChannel)
TEST_F(MixerTest, RecursiveAddChannelAfterInactivePhase)
{
if (switchGetMaxSwitches() < 4) return;
g_model.flightModeData[1].swtch = SWSRC_FIRST_SWITCH + 1;
g_model.mixData[0].destCh = 0;
g_model.mixData[0].mltpx = MLTPX_ADD;
+2
View File
@@ -59,9 +59,11 @@ static inline void _init_switches()
pinInit.Mode = LL_GPIO_MODE_INPUT;
pinInit.Pull = LL_GPIO_PULL_UP;
{% for sw_gpio, pins in switch_gpios.items() | sort %}
{% if sw_gpio %}
stm32_gpio_enable_clock({{ sw_gpio }});
pinInit.Pin = {{ pins | join('|') }};
LL_GPIO_Init({{ sw_gpio }}, &pinInit);
{% endif %}
{% endfor %}
}
+2 -2
View File
@@ -66,8 +66,8 @@ SWITCH_CONFIG = {
"SJ": { "default": "3POS" }
},
"nb4p": {
"SW2" : { "default": "TOGGLE" },
"SW3" : { "default": "TOGGLE" }
"SA" : { "default": "TOGGLE" },
"SB" : { "default": "TOGGLE" }
},
"lr3pro": {
# left side