Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler bug, MSP2_INAV_ANALOG and convert amperage from int32_t to int16_t #3469

Merged
merged 2 commits into from
Jun 28, 2018

Conversation

shellixyz
Copy link
Collaborator

@shellixyz shellixyz commented Jun 27, 2018

  • Work around compiler bug in int64 math causing issues with mAh and mWh calculations when amperage is negative
  • Fix MSP2_INAV_ANALOG to return possible negative values of power, mAhDrawn and mWhDrawn
  • int16_t should be enough for amperage (+-325A)

Matching configurator update: iNavFlight/inav-configurator#500

- Fix MSP2_INAV_ANALOG to return possible negative values of `power`, `mAhDrawn` and `mWhDrawn`
- int16_t should be enough for amperage (+-325A)
@shellixyz shellixyz changed the title Fix MSP2_INAV_ANALOG and convert amperage from int32_t to int16_t Fix compiler bug, MSP2_INAV_ANALOG and convert amperage from int32_t to int16_t Jun 28, 2018
@giacomo892
Copy link
Collaborator

Tried on the bench and last commit fixed my issues with crazy mah readings on the OSD

@fiam fiam merged commit a8415e8 into iNavFlight:development Jun 28, 2018
@fiam fiam added this to the 2.0 milestone Jun 28, 2018
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.

3 participants