commit
cae2a18016
@ -113,6 +113,13 @@ class GPS(plugins.Plugin):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def on_unload(self, ui):
|
||||||
|
with ui._lock:
|
||||||
|
ui.remove_element('latitude')
|
||||||
|
ui.remove_element('longitude')
|
||||||
|
ui.remove_element('altitude')
|
||||||
|
|
||||||
def on_ui_update(self, ui):
|
def on_ui_update(self, ui):
|
||||||
if self.coordinates and all([
|
if self.coordinates and all([
|
||||||
# avoid 0.000... measurements
|
# avoid 0.000... measurements
|
||||||
|
@ -70,6 +70,10 @@ class MemTemp(plugins.Plugin):
|
|||||||
position=h_pos,
|
position=h_pos,
|
||||||
label_font=fonts.Small, text_font=fonts.Small))
|
label_font=fonts.Small, text_font=fonts.Small))
|
||||||
|
|
||||||
|
def on_unload(self, ui):
|
||||||
|
with ui._lock:
|
||||||
|
ui.remove_element('memtemp')
|
||||||
|
|
||||||
def on_ui_update(self, ui):
|
def on_ui_update(self, ui):
|
||||||
if self.options['scale'] == "fahrenheit":
|
if self.options['scale'] == "fahrenheit":
|
||||||
temp = (pwnagotchi.temperature() * 9 / 5) + 32
|
temp = (pwnagotchi.temperature() * 9 / 5) + 32
|
||||||
|
@ -58,5 +58,9 @@ class UPSLite(plugins.Plugin):
|
|||||||
ui.add_element('ups', LabeledValue(color=BLACK, label='UPS', value='0%/0V', position=(ui.width() / 2 + 15, 0),
|
ui.add_element('ups', LabeledValue(color=BLACK, label='UPS', value='0%/0V', position=(ui.width() / 2 + 15, 0),
|
||||||
label_font=fonts.Bold, text_font=fonts.Medium))
|
label_font=fonts.Bold, text_font=fonts.Medium))
|
||||||
|
|
||||||
|
def on_unload(self, ui):
|
||||||
|
with ui._lock:
|
||||||
|
ui.remove_element('ups')
|
||||||
|
|
||||||
def on_ui_update(self, ui):
|
def on_ui_update(self, ui):
|
||||||
ui.set('ups', "%2i%%" % self.ups.capacity())
|
ui.set('ups', "%2i%%" % self.ups.capacity())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user