Cosmetics
This commit is contained in:
@@ -331,111 +331,6 @@ inline int8_t sentModuleChannels(uint8_t idx)
|
||||
return 8 + g_model.moduleData[idx].channelsCount;
|
||||
}
|
||||
|
||||
enum {
|
||||
MODULE_OPTION_EXTERNAL_ANTENNA,
|
||||
MODULE_OPTION_POWER,
|
||||
MODULE_OPTION_SPECTRUM_ANALYSER,
|
||||
MODULE_OPTION_POWER_METER,
|
||||
};
|
||||
|
||||
/* Options order:
|
||||
* - External antenna (0x01)
|
||||
* - Power (0x02)
|
||||
* - Spektrum analyser (0x04)
|
||||
* - Power meter (0x08)
|
||||
*/
|
||||
static const uint8_t moduleOptions[] = {
|
||||
#if defined(SIMU)
|
||||
0b11111111, // None = display all options on SIMU
|
||||
#else
|
||||
0b00000000, // None = no option available on unknown modules
|
||||
#endif
|
||||
0b11110001, // XJT
|
||||
0b11110001, // ISRM
|
||||
0b11111101, // ISRM-PRO
|
||||
0b11110101, // ISRM-S
|
||||
0b11110010, // R9M
|
||||
0b11110010, // R9MLite
|
||||
0b11110110, // R9MLite-PRO
|
||||
0b11110100, // ISRM-N
|
||||
};
|
||||
|
||||
inline uint8_t getPXX2ModuleOptions(uint8_t modelId)
|
||||
{
|
||||
if (modelId < DIM(moduleOptions))
|
||||
return moduleOptions[modelId];
|
||||
else
|
||||
return moduleOptions[0];
|
||||
}
|
||||
|
||||
inline bool isModuleOptionAvailable(uint8_t modelId, uint8_t option)
|
||||
{
|
||||
return getPXX2ModuleOptions(modelId) & (1 << option);
|
||||
}
|
||||
|
||||
enum {
|
||||
RECEIVER_OPTION_OTA,
|
||||
};
|
||||
|
||||
/* Options order:
|
||||
* - OTA (0x01)
|
||||
*/
|
||||
static const uint8_t receiverOptions[] = {
|
||||
#if defined(SIMU)
|
||||
0b11111111, // None = display all options on SIMU
|
||||
#else
|
||||
0b00000000, // None = display all options on SIMU
|
||||
#endif
|
||||
0b11111110, // X8R
|
||||
0b11111110, // RX8R
|
||||
0b11111110, // RX8R-PRO
|
||||
0b11111110, // RX6R
|
||||
0b11111110, // RX4R
|
||||
0b11111110, // G-RX8
|
||||
0b11111110, // G-RX6
|
||||
0b11111110, // X6R
|
||||
0b11111110, // X4R
|
||||
0b11111110, // X4R-SB
|
||||
0b11111110, // XSR
|
||||
0b11111110, // XSR-M
|
||||
0b11111110, // RXSR
|
||||
0b11111110, // S6R
|
||||
0b11111110, // S8R
|
||||
0b11111110, // XM
|
||||
0b11111110, // XM+
|
||||
0b11111110, // XMR
|
||||
0b11111110, // R9
|
||||
0b11111110, // R9-SLIM
|
||||
0b11111110, // R9-SLIM+
|
||||
0b11111110, // R9-MINI
|
||||
0b11111110, // R9-MM
|
||||
0b11111110, // R9-STAB
|
||||
0b11111111, // R9-MINI+OTA
|
||||
0b11111111, // R9-MM+OTA
|
||||
};
|
||||
|
||||
enum ModuleCapabilities {
|
||||
MODULE_CAPABILITY_COUNT
|
||||
};
|
||||
|
||||
enum ReceiverCapabilities {
|
||||
RECEIVER_CAPABILITY_FPORT,
|
||||
RECEIVER_CAPABILITY_COUNT
|
||||
};
|
||||
|
||||
inline uint8_t getPXX2ReceiverOptions(uint8_t modelId)
|
||||
{
|
||||
if (modelId < DIM(receiverOptions))
|
||||
return receiverOptions[modelId];
|
||||
else
|
||||
return receiverOptions[0];
|
||||
}
|
||||
|
||||
inline bool isReceiverOptionAvailable(uint8_t modelId, uint8_t option)
|
||||
{
|
||||
return getPXX2ReceiverOptions(modelId) & (1 << option);
|
||||
}
|
||||
|
||||
inline bool isDefaultModelRegistrationID()
|
||||
{
|
||||
return memcmp(g_model.modelRegistrationID, g_eeGeneral.ownerRegistrationID, PXX2_LEN_REGISTRATION_ID) == 0;
|
||||
|
||||
Reference in New Issue
Block a user