Skip to content
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

No charging indication #66

Closed
RickSeiden opened this issue May 6, 2021 · 11 comments
Closed

No charging indication #66

RickSeiden opened this issue May 6, 2021 · 11 comments
Labels
src/core ⭐ enhancement New feature or request
Milestone

Comments

@RickSeiden
Copy link
Contributor

There's no indication of the watch being plugged in to charge. I think we could setup an interrupt to wake the watch up when the power is plugged in, then adjust main.cpp to check what interrupt woke it up, and if it's the watch being plugged in, go to a charging animation app instead of the watch face app. The charging app wouldn't even have to be in the cycle of apps normally shown. The app could be as simple as the word "CHARGING" with a percentage of battery power, or it could be a battery icon that shows how much charge is there.

@uvwxy
Copy link
Member

uvwxy commented May 6, 2021

Correct. we don't have that information hardware wise :)

(But we could guess from a value that says "not full yet")

@uvwxy uvwxy added src/core ⭐ enhancement New feature or request labels May 6, 2021
@uvwxy uvwxy added this to the Version 1.0 milestone May 6, 2021
@RickSeiden
Copy link
Contributor Author

Isn't there

hal->getBatteryRaw()

in power.cpp that could be used?

@RickSeiden
Copy link
Contributor Author

Here's what I've found out by RTFM

  • You can wake up the esp32 via a GPIO on ext0 or ext1
  • You can only tell which GPIO pin woke you up on ext1
  • ext1 supports GPIO32-GPIO39
  • STAT_PWR that we can use to see if the charger got plugged in is on GPIO-15
  • That means that the only way (that I can see) that we can get the watch to wake up when it is plugged in is to either rework the pcb so the STAT_PWR signal is on a GPIO between 32 and 39 (not likely), or put all other waking interrupts on ext1, then when the watch wakes up it can check what woke it on ext1, and if nothing on ext1 woke it, it must have been woken up by being plugged in

@uvwxy
Copy link
Member

uvwxy commented May 8, 2021

What about the LED?

@RickSeiden
Copy link
Contributor Author

@uvwxy I printed out the case and put the watch in that, and I can't see that LED. We'd need a light pipe of some sort to see it, I think.

@RickSeiden
Copy link
Contributor Author

I've worked on this a little bit, and found a way to add a "charger" app in a way that it always comes on when the watch is plugged in (who walks around with it on their wrist when it's plugged in?). When you unplug it it immediately goes back to normal operations. I'm attaching it here for your review.

main.txt

@simonmicro
Copy link
Member

I would vote to include this into #15 by opening some sort of overlay for several seconds, when we detect an inserted cable. This way the clock still works and the user could continue using it (e.g. for opening the config).

@RickSeiden
Copy link
Contributor Author

@simonmicro I'm more thinking of way to tell the watch is charging or 100% charged when it's sitting on my desk plugged in and not being used. Having said that, I don't think an overlay is a bad idea at all. It could even be as unobtrusive as the already existing battery/plug graphic being changed to show a battery that is charging somehow.

@RickSeiden
Copy link
Contributor Author

@simonmicro Another thought. I was originally thinking that it would be activated when plugged in while not "on". But, as I found, that interrupt can't be determined when the watch wakes up, so my solution above was a work around for that limitation.

@simonmicro
Copy link
Member

Hmm, I'll further participate in this, when I finish up my other ideas & tasks. Just letting you know, I'm happy to further work on this, but not right now :P

@uvwxy
Copy link
Member

uvwxy commented May 16, 2021

The charging indication is covered by a hardware LED.
If you come up with a sw solution that manages to correctly indicate this, feel free to create a pull request.
will close the issue for now :)

@uvwxy uvwxy closed this as completed May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src/core ⭐ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants