Skip to content

Commit

Permalink
common, sx1280 driver, revert powercalc with frequencyband, doesn't m…
Browse files Browse the repository at this point in the history
…ake sense
  • Loading branch information
olliw42 committed Jul 29, 2024
1 parent 141b0d7 commit 1b74e3e
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions mLRS/Common/sx-drivers/sx128x_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,10 @@ class Sx128xDriverCommon : public Sx128xDriverBase
return actual_power_dbm;
}

protected:
tSxGlobalConfig* gconfig;

private:
const tSxLoraConfiguration* lora_configuration;
const tSxFlrcConfiguration* flrc_configuration;
tSxGlobalConfig* gconfig;
uint8_t sx_power;
int8_t actual_power_dbm;
};
Expand Down Expand Up @@ -390,11 +388,7 @@ class Sx128xDriver : public Sx128xDriverCommon

void RfPowerCalc(int8_t power_dbm, uint8_t* sx_power, int8_t* actual_power_dbm) override
{
#ifdef POWER_USE_DEFAULT_RFPOWER_CALC
sx1280_rfpower_calc(power_dbm, sx_power, actual_power_dbm, POWER_GAIN_DBM, POWER_SX1280_MAX_DBM);
#else
sx1280_rfpower_calc(power_dbm, sx_power, actual_power_dbm, gconfig->FrequencyBand);
#endif
}

//-- init API functions
Expand Down Expand Up @@ -542,11 +536,7 @@ class Sx128xDriver2 : public Sx128xDriverCommon
#ifdef DEVICE_HAS_DUAL_SX126x_SX128x
sx1280_rfpower_calc(power_dbm, sx_power, actual_power_dbm, POWER2_GAIN_DBM, POWER2_SX1280_MAX_DBM);
#else
#ifdef POWER_USE_DEFAULT_RFPOWER_CALC
sx1280_rfpower_calc(power_dbm, sx_power, actual_power_dbm, POWER_GAIN_DBM, POWER_SX1280_MAX_DBM);
#else
sx1280_rfpower_calc(power_dbm, sx_power, actual_power_dbm, gconfig->FrequencyBand);
#endif
#endif
}

Expand Down

0 comments on commit 1b74e3e

Please sign in to comment.