Fixes #4350: Horus 2pos switches need different switch conditions, fixes SF and SH switches in simulator (#4351)
This commit is contained in:
committed by
Bertrand Songis
parent
59d9ec131b
commit
baa5929671
@@ -129,7 +129,10 @@ void simuInit()
|
||||
break;
|
||||
|
||||
#if defined(CPUARM)
|
||||
#if defined(PCBTARANIS) && !defined(PCBX9E)
|
||||
#if defined(PCBHORUS)
|
||||
#define SWITCH_CASE NEG_CASE
|
||||
#define SWITCH_CASE_NEGATIVE POS_CASE
|
||||
#elif defined(PCBTARANIS) && !defined(PCBX9E)
|
||||
#define SWITCH_CASE NEG_CASE
|
||||
#else
|
||||
#define SWITCH_CASE POS_CASE
|
||||
@@ -242,7 +245,11 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
|
||||
SWITCH_CASE(5, SWITCHES_GPIO_REG_H, SWITCHES_GPIO_PIN_H)
|
||||
#else
|
||||
SWITCH_3_CASE(4, SWITCHES_GPIO_REG_E_L, SWITCHES_GPIO_REG_E_H, SWITCHES_GPIO_PIN_E_L, SWITCHES_GPIO_PIN_E_H)
|
||||
#if defined(PCBHORUS)
|
||||
SWITCH_CASE_NEGATIVE(5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
||||
#else
|
||||
SWITCH_CASE(5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
||||
#endif
|
||||
SWITCH_3_CASE(6, SWITCHES_GPIO_REG_G_L, SWITCHES_GPIO_REG_G_H, SWITCHES_GPIO_PIN_G_L, SWITCHES_GPIO_PIN_G_H)
|
||||
SWITCH_CASE(7, SWITCHES_GPIO_REG_H, SWITCHES_GPIO_PIN_H)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user