Skip to content

Conversation

@hydra
Copy link
Contributor

@hydra hydra commented Jun 14, 2019

In adcinternal.c, coreTemperature is always calculated every time adcInternalProcess is called, which internally calls getVrefMv(), the result of which is thrown away at the end of the method. later calls to adcVrefMv() will then recalculate the value.
this seems a little wasteful, is there a reason why we don't calculate adcVrefMv once, and store it like we do for coreTemperature?

This PR addresses this question.

@hydra hydra requested a review from jflyper June 14, 2019 15:40
@mikeller mikeller added this to the 4.1 milestone Jun 15, 2019
@mikeller mikeller merged commit 4b6c64f into betaflight:master Jun 17, 2019
@mikeller mikeller modified the milestones: 4.1, 4.0.5 Jul 24, 2019
mikeller added a commit that referenced this pull request Jul 24, 2019
…ode. (#8427)

Avoid recalculation of ADC vrefMv, add vrefMv to ADC_INTERNAL debug mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants