Skip to content

Commit

Permalink
refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahelsamahy committed Oct 18, 2024
1 parent d60937f commit 471385f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"GPIO",
"Jetson",
"mjpeg",
"teleop"
"teleop",
"VESC"
],
"python.analysis.typeCheckingMode": "off",
"liveServer.settings.port": 5501,
Expand Down
4 changes: 3 additions & 1 deletion jetson_runtime/vehicles/rover/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from BYODR_utils.common.ipc import ImagePublisher, JSONPublisher, LocalIPCServer, ReceiverThread, json_collector
from BYODR_utils.common.location import GeoTracker
from BYODR_utils.common.option import hash_dict, parse_option
from BYODR_utils.JETSON_specific.utilities import Nano

from configparser import ConfigParser as SafeConfigParser
from core import ConfigurableImageGstSource, GpsPollerThreadSNMP, PTZCamera

Expand Down Expand Up @@ -254,7 +256,7 @@ def change_segment_config(self):
"""Change the ips in the config file the segment is using them.
It will count on the ip of the nano"""
# Get the local IP address's third octet
ip_address = subprocess.check_output("hostname -I | awk '{for (i=1; i<=NF; i++) if ($i ~ /^192\\.168\\./) print $i}'", shell=True).decode().strip().split()[0]
ip_address = Nano.get_ip_address()
third_octet_new = ip_address.split(".")[2]

_candidates = glob.glob(os.path.join(self._config_dir, "config.ini"))
Expand Down

0 comments on commit 471385f

Please sign in to comment.