Skip to content

Commit

Permalink
placeholer
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza787b committed Aug 29, 2024
1 parent a05a9f2 commit 6b4eb06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup/setup_px4_sitl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ PLATFORM_CHOICES=("xplane_ehang184" "xplane_alia250" "xplane_cessna172" "xplane_
# === MAVLink Router Configuration ===
USE_MAVLINK_ROUTER=true # Set to true to enable MAVLink Router installation and setup
MAVLINK_ROUTER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/alireza787b/mavlink-anywhere/main/install_mavlink_router.sh"
MAVLINK_ROUTER_COMMAND="mavlink-routerd -e IP_PLACEHOLDER:14540 -e IP_PLACEHOLDER:14550 -e IP_PLACEHOLDER:14569 -e MAVLINK2REST_IP:14569 0.0.0.0:14550"
MAVLINK_ROUTER_COMMAND="mavlink-routerd -e IP_PLACEHOLDER:14540 -e IP_PLACEHOLDER:14550 -e IP_PLACEHOLDER:14569 -e MAVLINK2REST_IP_PLACEHOLDE:14569 0.0.0.0:14550"

# === Repair Mode (Configurable) ===
REPAIR_MODE=false # Set to true if you always want full repair mode
Expand Down Expand Up @@ -308,7 +308,7 @@ if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null; then
bash "$MAVLINK_ROUTER_INSTALL_SCRIPT"

# Replace specific IP placeholders in the MAVLink Router command
MAVLINK_ROUTER_CMD=$(echo "$MAVLINK_ROUTER_COMMAND" | sed "s/IP_PLACEHOLDER/$PX4_SIM_HOSTNAME/g" | sed "s/MAVLINK2REST_IP/$MAVLINK2REST_IP/g")
MAVLINK_ROUTER_CMD=$(echo "$MAVLINK_ROUTER_COMMAND" | sed "s/IP_PLACEHOLDER/$PX4_SIM_HOSTNAME/g" | sed "s/MAVLINK2REST_IP_PLACEHOLDE/$MAVLINK2REST_IP/g")
highlight "Running MAVLink Router: $MAVLINK_ROUTER_CMD"
$MAVLINK_ROUTER_CMD &
MAVLINK_ROUTER_PID=$!
Expand Down

0 comments on commit 6b4eb06

Please sign in to comment.