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.
  • OK, please, could you write me what to do? I did not find any information concerning this. Thank you.
  • Former Member
    Former Member over 10 years ago
    You can rewrite setings to new format if app can it change before crash, or delete file with old setting/data - app create new one. Settings are stored in folder garmin/apps/data - and You must find right file.
  • Former Member
    Former Member over 10 years ago
    Wow, white background :) THX!
    After upgrade I lost my data for graph, but I now it is normal :) Catch new one :)
    Can I change X-scale on the fly? With out lost data?


    Sorry, changing scale resets the data file. There is limited memory on the watch, so for the moment I cannot keep a whole week's data if you only select a 1 day scale. I'm looking at ways to work around this, but cannot promise anything...

    OK, please, could you write me what to do? I did not find any information concerning this. Thank you.


    Sorry about that, it should have worked, I have been running v1.0 on my own watch for a couple of days now before publishing.

    But here is how you delete the old data file:
    Connect your watch to a computer with the USB cable, and go to the GARMIN/APPS/ folder. Make a note of all the *.PRG files. One of them is the battery widget. On my watch it is named 54DJ5003.PRG, I'm not sure if it is the same on other watches...

    In the GARMIN/APPS/DATA folder there should be a *.STR file with the same name, in my case 54DJ5003.STR. Delete the *.STR file, and all should be OK.

    If you have several *.PRG files, and don't know which is the correct one, you can delete the widget with Garmin Express, and make a note of which file disappeared. Then you know which file is the data file.

    Hope this helps, and please consider changing your review in the app store. The widget works fine on my own watch and in the simulator, and there really isn't anything else I can do to make sure it works for everyone else...

    -Torstein
  • Former Member
    Former Member over 10 years ago
    Try use method like mrtg. Hold 5min data for day (24*60/5 = 288 values), averange 5mins sum/per hour (24*7 = 168). You don't need 5min precision in 7days graph.
  • TORSTEINVH : YES!!! thank you, just work, perfect!!! I am so happy and I am not worry :-)
    App is perfect. Thanx for that.
  • Former Member
    Former Member over 10 years ago
    Good to hear, DAPE-BRNO :)
  • Former Member
    Former Member over 10 years ago
    Sorry, changing scale resets the data file. There is limited memory on the watch, so for the moment I cannot keep a whole week's data if you only select a 1 day scale. I'm looking at ways to work around this, but cannot promise anything...

    Updated version with possibility to change scale witout losing data is coming shortly :)

    -Torstein
  • Former Member
    Former Member over 10 years ago
    Wow, good job :)
  • Former Member
    Former Member over 10 years ago
    Version 1.1 is now uploaded to the App Store.

    Changes:
    • Data is now longer deleted when changing scale :)
    • When changing scale in the menu, the view is immediately switched to teh graph view.
    • Added '2 Weeks' option to scale menu


    I have tested this version on my own watch for several days without problems. If you encounter any problems, please seek advice in this thread before posting a negative review.

    Planned in the next version:
    • Adding a '1 Month' option to scale menu
    • Adding marker showing lowest scale value

    This is to visualize several charge cycles.

    Feedback and feature suggestions welcome!

    -Torstein
  • Thank you for this nice and helpful app torstain.

    Just a reminder for all, data is not deleted when changing scale as said by tor
    But it's deleted when updating the app. I was trying to see a weeks graph, but ill start again :P