gps.py: gpsd support

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-11-13 22:56:09 +01:00
parent 768b30ab65
commit 1d4d8bf0e0
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ main.plugins.gpio_buttons.enabled = false
main.plugins.gps.enabled = false
main.plugins.gps.speed = 19200
main.plugins.gps.device = "/dev/ttyUSB0"
main.plugins.gps.device = "/dev/ttyUSB0" # for GPSD: "localhost:2947"
main.plugins.grid.enabled = true
main.plugins.grid.report = true
@ -187,7 +187,7 @@ ui.faces.upload1 = "(1__1)"
ui.faces.upload2 = "(0__1)"
ui.web.enabled = true
ui.web.address = "0.0.0.0"
ui.web.address = "::" # listening on both ipv4 and ipv6 - switch to 0.0.0.0 to listen on just ipv4
ui.web.username = "changeme"
ui.web.password = "changeme"
ui.web.origin = ""

View File

@ -25,7 +25,7 @@ class GPS(plugins.Plugin):
logging.info(f"gps plugin loaded for {self.options['device']}")
def on_ready(self, agent):
if os.path.exists(self.options["device"]):
if os.path.exists(self.options["device"]) or ":" in self.options["device"]:
logging.info(
f"enabling bettercap's gps module for {self.options['device']}"
)