@@ -180,4 +180,28 @@ inline void SEND_FAILSAFE_1S()
|
||||
}
|
||||
}
|
||||
|
||||
#define LEN_R9M_MODES "\007"
|
||||
#define TR_R9M_MODES "FCC\0 ""LBT(EU)"
|
||||
#define LEN_R9M_FCC_POWER_VALUES "\006"
|
||||
#define LEN_R9M_LBT_POWER_VALUES "\006"
|
||||
#define TR_R9M_FCC_POWER_VALUES "10 mW\0" "100 mW" "500 mW" "1 W\0"
|
||||
#define TR_R9M_LBT_POWER_VALUES "25 mW\0" "500 mW"
|
||||
|
||||
enum R9MFCCPowerValues {
|
||||
R9M_FCC_POWER_10 = 0,
|
||||
R9M_FCC_POWER_100,
|
||||
R9M_FCC_POWER_500,
|
||||
R9M_FCC_POWER_1000,
|
||||
R9M_FCC_POWER_MAX = R9M_FCC_POWER_1000
|
||||
};
|
||||
|
||||
enum R9MLBTPowerValues {
|
||||
R9M_LBT_POWER_25 = 0,
|
||||
R9M_LBT_POWER_500,
|
||||
R9M_LBT_POWER_MAX = R9M_LBT_POWER_500
|
||||
};
|
||||
|
||||
#define BIND_TELEM_ALLOWED(idx) (!IS_MODULE_R9M_LBT(idx) || g_model.moduleData[idx].pxx.power == R9M_LBT_POWER_25)
|
||||
#define BIND_CH9TO16_ALLOWED(idx) (!IS_MODULE_R9M_LBT(idx) || g_model.moduleData[idx].pxx.power != R9M_LBT_POWER_25)
|
||||
|
||||
#endif // _PULSES_ARM_H_
|
||||
|
||||
@@ -378,18 +378,19 @@ void setupPulsesPXX(uint8_t port)
|
||||
/* Ext. flag (holds antenna selection on Horus internal module, 0x00 otherwise) */
|
||||
#if defined(PCBHORUS)
|
||||
if (port == INTERNAL_MODULE) {
|
||||
extra_flags |= g_model.moduleData[port].pxx.external_antenna;
|
||||
extra_flags |= (g_model.moduleData[port].pxx.external_antenna << 0);
|
||||
}
|
||||
#endif
|
||||
#if defined(BINDING_OPTIONS)
|
||||
extra_flags |= g_model.moduleData[port].pxx.receiver_telem_off << 1;
|
||||
extra_flags |= g_model.moduleData[port].pxx.receiver_channel_9_16 << 2;
|
||||
extra_flags |= (g_model.moduleData[port].pxx.receiver_telem_off << 1);
|
||||
extra_flags |= (g_model.moduleData[port].pxx.receiver_channel_9_16 << 2);
|
||||
#endif
|
||||
if (IS_MODULE_R9M(port)) {
|
||||
extra_flags |= g_model.moduleData[port].pxx.power << 3;
|
||||
// Disable s.port if internal module is active
|
||||
if (IS_TELEMETRY_INTERNAL_MODULE || !g_model.moduleData[port].pxx.sport_out)
|
||||
extra_flags |= (1<< 5);
|
||||
extra_flags |= (max(g_model.moduleData[port].pxx.power, IS_MODULE_R9M_FCC(port) ? (uint8_t)R9M_FCC_POWER_MAX : (uint8_t)R9M_LBT_POWER_MAX) << 3);
|
||||
// Disable S.PORT if internal module is active
|
||||
if (IS_TELEMETRY_INTERNAL_MODULE() || !g_model.moduleData[port].pxx.sport_out) {
|
||||
extra_flags |= (1 << 5);
|
||||
}
|
||||
}
|
||||
|
||||
putPcmByte(port, extra_flags);
|
||||
|
||||
Reference in New Issue
Block a user