Skip to content

Conversation

@ishidawataru
Copy link

Description

fixes how to calculate the rx power when the external calibration is used according to the SFF-8472 Rev 12.4 section 9.3.

Motivation and Context

fixes #449

How Has This Been Tested?

No. Asking the original reporter of this bug to test this as I don't have access to a real device that uses this feature

Additional Information (Optional)

coeff = self.float_from_bytes(eeprom_data[off:off+size])
result += coeff * rx_pwr_ad ** i

result = result * 0.0001 # uW to mW

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the comment should make it clear that the result value is in 0.1 uW units, not uW (the formula in the documentation at section 9.3 is also misleading in that regards). Otherwise the conversion factor may be interpreted off by an order of magnitude by an unsuspecting reader.

@JaapKeuter
Copy link

@ishidawataru : See my feedback in the related issue 449
Are you planning to continue and merge this change?

@JaapKeuter
Copy link

This code has been tested, see issue 449, and found to be correct. The only remark is about a comment in the code.

With a changed comment this code should be merged, IMHO.

@JaapKeuter
Copy link

@ishidawataru : Could you pay attention to this change, i.e. finalizing the draft and putting it forward for merging please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SFF-8472 Rx power conversion function incorrect

2 participants