[Pulses] PXX2 Probe warning
This commit is contained in:
@@ -532,12 +532,12 @@ bool isInternalModuleAvailable(int module)
|
|||||||
|
|
||||||
#if defined(PXX1)
|
#if defined(PXX1)
|
||||||
if (module == MODULE_TYPE_XJT)
|
if (module == MODULE_TYPE_XJT)
|
||||||
return !isModulePXX(EXTERNAL_MODULE);
|
return !IS_PXX2_INTERNAL_ENABLED() && !isModulePXX(EXTERNAL_MODULE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PXX2)
|
#if defined(PXX2)
|
||||||
if (module == MODULE_TYPE_XJT2)
|
if (module == MODULE_TYPE_XJT2)
|
||||||
return true;
|
return IS_PXX2_INTERNAL_ENABLED();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ extern "C" void INTMODULE_USART_IRQHandler(void)
|
|||||||
intmoduleFifo.errors++;
|
intmoduleFifo.errors++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
hardwareOptions.pxx2Enabled = true;
|
||||||
intmoduleFifo.push(data);
|
intmoduleFifo.push(data);
|
||||||
}
|
}
|
||||||
status = INTMODULE_USART->SR;
|
status = INTMODULE_USART->SR;
|
||||||
|
|||||||
@@ -182,9 +182,6 @@ void boardInit()
|
|||||||
pwrInit();
|
pwrInit();
|
||||||
delaysInit();
|
delaysInit();
|
||||||
|
|
||||||
// FrSky removed the volume chip in latest board, that's why it doesn't answer!
|
|
||||||
// i2cInit();
|
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
serial2Init(0, 0); // default serial mode (None if DEBUG not defined)
|
serial2Init(0, 0); // default serial mode (None if DEBUG not defined)
|
||||||
#endif
|
#endif
|
||||||
@@ -194,6 +191,11 @@ void boardInit()
|
|||||||
TRACE("\nHorus board started :)");
|
TRACE("\nHorus board started :)");
|
||||||
TRACE("RCC->CSR = %08x", RCC->CSR);
|
TRACE("RCC->CSR = %08x", RCC->CSR);
|
||||||
|
|
||||||
|
#if defined(PXX2)
|
||||||
|
#warning "PXX2 probe is not implemented"
|
||||||
|
hardwareOptions.pxx2Enabled = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
audioInit();
|
audioInit();
|
||||||
|
|
||||||
// we need to initialize g_FATFS_Obj here, because it is in .ram section (because of DMA access)
|
// we need to initialize g_FATFS_Obj here, because it is in .ram section (because of DMA access)
|
||||||
|
|||||||
@@ -199,11 +199,7 @@ PACK(typedef struct {
|
|||||||
|
|
||||||
extern HardwareOptions hardwareOptions;
|
extern HardwareOptions hardwareOptions;
|
||||||
|
|
||||||
#if defined(PCBX10)
|
#define IS_PXX2_INTERNAL_ENABLED() (hardwareOptions.pxx2Enabled)
|
||||||
#define IS_PXX2_INTERNAL_ENABLED() (true)
|
|
||||||
#else
|
|
||||||
#define IS_PXX2_INTERNAL_ENABLED() (hardwareOptions.pxx2Enabled)
|
|
||||||
#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);
|
||||||
|
|||||||
@@ -169,6 +169,11 @@ 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();
|
||||||
|
|||||||
@@ -462,15 +462,6 @@ enum Analogs {
|
|||||||
#define NUM_MOUSE_ANALOGS 0
|
#define NUM_MOUSE_ANALOGS 0
|
||||||
#define NUM_DUMMY_ANAS 0
|
#define NUM_DUMMY_ANAS 0
|
||||||
|
|
||||||
PACK(typedef struct {
|
|
||||||
#if defined(STICKS_PWM)
|
|
||||||
uint8_t sticksPwmDisabled:1;
|
|
||||||
#endif
|
|
||||||
uint8_t pxx2Enabled:1;
|
|
||||||
}) HardwareOptions;
|
|
||||||
|
|
||||||
extern HardwareOptions hardwareOptions;
|
|
||||||
|
|
||||||
#if defined(STICKS_PWM)
|
#if defined(STICKS_PWM)
|
||||||
#define NUM_PWMSTICKS 4
|
#define NUM_PWMSTICKS 4
|
||||||
#define STICKS_PWM_ENABLED() (!hardwareOptions.sticksPwmDisabled)
|
#define STICKS_PWM_ENABLED() (!hardwareOptions.sticksPwmDisabled)
|
||||||
@@ -482,10 +473,21 @@ extern HardwareOptions hardwareOptions;
|
|||||||
#define NUM_TRIMS_KEYS 8
|
#define NUM_TRIMS_KEYS 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBXLITES) || defined(DEBUG)
|
PACK(typedef struct {
|
||||||
|
#if NUM_PWMSTICKS > 0
|
||||||
|
uint8_t sticksPwmDisabled:1;
|
||||||
|
#endif
|
||||||
|
uint8_t pxx2Enabled:1;
|
||||||
|
}) HardwareOptions;
|
||||||
|
|
||||||
|
extern HardwareOptions hardwareOptions;
|
||||||
|
|
||||||
|
#if !defined(PXX2)
|
||||||
|
#define IS_PXX2_INTERNAL_ENABLED() (false)
|
||||||
|
#elif defined(PCBXLITES) || defined(PCBX3) || defined(SIMU)
|
||||||
#define IS_PXX2_INTERNAL_ENABLED() (true)
|
#define IS_PXX2_INTERNAL_ENABLED() (true)
|
||||||
#else
|
#else
|
||||||
#define IS_PXX2_INTERNAL_ENABLED() (hardwareOptions.pxx2Enabled)
|
#define IS_PXX2_INTERNAL_ENABLED() (hardwareOptions.pxx2Enabled)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum CalibratedAnalogs {
|
enum CalibratedAnalogs {
|
||||||
|
|||||||
Reference in New Issue
Block a user