diff --git a/apps.json b/apps.json index 7449a233b..7985c6776 100644 --- a/apps.json +++ b/apps.json @@ -1178,7 +1178,8 @@ "name": "Battery Chart", "shortName":"Battery Chart", "icon": "app.png", - "version":"0.07", + "version":"0.08", + "readme": "README.md", "description": "A widget and an app for recording and visualizing battery percentage over time.", "tags": "app,widget,battery,time,record,chart,tool", "storage": [ diff --git a/apps/batchart/ChangeLog b/apps/batchart/ChangeLog index ba9e4e847..439d877be 100644 --- a/apps/batchart/ChangeLog +++ b/apps/batchart/ChangeLog @@ -4,4 +4,5 @@ 0.04: chart in the app is now active. 0.05: Display temperature and LCD state in chart 0.06: Fixes widget events and charting of component states -0.07: Improve logging and charting of component states and add widget icon \ No newline at end of file +0.07: Improve logging and charting of component states and add widget icon +0.08: Fix for Home button in the app and README added. \ No newline at end of file diff --git a/apps/batchart/README.md b/apps/batchart/README.md new file mode 100644 index 000000000..0ce2c646d --- /dev/null +++ b/apps/batchart/README.md @@ -0,0 +1,67 @@ +# Summary + +Battery Chart contains a widget that records the battery usage as well as information that might influence this usage. + +The app that comes with provides a graph that accumulates this information in a single screen. + +## How the widget works + +The widget records data in a fixed interval of ten minutes. + +When this timespan has passed, it saves the following information to a file called `bclogx` where `x` is + +the current day retrieved by `new Date().getDay()`: + +- Battery percentage +- Temperature (of the die) +- LCD state +- Compass state +- HRM state +- GPS state + +After seven days the logging rolls over and the previous data is overwritten. + +To properly handle the roll-over, the day of the previous logging operation is stored in `bcprvday`. + +The value is changed with the first recording operation of the new day. + +## How the App works + +### Events + +The app charts the last 144 (6/h * 24h) datapoints that have been recorded. + +If for the current day the 144 events have not been reached the list is padded with + +events from the previous `bclog` file(s). + +### Graph + +The graph then contains the battery percentage (left y-axis) and the temperature (right y-axis). + +In case the recorded temperature is outside the limits of the graph, the value is set to a minimum of 19 or a maximum of 41 and thus should be clearly visible outside of the graph's boundaries for the y-axis. + +The states of the various SoC devices are depicted below the graph. If at the time of recording the device was enabled a marker in the respective color is set, if not the pixels for this point in time stay black. + +If a device was not enabled during the 144 selected events, the name is not displayed. + +## File schema + +You can download the `bclog` files for your own analysis. They are `CSV` files without header rows and contain + +``` +timestamp,batteryPercentage,temperatureInDegreeC,deviceStates +``` + +with the `deviceStates` resembling a flag set consisting of + +``` +const switchableConsumers = { + none: 0, + lcd: 1, + compass: 2, + bluetooth: 4, + gps: 8, + hrm: 16 +}; +```