PXX2 probe on hold for now

This commit is contained in:
Bertrand Songis
2019-03-15 12:11:03 +01:00
parent 05b6002059
commit 90959c8817
5 changed files with 25 additions and 10 deletions
+1 -1
View File
@@ -532,7 +532,7 @@ bool isInternalModuleAvailable(int module)
#if defined(PXX1) #if defined(PXX1)
if (module == MODULE_TYPE_XJT) if (module == MODULE_TYPE_XJT)
return !IS_PXX2_INTERNAL_ENABLED() && !isModulePXX(EXTERNAL_MODULE); return IS_PXX1_INTERNAL_ENABLED() && !isModulePXX(EXTERNAL_MODULE);
#endif #endif
#if defined(PXX2) #if defined(PXX2)
@@ -146,4 +146,3 @@ void intmoduleSendNextFrame()
#endif #endif
} }
} }
+13 -1
View File
@@ -205,7 +205,19 @@ PACK(typedef struct {
extern HardwareOptions hardwareOptions; extern HardwareOptions hardwareOptions;
#define IS_PXX2_INTERNAL_ENABLED() (hardwareOptions.pxx2Enabled) #if !defined(PXX2)
#define IS_PXX2_INTERNAL_ENABLED() (false)
#define IS_PXX1_INTERNAL_ENABLED() (true)
#elif !defined(PXX1)
#define IS_PXX2_INTERNAL_ENABLED() (true)
#define IS_PXX1_INTERNAL_ENABLED() (false)
#else
// TODO #define PXX2_PROBE
// TODO #define IS_PXX2_INTERNAL_ENABLED() (hardwareOptions.pxx2Enabled)
#define IS_PXX2_INTERNAL_ENABLED() (true)
#define IS_PXX1_INTERNAL_ENABLED() (true)
#endif
void init_ppm(uint8_t module); void init_ppm(uint8_t module);
void disable_ppm(uint8_t module); void disable_ppm(uint8_t module);
+4 -5
View File
@@ -169,11 +169,6 @@ void boardInit()
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE); bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE);
#endif #endif
#if !defined(PCBXLITES) && !defined(PCBX3) && defined(PXX2)
#warning "PXX2 probe is not implemented"
hardwareOptions.pxx2Enabled = true;
#endif
#if !defined(PCBX9E) #if !defined(PCBX9E)
// some X9E boards need that the pwrInit() is moved a little bit later // some X9E boards need that the pwrInit() is moved a little bit later
pwrInit(); pwrInit();
@@ -213,6 +208,10 @@ void boardInit()
hapticInit(); hapticInit();
#endif #endif
#if defined(PXX2_PROBE)
intmodulePxx2Probe();
#endif
#if defined(DEBUG) #if defined(DEBUG)
DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP|DBGMCU_TIM1_STOP|DBGMCU_TIM2_STOP|DBGMCU_TIM3_STOP|DBGMCU_TIM6_STOP|DBGMCU_TIM8_STOP|DBGMCU_TIM10_STOP|DBGMCU_TIM13_STOP|DBGMCU_TIM14_STOP, ENABLE); DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP|DBGMCU_TIM1_STOP|DBGMCU_TIM2_STOP|DBGMCU_TIM3_STOP|DBGMCU_TIM6_STOP|DBGMCU_TIM8_STOP|DBGMCU_TIM10_STOP|DBGMCU_TIM13_STOP|DBGMCU_TIM14_STOP, ENABLE);
#endif #endif
+7 -2
View File
@@ -493,10 +493,15 @@ extern HardwareOptions hardwareOptions;
#if !defined(PXX2) #if !defined(PXX2)
#define IS_PXX2_INTERNAL_ENABLED() (false) #define IS_PXX2_INTERNAL_ENABLED() (false)
#elif defined(PCBXLITES) || defined(PCBX3) || defined(SIMU) #define IS_PXX1_INTERNAL_ENABLED() (true)
#elif !defined(PXX1) || defined(PCBXLITES) || defined(PCBX3)
#define IS_PXX2_INTERNAL_ENABLED() (true) #define IS_PXX2_INTERNAL_ENABLED() (true)
#define IS_PXX1_INTERNAL_ENABLED() (false)
#else #else
#define IS_PXX2_INTERNAL_ENABLED() (hardwareOptions.pxx2Enabled) // TODO #define PXX2_PROBE
// TODO #define IS_PXX2_INTERNAL_ENABLED() (hardwareOptions.pxx2Enabled)
#define IS_PXX2_INTERNAL_ENABLED() (true)
#define IS_PXX1_INTERNAL_ENABLED() (true)
#endif #endif
enum CalibratedAnalogs { enum CalibratedAnalogs {