Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Button actions and extra confirmation step for Amazfit BIP #925

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

palepunk
Copy link

@palepunk palepunk commented Jan 2, 2018

issue #924

I wanted to open my garage door by pressing the button on the BIP 3 times.
So i've enabled the button actions for BIP, that was an an easy change.

I also want to avoid door openings on accidental button presses. So I have added an extra step to the flow: if you press the button the set amount of times, your witch starts vibrating and asks for a confirmation for 5 secs. You can then approve or reject the button action. If you press reject on the watch, nothing happens, if you press ignore (i couldn't figure out how to have accept there) GB will fire the intent.
You can enable or disable this extra confirmation under the BIP settings. Hope you'll like it.

@palepunk palepunk changed the title Enabling button actions for Amazfit BIP Button actions and extra confirmation step for Amazfit BIP Jan 6, 2018
@cpfeiffer
Copy link
Contributor

Very cool! :-) Using "Ignore" as "Accept" is a little weird, but as long as we don't know how to put "Accept" there, that's OK. Maybe @ashimokawa knows how to do that.

I'm a bit uneasy on those interdependent state variables becoming protected, I'd prefer to have the button handling implemented in one place only and have the confirmation handling hooked in. I'd also like to avoid the periodic timer checking for the current state. I think we could handle everything in processActionConfirmation() and execute the button action there, if accepted. Or doesn't this work for some reason? If we need it to abort the action, the timer would need to fire just once.

@cpfeiffer
Copy link
Contributor

@ashimokawa do you know if we can get the Bip to display different button texts?

@ashimokawa
Copy link
Contributor

No we can't

@ikcalB
Copy link

ikcalB commented Sep 12, 2018

will bip button presses soon be available? (Regardless w/wo confirmation)

@cpfeiffer
Copy link
Contributor

Once the conflicts are fixed, we should merge this, yes. Sorry it took so long!

@ffranchina
Copy link
Contributor

Hello, are there news about this PR? It would be very useful to have this implemented. Thanks in advance!

ps: let me know if some help to get it merged is needed :)

@ThomasWaldmann
Copy link

@janos-pd did you see the feedback? ^^^

@palepunk
Copy link
Author

@janos-pd did you see the feedback? ^^^

I'm sorry, i didn't follow the thread. I lost track of the code and I won't able to fix the conflicts. I'm sorry

@ThomasWaldmann
Copy link

@janos-pd pity.

maybe the project maintainers want to have a look?

@ikcalB
Copy link

ikcalB commented Jul 2, 2019

@cpfeiffer did this issue get lost on your agenda?

I might look into rebasing the patchset, yet I do not currently know any of the gb sources.

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

Successfully merging this pull request may close these issues.

6 participants