Widget: Battery Gauge

Former Member
Former Member
Battery Gauge

Battery Gauge Widget v2.1




Widget showing battery history for a selected period. Currently it is a bit limited, since it isn't possible to have a process running in the background storing the battery state continuosly. The way the widget currently works is that every time the widget is started, the battery charge value is read and saved. The value is compared to the previous one, and the graph is updated. Each bar in the graph represents an hour (in week view), so if the widget for instance is started at 12 o'clock and later at 4 o'clock, the values at 12 and 4 are real values. The values at 1, 2 and 3 o'clock are calculated based on the difference between 12 and 4. If one starts the widget at regular intervals, the graph should give a quite good representation of the battery state.

Widget menu (press Start/Enter button)
  • Statistics screen, showing battery drain the last hour, the last day, since a user defined time and since last log reset.
  • Switch the graph scale between 1 month, 2 weeks, 1 week, 4 days and 1 day (Log data is no longer deleted when changing scale).
  • Switch between no graph markers, high/low markers or markers for each step on the x-axis.
  • Switch between black or white background.
  • Reset the log.

Please note:
  • Since each bar represents one hour, there will be no data visible for the first hour after the widget is run the first time. If after several hours no graph is visible, try clearing the log from the widget menu.
  • It is recommended to clear the log after installing a new version.
  • If after clearing the log problems still persist, it may be necessary to manually delete the log file. Instructions in this post: Deleting log file manually


Updates:

Version 2.1 - September 18, 2016
  • Support for Vivoactive HR
  • Fixed layout issues on new Forerunner and Fenix series watches
  • Improved the ability to scroll past the widget in the widget list


Version 1.9b - November 23, 2015
  • Added experimental support for FR230, FR235 and FR630. Please regard this as beta software for the time being.

Version 1.8 - June 24, 2015
  • Updated to Connect IQ v1.1.2.
  • Added support for D2 Bravo.

Version 1.7 - May 27, 2015
  • Improved precision on statistics calculations.
  • Added version number to statistics screen.

Version 1.6.5 - May 17, 2015
  • Fixed a bug regarding 'last hour' and 'last day' statistics.

Version 1.6.2 - May 10, 2015
  • Increased size of graph marker font.

Version 1.6 - May 9, 2015
  • Thanks to Gigios (Vivoactive) andMourk.D (Fenix 3) for beta testing!
  • Added 'Statistics' screen, showing battery drain over various periods.
  • Added experimental Vivoactive support. Please regard this as beta software for the time being.
  • Added ForeAthlete 920XTJ support.
  • Renamed 'Clear Log' to 'Reset Log'
  • Bug fixes.

Version 1.2 - April 28, 2015
  • Added option to select between graph markers.
  • Added 1 month scale option.

Version 1.1 - April 17, 2015
  • Data is no longer cleared when changing scale.
  • When selecting a new scale in the menu, view is immediately returned to graph.
  • Added 2 week scale option.

Version 1.0 - April 13, 2015
  • Added possibility to change graph scale.
  • Added possibility to change background color.
  • Added marker showing highest value of graph.
  • Bug fixes.

Version 0.8 beta - April 08, 2015
  • Forerunner 920XT support - NOTE: Only tested in simulator.
  • Added possibility to delete log file via widget menu.
  • Small tweaks to graph.

Version 0.7 beta - April 07, 2015
  • Bug fixes.
  • Added version number to screen.

Version 0.6 beta - April 07, 2015
  • Initial version.
  • Former Member
    Former Member over 10 years ago
    Hi,

    New version released to the App Store.

    - Upgraded to Connect IQ v1.1.2
    - Added D2 support

    Please make sure your watch firmware supports Connect IQ 1.1.2 before upgrading.
    If you experience problems, and clearing the log doesn't help, please delete the log file manually, as described here.

    -Torstein
  • Former Member
    Former Member over 10 years ago
    Great App. Really well done. Thanks!
  • Thank you Torstien, perfect application.

    I'm using it on my new Epix and I found something very interesting. I thought you could know something about it. Your widget shows battery level exactly the same as what is seen after entering main menu from watch face. Watch suddenly shut itself down when the charge status was approximately 7%. I recharge the battery to 100% and installed BatteryLifetimePrediction as second widget. After workout I noticed that BatteryLifetimePrediction shows a few procet lower state of charge then your application or system. Do you have some idea what it could be?

    Thanks,
    Peter
  • Former Member
    Former Member over 10 years ago
    The Battery Lifetime Prediction Widget is not compatible with the fenix3, so I cannot test it for myself, but from the description i see this change:
    "v 3.31: changed accu capacity calculation - displays now the percentage of rest-lifetime instead of percentage based on battery-voltage"

    If I understand that correctly, the percentage shown is not actual battery charge left, but a percentage based on the usable time left before the battery is empty.

    -Torstein
  • Former Member
    Former Member over 9 years ago
    Forerunner 230, 235 and 630 beta testers wanted

    Hello,

    I'm currently working on making the Battery Gauge Widget compatible with the new Forerunners.
    If anyone is interested in participating in beta testing, please send med a PM or reply to this post :)

    -Torstein
  • Former Member
    Former Member over 9 years ago
    Added Forerunner 230, 235 and 630 support

    Support for the new Forerunners added.
  • I have the 630 and the graph goes from the right side to left side ?.
    Its a bit confusing.
    I think it should be opposite way, like the ordinary reading direction.

    Is there a way to change the direction of the plottet graph ?.
  • Former Member
    Former Member over 9 years ago
    All the built-in graphs on the Garmins I have seen go from right to left (temperature, altitude, barometer), and my aim was to make the battery graph as similar to the built in graphs as possible.

    But I'll see if I can make it an option to reverse the direction of the graph :-)
  • Support for the new Forerunners added.


    Thanks, Torstein. I'm using the 235 and its working fairly well for it. One issue is that it kind of freezes up the watch when I'm cycling through widgets - it takes 2-3 seconds to load, even to just cycle past it. In those 2-3 seconds, the display freezes a few times, including between the previous 2 widgets.

    In the startup code, would it be possible to just do 3 things: read battery, log battery, then set a callback for the UI update? If that's not already the case, maybe the first UI update could be very light - just display "$CURRENT_VALUE\nLoading History" - basically, replace the histogram with "Loading History."

    If you haven't noticed what I'm talking about, I have a dev environment and would be willing to test and modify it so it works smoothly on the 230/235 and send the changes back to you.