-
Notifications
You must be signed in to change notification settings - Fork 85
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
Battery indicator seems broken on Arducopter 2.8.1 #50
Comments
Can you please provide the value of the SYS_STATUS packet in mavproxy (prints at the prompt with |
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. |
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. |
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. |
Thanks for tracking down this behavior, we hadn't accounted for users who Yes, I agree a configurable low battery threshold is a great idea. You can I'd be happy to code review and accept a patch to add any of this Pat On Mon, Mar 11, 2013 at 2:38 PM, David Court [email protected]:
|
I'm not sure which parameter the battery status indication is being read from, but for me it always says "-102%" in mavelous.
In QGroundControl and MissionPlanner, I see the correct voltage reading being displayed.
I'm running Arducopter 2.8.1 on APM 2.5.
The text was updated successfully, but these errors were encountered: