Revert. Changes are handled in a separate branch
This commit is contained in:
parent
1a0083eb38
commit
7da3cc5565
@ -10,7 +10,7 @@ from pwnagotchi.ui.view import BLACK
|
|||||||
|
|
||||||
class GPS(plugins.Plugin):
|
class GPS(plugins.Plugin):
|
||||||
__author__ = "evilsocket@gmail.com"
|
__author__ = "evilsocket@gmail.com"
|
||||||
__version__ = "1.0.1"
|
__version__ = "1.0.0"
|
||||||
__license__ = "GPL3"
|
__license__ = "GPL3"
|
||||||
__description__ = "Save GPS coordinates whenever an handshake is captured."
|
__description__ = "Save GPS coordinates whenever an handshake is captured."
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class GPS(plugins.Plugin):
|
|||||||
def on_ui_setup(self, ui):
|
def on_ui_setup(self, ui):
|
||||||
# add coordinates for other displays
|
# add coordinates for other displays
|
||||||
if ui.is_waveshare_v2():
|
if ui.is_waveshare_v2():
|
||||||
lat_pos = (127, 74)
|
lat_pos = (127, 75)
|
||||||
lon_pos = (122, 84)
|
lon_pos = (122, 84)
|
||||||
alt_pos = (127, 94)
|
alt_pos = (127, 94)
|
||||||
elif ui.is_waveshare_v1():
|
elif ui.is_waveshare_v1():
|
||||||
@ -66,21 +66,21 @@ class GPS(plugins.Plugin):
|
|||||||
alt_pos = (130, 90)
|
alt_pos = (130, 90)
|
||||||
elif ui.is_inky():
|
elif ui.is_inky():
|
||||||
lat_pos = (127, 60)
|
lat_pos = (127, 60)
|
||||||
lon_pos = (122, 70)
|
lon_pos = (127, 70)
|
||||||
alt_pos = (127, 80)
|
alt_pos = (127, 80)
|
||||||
elif ui.is_waveshare144lcd():
|
elif ui.is_waveshare144lcd():
|
||||||
# guessed values, add tested ones if you can
|
# guessed values, add tested ones if you can
|
||||||
lat_pos = (67, 73)
|
lat_pos = (67, 73)
|
||||||
lon_pos = (62, 83)
|
lon_pos = (62, 83)
|
||||||
alt_pos = (67, 93)
|
alt_pos = (67, 93)
|
||||||
elif ui.is_dfrobot_v2():
|
elif ui.is_dfrobot_v2:
|
||||||
lat_pos = (127, 74)
|
lat_pos = (127, 75)
|
||||||
lon_pos = (122, 84)
|
lon_pos = (122, 84)
|
||||||
alt_pos = (127, 94)
|
alt_pos = (127, 94)
|
||||||
elif ui.is_waveshare27inch():
|
elif ui.is_waveshare27inch():
|
||||||
lat_pos = (6, 120)
|
lat_pos = (6,120)
|
||||||
lon_pos = (1, 135)
|
lon_pos = (1,135)
|
||||||
alt_pos = (6, 150)
|
alt_pos = (6,150)
|
||||||
else:
|
else:
|
||||||
# guessed values, add tested ones if you can
|
# guessed values, add tested ones if you can
|
||||||
lat_pos = (127, 51)
|
lat_pos = (127, 51)
|
||||||
@ -126,6 +126,7 @@ class GPS(plugins.Plugin):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def on_unload(self, ui):
|
def on_unload(self, ui):
|
||||||
with ui._lock:
|
with ui._lock:
|
||||||
ui.remove_element('latitude')
|
ui.remove_element('latitude')
|
||||||
@ -140,5 +141,5 @@ class GPS(plugins.Plugin):
|
|||||||
# last char is sometimes not completely drawn ¯\_(ツ)_/¯
|
# last char is sometimes not completely drawn ¯\_(ツ)_/¯
|
||||||
# using an ending-whitespace as workaround on each line
|
# using an ending-whitespace as workaround on each line
|
||||||
ui.set("latitude", f"{self.coordinates['Latitude']:.4f} ")
|
ui.set("latitude", f"{self.coordinates['Latitude']:.4f} ")
|
||||||
ui.set("longitude", f"{self.coordinates['Longitude']:.4f} ")
|
ui.set("longitude", f" {self.coordinates['Longitude']:.4f} ")
|
||||||
ui.set("altitude", f"{self.coordinates['Altitude']:.1f}m ")
|
ui.set("altitude", f" {self.coordinates['Altitude']:.1f}m ")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user