Bsongis/receivers ota update (#6494)

OTA update fixes
This commit is contained in:
Bertrand Songis
2019-06-13 17:06:25 +02:00
committed by GitHub
parent 344e53e3e2
commit 18c6f6878d
20 changed files with 179 additions and 86 deletions
+46 -2
View File
@@ -23,8 +23,6 @@
#include "bitfield.h"
#define CROSSFIRE_CHANNELS_COUNT 16
#if defined(MULTIMODULE)
@@ -261,6 +259,52 @@ inline bool isModuleOptionAvailable(uint8_t modelId, uint8_t option)
return moduleOptions[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
};
inline bool isReceiverOptionAvailable(uint8_t modelId, uint8_t option)
{
return receiverOptions[modelId] & (1 << option);
}
inline bool isDefaultModelRegistrationID()
{
return memcmp(g_model.modelRegistrationID, g_eeGeneral.ownerRegistrationID, PXX2_LEN_REGISTRATION_ID) == 0;