Skip to content

Battery indicator by double tap #2151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

skywinder
Copy link
Collaborator

@skywinder skywinder commented Apr 4, 2025

1/ added double tap with battery indicator on device

2/ added docs with info about led colors and it's meaning

IMG_0592.MOV

@skywinder skywinder marked this pull request as ready for review April 4, 2025 13:23
@beastoin
Copy link
Collaborator

beastoin commented Apr 4, 2025

cool man. please split this PR into 2 parts, one for bug fix and another onr for the new feature.

for the bug fix, please tell me more about the 4096 number. why is this and why we need this ?

@skywinder

@skywinder
Copy link
Collaborator Author

do you mean 4074?

It's s the maximum voltage my Omi gets when it’s fully charged. That corresponds to about 96%, which is what I usually see in the app when it’s fully charged.

The better approach would be to gradually adjust the percentage rather than just cutting off the top value — but that would require more changes. For now, I want to keep it minimal. So the battery indicator in the app will show 100%, then drop to 97% sharply, and from there start decreasing as usual.

@@ -183,6 +183,14 @@ int battery_get_millivolt(uint16_t *battery_millivolt)

int battery_get_percentage(uint8_t *battery_percentage, uint16_t battery_millivolt)
{
// Fix for issue #1885: Battery never shows 100% even when fully charged
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beastoin Here is a comment regarding this number.
Omi never charges till 4200, which equal to 100%

@skywinder
Copy link
Collaborator Author

skywinder commented Apr 5, 2025

#2154 - @beastoin separated fix here. I will revert it in this PR and rename it to the feature

@skywinder skywinder changed the title Battery indicator Battery indicator by double tap Apr 5, 2025
@beastoin
Copy link
Collaborator

beastoin commented Apr 7, 2025

0/ ok, replied #2154 (comment)

1/ cool man ~ btw, what is the indicator system are you following for the battery-related indicator ? it looks complicated a bit so i want to understand more about how our users could adapt with this system.

Screenshot 2025-04-07 at 15 24 29

@skywinder

@beastoin
Copy link
Collaborator

hey man, it's cleaning time.

/ closed

3 days with no updates
feel free to reopen it anytime

@beastoin beastoin closed this Apr 14, 2025
@skywinder
Copy link
Collaborator Author

it looks complicated a bit so i want to understand more about how our users could adapt with this system.

So, I’ve tested five different options—different colors, blink counts, and frequencies—and I found this one to be the most straightforward.
But I’m totally open to feedback—maybe you have a better idea for how to handle the indication.

The only thing I really want is to be able to check the battery on the OMI without needing my phone nearby. The simplest way is just to blink from 1 to 10 times, maybe with different colors—but counting up to 10 blinks is actually pretty hard in practice, so I decided to simplify it.

I went with a maximum of 3 blinks using different colors to show the battery level.
I also wrote a detailed README so it’s clear and easy to understand.

What’s your take on this? Any ideas for how to improve the UX further? @thinhx

@skywinder skywinder reopened this Apr 14, 2025
Comment on lines +11 to +19

| LED Pattern | Meaning |
|-------------|---------|
| **Blue solid** | Device is connected to a phone via Bluetooth |
| **Red solid** | Device is recording but not connected to a phone |
| **Green blinking** (while charging) | Battery is charging |
| **Green solid** (while charging) | Battery is fully charged (100%) |
| **Red blinking** | Battery is low (below 20%) |
| **Red-Green-Blue sequence** | Boot sequence, device is starting up |
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also want to point this out — there’s no info about this LED logic anywhere. It should be documented.

And:

Green blinking (while charging)
is not working in the latest code on the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firmware firmware work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants