Power issue with R9M (always max power) (#5513)

This commit is contained in:
Bertrand Songis
2017-12-14 15:34:14 +01:00
committed by Andre Bernet
parent dc89bb1dfc
commit d7645252bb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -674,7 +674,7 @@ PACK(struct ModuleData {
int8_t optionValue;
} multi);
NOBACKUP(struct {
uint8_t power:2; // 0=10 mW, 1=100 mW, 2=500 mW, 3=1W
uint8_t power:2; // 0=10 mW, 1=100 mW, 2=500 mW, 3=1W
uint8_t spare1:2;
uint8_t receiver_telem_off:1; // false = receiver telem enabled
uint8_t receiver_channel_9_16:1; // false = pwm out 1-8, true 9-16
+1 -1
View File
@@ -384,7 +384,7 @@ void setupPulsesPXX(uint8_t port)
extra_flags |= (g_model.moduleData[port].pxx.receiver_telem_off << 1);
extra_flags |= (g_model.moduleData[port].pxx.receiver_channel_9_16 << 2);
if (IS_MODULE_R9M(port)) {
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);
extra_flags |= (min(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);