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
|
return None
|
||||||
|
|
||||||
|
|
||||||
def is_paired(self):
|
def is_paired(self):
|
||||||
"""
|
"""
|
||||||
Check if already connected
|
Check if already connected
|
||||||
@ -579,7 +578,8 @@ class BTTether(plugins.Plugin):
|
|||||||
|
|
||||||
def on_ui_setup(self, ui):
|
def on_ui_setup(self, ui):
|
||||||
with ui._lock:
|
with ui._lock:
|
||||||
ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', position=(ui.width() / 2 - 15, 0),
|
ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-',
|
||||||
|
position=(ui.width() / 3 - 15, 0),
|
||||||
label_font=fonts.Bold, text_font=fonts.Medium))
|
label_font=fonts.Bold, text_font=fonts.Medium))
|
||||||
|
|
||||||
def on_ui_update(self, ui):
|
def on_ui_update(self, ui):
|
||||||
|
@ -31,8 +31,8 @@ class InternetConnectionPlugin(plugins.Plugin):
|
|||||||
with ui._lock:
|
with ui._lock:
|
||||||
# add a LabeledValue element to the UI with the given label and value
|
# add a LabeledValue element to the UI with the given label and value
|
||||||
# the position and font can also be specified
|
# the position and font can also be specified
|
||||||
ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='', value='',
|
ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-',
|
||||||
position=(0, 30), label_font=fonts.Small,
|
position=(0, 30), label_font=fonts.Bold,
|
||||||
text_font=fonts.Small))
|
text_font=fonts.Small))
|
||||||
|
|
||||||
def on_ui_update(self, ui):
|
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
|
# Connect to the host - tells us if the host is actually reachable
|
||||||
s = socket.create_connection((host, 80), 2)
|
s = socket.create_connection((host, 80), 2)
|
||||||
s.close()
|
s.close()
|
||||||
ui.set('connection_status', 'connected')
|
ui.set('connection_status', 'C')
|
||||||
except:
|
except:
|
||||||
# if the command failed, it means there is no active Internet connection
|
# 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):
|
def on_unload(self, ui):
|
||||||
with ui._lock:
|
with ui._lock:
|
||||||
|
Reference in New Issue
Block a user