mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
version:
2.4.2 Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -151,7 +151,6 @@ class BTNap:
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def is_paired(self):
|
||||
"""
|
||||
Check if already connected
|
||||
@ -579,8 +578,9 @@ class BTTether(plugins.Plugin):
|
||||
|
||||
def on_ui_setup(self, ui):
|
||||
with ui._lock:
|
||||
ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', position=(ui.width() / 2 - 15, 0),
|
||||
label_font=fonts.Bold, text_font=fonts.Medium))
|
||||
ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-',
|
||||
position=(ui.width() / 3 - 15, 0),
|
||||
label_font=fonts.Bold, text_font=fonts.Medium))
|
||||
|
||||
def on_ui_update(self, ui):
|
||||
ui.set('bluetooth', self.status)
|
||||
|
@ -31,8 +31,8 @@ class InternetConnectionPlugin(plugins.Plugin):
|
||||
with ui._lock:
|
||||
# add a LabeledValue element to the UI with the given label and value
|
||||
# the position and font can also be specified
|
||||
ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='', value='',
|
||||
position=(0, 30), label_font=fonts.Small,
|
||||
ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-',
|
||||
position=(0, 30), label_font=fonts.Bold,
|
||||
text_font=fonts.Small))
|
||||
|
||||
def on_ui_update(self, ui):
|
||||
@ -44,10 +44,10 @@ class InternetConnectionPlugin(plugins.Plugin):
|
||||
# Connect to the host - tells us if the host is actually reachable
|
||||
s = socket.create_connection((host, 80), 2)
|
||||
s.close()
|
||||
ui.set('connection_status', 'connected')
|
||||
ui.set('connection_status', 'C')
|
||||
except:
|
||||
# if the command failed, it means there is no active Internet connection
|
||||
ui.set('connection_status', 'disconnected')
|
||||
ui.set('connection_status', 'D')
|
||||
|
||||
def on_unload(self, ui):
|
||||
with ui._lock:
|
||||
|
Reference in New Issue
Block a user