ACCST on ACCESS (#6430)

ACCST on ACCESS
This commit is contained in:
Bertrand Songis
2019-05-18 23:15:46 +02:00
committed by GitHub
parent aeaf46bc89
commit a177c7788c
14 changed files with 62 additions and 79 deletions
+12 -14
View File
@@ -214,7 +214,6 @@ inline int8_t sentModuleChannels(uint8_t idx)
}
enum {
MODULE_OPTION_RF_PROTOCOL,
MODULE_OPTION_EXTERNAL_ANTENNA,
MODULE_OPTION_POWER,
MODULE_OPTION_SPECTRUM_ANALYSER,
@@ -222,11 +221,10 @@ enum {
};
/* Options order:
* - RF Protocol (0x01)
* - External antenna (0x02)
* - Power (0x04)
* - Spektrum analyser (0x08)
* - Power meter (0x10)
* - External antenna (0x01)
* - Power (0x02)
* - Spektrum analyser (0x04)
* - Power meter (0x08)
*/
static const uint8_t moduleOptions[] = {
#if defined(SIMU)
@@ -234,14 +232,14 @@ static const uint8_t moduleOptions[] = {
#else
0b00000000, // None = display all options on SIMU
#endif
0b11100011, // XJT
0b11100011, // ISRM
0b11111011, // ISRM-PRO
0b11101011, // ISRM-S
0b11100100, // R9M
0b11100100, // R9MLite
0b11111100, // R9MLite-PRO
0b11101001, // ISRM-N
0b11110001, // XJT
0b11110001, // ISRM
0b11111101, // ISRM-PRO
0b11110101, // ISRM-S
0b11110010, // R9M
0b11110010, // R9MLite
0b11111110, // R9MLite-PRO
0b11110100, // ISRM-N
};
inline bool isModuleOptionAvailable(uint8_t modelId, uint8_t option)
-1
View File
@@ -110,7 +110,6 @@ class ModuleSettings {
public:
uint8_t state; // 0x00 = READ 0x40 = WRITE
tmr10ms_t retryTime;
uint8_t rfProtocol;
uint8_t externalAntenna;
int8_t txPower;
};
+4 -4
View File
@@ -36,9 +36,9 @@ uint8_t Pxx2Pulses::addFlag0(uint8_t module)
return flag0;
}
void Pxx2Pulses::addFlag1()
void Pxx2Pulses::addFlag1(uint8_t module)
{
uint8_t flag1 = 0;
uint8_t flag1 = g_model.moduleData[module].rfProtocol << 6;
Pxx2Transport::addByte(flag1);
}
@@ -110,7 +110,7 @@ void Pxx2Pulses::setupChannelsFrame(uint8_t module)
uint8_t flag0 = addFlag0(module);
// Flag1
addFlag1();
addFlag1(module);
// Failsafe / Channels
if (flag0 & PXX2_CHANNELS_FLAG0_FAILSAFE)
@@ -180,7 +180,7 @@ void Pxx2Pulses::setupModuleSettingsFrame(uint8_t module)
flag0 |= PXX2_TX_SETTINGS_FLAG0_WRITE;
Pxx2Transport::addByte(flag0);
if (destination->state == PXX2_SETTINGS_WRITE) {
uint8_t flag1 = destination->rfProtocol << 6;
uint8_t flag1 = 0;
if (destination->externalAntenna)
flag1 |= PXX2_TX_SETTINGS_FLAG1_EXTERNAL_ANTENNA;
Pxx2Transport::addByte(flag1);
+1 -1
View File
@@ -236,7 +236,7 @@ class Pxx2Pulses: public Pxx2Transport {
uint8_t addFlag0(uint8_t module);
void addFlag1();
void addFlag1(uint8_t module);
void addPulsesValues(uint16_t low, uint16_t high);