Yes, I do plan on addressing this. I was waiting for some decision from the MAVlink team on our proposal of additional fields in a message....but I don't believe they have responded. Right now, there is no field for current (amps) in the MAVlink protocol... You wouldn't believe the number of posts and complaints having to do with battery capacity. I know it's important. I just didn't know it was this important. You don't need to do a work around. I'll fix way I'm handling the message. When I originally wrote tha parsing routine, APM wasn't passing anything having to do with battery capacity or voltage.
I've been swamped with other projects recently and haven't had time to work on my GCS....
I agree that there is no MAVlink field for current, but the "battery remaining" field is working for me in APM 2.12 and seems to be reported properly in HK GCS 1.2.96. "Battery remaining" is transferred as a percentage of the capacity entered in APM (i.e. if you have used 200 mAh and the capacity was set to 2000mAh it will return 90%.) The HK GCS mAh counter then scales the value you have entered on the settings/instruments page by the percentage parameter. I see the bar and numerical value coming down as I use more of the battery.
In 2.11 there was a problem with the scaling in mavlink_common.h that meant that the parameter was too low by a factor of 100, so it was always reporting back less than 1% remaining, but this was corrected in 2.12
I downloaded HK-GCS 1.2.96 (deprecated) and installed it.
I still get battery voltage reported correctly by HK-GCS, but the mAh does not change.
When I look at the parsed serial data, the only place that battery data appears is in waypoint data. There I see...
1.2.96 and 1.2.98 are the same.
But you and Simon report that mAh does work. So what am I missing? I do have battery mode set to 4 and APM Terminal gives good numbers when I run test] current
I have confirmed that both 1.2.96 and 1.2.98 DO report declining mAh values.
I had a zero-offset constant that was a little off and caused the current sensor calculation to report very small ma drain --- too small to see unless I waited several minutes. When I correct that value and put a larger load on the battery, all works as expected.
It's still a mystery as to why the serial data display of HK_GCS doesn't show a capacity being read, but I'm going to leave that up to HappyKillmore.
Thanks for the prodding.
Please download 1.2.100 and let me know how it goes.
Please also note that you might need to go into File, Settings, Instruments and verify your max capacity is set correctly as well as your voltage limits. I've been changing my regional settings a lot and have found sometimes it looses my decimal place and 12.5V becomes 125V.... Let me know what you find so I can fix it for everyone. I'll also look into using the parameter value from APM as the max mAh value and post another update.
1) No problem found with either mAh or voltage settings. I changed them from my previous settings, just as a test, and there were no decimal place errors.
2) Since the max mAh parameter has to match in APM and HK-GCS, it makes sense to automate that matching. Then the user only has to set the APM parameter. Nice.
3) I am happily using HK_GCS during my initial testing of APM. I've not launched an aircraft (EasyStar) yet --- still getting things mounted.
4) I did kludge up a way to return amps from APM/MAVlink for display by HK-GCS. I co-opted HDOP. That's working well for me.
5) The serial data display now shows capacity and amps (which will remain equal to zero until there is a change to a MAVlink message I assume.)
6) I discovered the "donate" button on your site and tested it. That seems to work too.