Skip to content

Commit

Permalink
use host.docker.internal for talking to blueos
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Feb 16, 2024
1 parent 7f9cd16 commit 3def13f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ LABEL permissions='\
},\
"HostConfig": {\
"Binds":["/root/.config:/root/.config"],\
"ExtraHosts": [\
"host.docker.internal:host-gateway"\
],\
"PortBindings": {\
"9001/tcp": [\
{\
Expand Down
2 changes: 1 addition & 1 deletion dvl-a50/dvl.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def look_for_dvl(self):
time.sleep(1)

def wait_for_cable_guy(self):
while not request("http://127.0.0.1/cable-guy/v1.0/ethernet"):
while not request("http://host.docker.internal/cable-guy/v1.0/ethernet"):
self.report_status("waiting for cable-guy to come online...")
time.sleep(1)

Expand Down
2 changes: 1 addition & 1 deletion dvl-a50/dvlfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def find_the_dvl() -> Optional[str]:

nmap = nmap3.Nmap()
# generate the scan mask from our current ips
networks = json.loads(request("http://127.0.0.1/cable-guy/v1.0/ethernet"))
networks = json.loads(request("http://host.docker.internal/cable-guy/v1.0/ethernet"))
current_networks = [network["addresses"] for network in networks]
# this looks like [{'ip': '192.168.2.2', 'mode': 'server'}]
current_ips = []
Expand Down
2 changes: 1 addition & 1 deletion dvl-a50/mavlink2resthelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from blueoshelper import post, request

MAVLINK2REST_URL = "http://127.0.0.1/mavlink2rest"
MAVLINK2REST_URL = "http://host.docker.internal/mavlink2rest"
GPS_GLOBAL_ORIGIN_ID = 49

# holds the last status so we dont flood it
Expand Down

0 comments on commit 3def13f

Please sign in to comment.