Coder Social home page Coder Social logo

Comments (5)

pchickey avatar pchickey commented on August 19, 2024

Can you please provide the value of the SYS_STATUS packet in mavproxy (prints at the prompt with > status SYS_STATUS) while the indicator shows this error?

from mavelous.

dccourt avatar dccourt commented on August 19, 2024

Will do. While code reading it looked like there might be some interaction with avionics battery vs main battery - anyway, now I know how to dump the packets, I'll take a look at both the relevant ones.

from mavelous.

dccourt avatar dccourt commented on August 19, 2024

I struggled to get the prompt working with mav_proxy (not sure why) but anyway, I was able to grab the relevant data from status.txt:

101: SYS_STATUS {onboard_control_sensors_present : 4294966319, onboard_control_sensors_enabled : 4294945839, onboard_control_sensors_health : 4294966319, load : 0, voltage_battery : 11165, current_battery : -1, battery_remaining : -106, drop_rate_comm : 0, errors_comm : 0, errors_count1 : 0, errors_count2 : 0, errors_count3 : 0, errors_count4 : 0}

This corresponds to a battery indicator in mavelous of -106 - i.e. it seems to be taken directly from the battery_remaining param.

from mavelous.

dccourt avatar dccourt commented on August 19, 2024

This is an APM2.5 with a homemade voltage divider supplying the battery voltage metrics, and no current sensor (current sensor is disabled in arducopter config parameters). My guess is that this means that the arducopter firmware can't calculate battery_remaining properly.

My suggestion is that we change the code in mavelous to look at current_battery. If it's == -1, then display voltage_battery / 1000 for the battery status, otherwise behave as before.

Ideally we'd also allow for configuration of a low-battery threshold, and have colour-coding of the icon based on that - especially since the battery status number doesn't seem to be displayable on small-screen devices such as phones. I'm not sure what the right UI design for that is - perhaps have preset thresholds for the colours based on a drop-down preference setting of the number of cells? Or, for simplicity, just a pair of voltage thresholds, for the red and yellow colours. (Alternatively, a pop-up indicator on the battery icon that displays battery status, as per GPS, would be a good start).

If you guys let me know what you think for the design, I'd be happy to draft up and test a patch.

from mavelous.

pchickey avatar pchickey commented on August 19, 2024

Thanks for tracking down this behavior, we hadn't accounted for users who
have just a voltage sensor. I've only tested with my 3DR power board, which
has voltage and current.

Yes, I agree a configurable low battery threshold is a great idea. You can
probably add a popover like the GPS has fairly easily now that I've
refactored that code. We could look into a better UI for low voltage
alarms, maybe via a dismissable alert that appears below the navbar or at
the bottom of the screen.

I'd be happy to code review and accept a patch to add any of this
functionality.

Pat

On Mon, Mar 11, 2013 at 2:38 PM, David Court [email protected]:

This is an APM2.5 with a homemade voltage divider supplying the battery
voltage metrics, and no current sensor (current sensor is disabled in
arducopter config parameters). My guess is that this means that the
arducopter firmware can't calculate battery_remaining properly.

My suggestion is that we change the code in mavelous to look at
current_battery. If it's == -1, then display voltage_battery / 1000 for the
battery status, otherwise behave as before.

Ideally we'd also allow for configuration of a low-battery threshold, and
have colour-coding of the icon based on that - especially since the battery
status number doesn't seem to be displayable on small-screen devices such
as phones. I'm not sure what the right UI design for that is - perhaps have
preset thresholds for the colours based on a drop-down preference setting
of the number of cells? Or, for simplicity, just a pair of voltage
thresholds, for the red and yellow colours. (Alternatively, a pop-up
indicator on the battery icon that displays battery status, as per GPS,
would be a good start).

If you guys let me know what you think for the design, I'd be happy to
draft up and test a patch.


Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-14744505
.

from mavelous.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.