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

MAVLink Simulation: Battery Percentage Fix #11205

Merged
merged 2 commits into from
Jan 14, 2019
Merged

Commits on Jan 13, 2019

  1. simulator_mavlink: switch battery max and min to fix simultion

    In 3e6e1f5 the simulated battery
    percentage was reversed. I'm assuming because of the possibly
    missleading variable name. Now I'm fixing it by switching the
    maximum and minimum voltage such that the name is not misleading anymore
    but it still works as expected.
    MaEtUgR committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    b84e01b View commit details
    Browse the repository at this point in the history
  2. simulator_mavlink: take care of battery percentage rounding errors

    In 5bb9bab I made MAVLink send a
    rounded up integer instead of rounded down. This makes sense in practice
    because the low battery reactions happen exactly when the reported number
    switches in the UI. But here we want to provoke an exact 50% in the UI so
    we stop counting at 49.9%, it get's rounded up and we see the expected
    result.
    MaEtUgR committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    d3a0311 View commit details
    Browse the repository at this point in the history