Extra union added

This commit is contained in:
Bertrand Songis
2018-12-13 08:15:00 +01:00
parent 22c1d5895a
commit b850470783
2 changed files with 13 additions and 4 deletions
+12 -3
View File
@@ -406,9 +406,18 @@ PACK(struct ModuleData {
int8_t rfProtocol:4;
uint8_t channelsStart;
int8_t channelsCount; // 0=8 channels
uint8_t failsafeMode:4; // only 3 bits used
uint8_t subType:3;
uint8_t invertedSerial:1; // telemetry serial inverted from standard
union {
struct {
uint8_t failsafeMode:4; // only 3 bits used
uint8_t subType:3;
uint8_t invertedSerial:1; // telemetry serial inverted from standard
};
struct {
uint8_t failsafeMode:4; // only 3 bits used
uint8_t freq:2;
uint8_t region:2;
} r9m;
};
int16_t failsafeChannels[MAX_OUTPUT_CHANNELS];
union {
struct {
+1 -1
View File
@@ -1232,7 +1232,7 @@ void menuModelSetup(event_t event)
case ITEM_MODEL_EXTERNAL_MODULE_FREQ:
{
uint8_t moduleIdx = CURRENT_MODULE_EDITED(k);
uint8_t frequency = BF_GET(g_model.moduleData[moduleIdx].subType, 2, 1);
uint8_t frequency = BF_GET(g_model.moduleData[moduleIdx].r9m.freq, 2, 1);
lcdDrawTextAlignedLeft(y, STR_FREQUENCY);
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_R9MFLEX_FREQ, frequency, LEFT | attr);
if (attr)