plugins/gps: add some logging around the gps off exception #1042. Incorporated changes from reynico/pwnagotchi on Github.

This commit is contained in:
scifijunkie 2022-04-26 09:46:19 -05:00
parent 1976c8a850
commit ef717734af

View File

@ -32,11 +32,13 @@ class GPS(plugins.Plugin):
try:
agent.run("gps off")
except Exception:
logging.info(f"bettercap gps module was already off")
pass
agent.run(f"set gps.device {self.options['device']}")
agent.run(f"set gps.baudrate {self.options['speed']}")
agent.run("gps on")
logging.info(f"bettercap gps module enabled on {self.options['device']}")
self.running = True
else:
logging.warning("no GPS detected")