-
Notifications
You must be signed in to change notification settings - Fork 18
Possible fix for known bug #4
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
base: master
Are you sure you want to change the base?
Conversation
Using Callbacks for peer detection the plugin should hide the overlay when peers are detected, keeping the interface free of password UI element until no peers are present.
Using Callbacks for peer detection the plugin should hide the overlay when peers are detected, keeping the interface free of password UI element until no peers are present.
minor code correction.
Would it be possible to make this plugin overlay all others? exp, gps, etc? |
Not code related, but where did you get your pwnagotchi case. |
|
display-password.py
Outdated
|
||
|
||
def __init__(self): | ||
self.peers_detected = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing indent
Not working for me... it always hides the password display. |
Corrected missing indent under def __init__(self): Per @aerickson
Added missing ui.show_element('display-password') to on_peer_lost to bring back the hidden element.
Sorry man forgot to add a line in def on_peer_lost corrected now give it a try. let me know if its borked i still have not tested this myself just a concept idea i had one night |
Got it working. I think the issue was displaying the element before content had been set. Thanks! |
Ah good ole v4 needed got ya hope the author of the actual plugin adopts
the changes. I still have not tested lol glad it went somewhere
…On Mon, Jan 15, 2024, 11:01 PM Andrew Erickson ***@***.***> wrote:
Got it working. I think the issue was displaying the element before
content had been set.
My changes are at
https://github.com/NoxiousKarn/pwnagotchi-display-password-plugin/compare/NoxiousKarn:pwnagotchi-display-password-plugin:master..aerickson:pwnagotchi-display-password-plugin:hide_if_peer_present_with_waveshare_v4
Thanks!
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4STDX7J6WN3ANWAZV3ZU7LYOYCQZAVCNFSM6AAAAAA4OLJ6KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJTGA3TGNBSGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
the Method/function ui.hide_element doesnt exist. |
Not sure when it was added. If you're on a rpi zero 2, It definitely works for me on https://github.com/aluminum-ice/pwnagotchi v1.8.4. |
#3
By adding:
def init(self):
self.peers_detected = False
And:
def on_peer_detected(self, agent, peer):
self.peers_detected = True
def on_peer_lost(self, agent, peer):
self.peers_detected = False
Then modify def on_ui_update to use self.peers_detected as a trigger to hide and unhide the UI element. The plugin should now hide around peers keeping the two UI elements from overlaying each other.
(untested)