changed the visual representation of the battery level #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please take a look on this commit that changes the way the battery level is shown. The problem with the old indicator was, that it should show the battery level (if < 25) as a number in percent. The problem: the kindle 4 can not show the percent sign. This looked strange. See for more details:
https://www.mobileread.com/forums/showthread.php?t=278982
I wanted to change that into a visual representation drawing two rectangles on the screen, showing how full the battery is. Unfortunatelly also this command does not work on a kindle 4 (argh!). See:
https://wiki.mobileread.com/wiki/Eips
Now I am using characters showing a somewhat visual representation (enriched with the number):
|----25->==|
Only pull it, if you like it.
Because I only want to call the drawing command once, I used this odd looking switch-case structure instead of a fancy loop to generate the characters.