-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ROMFS/px4fmu_common/init.d-posix/rcS: split and source data from file…
…s in PATH
- Loading branch information
Showing
5 changed files
with
70 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,9 @@ | |
add_subdirectory(airframes) | ||
|
||
px4_add_romfs_files( | ||
px4-rc.params | ||
px4-rc.simulator | ||
px4-rc.mavlink | ||
rc.replay | ||
rcS | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
# shellcheck disable=SC2154 | ||
|
||
udp_offboard_port_local=$((14580+px4_instance)) | ||
udp_offboard_port_remote=$((14540+px4_instance)) | ||
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps | ||
udp_onboard_payload_port_local=$((14280+px4_instance)) | ||
udp_onboard_payload_port_remote=$((14030+px4_instance)) | ||
udp_onboard_gimbal_port_local=$((13030+px4_instance)) | ||
udp_onboard_gimbal_port_remote=$((13280+px4_instance)) | ||
udp_gcs_port_local=$((18570+px4_instance)) | ||
|
||
# GCS link | ||
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f | ||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local | ||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local | ||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local | ||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local | ||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local | ||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local | ||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local | ||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local | ||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local | ||
|
||
# API/Offboard link | ||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote | ||
|
||
# Onboard link to camera | ||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote | ||
|
||
# Onboard link to gimbal | ||
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
# shellcheck disable=SC2154 | ||
|
||
#param set MAV_SYS_ID $((px4_instance+1)) | ||
#param set IMU_INTEG_RATE 250 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
# shellcheck disable=SC2154 | ||
|
||
simulator_tcp_port=$((4560+px4_instance)) | ||
|
||
# Check if PX4_SIM_HOSTNAME environment variable is empty | ||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty | ||
# If both are empty use localhost for simulator | ||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then | ||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then | ||
echo "PX4 SIM HOST: localhost" | ||
simulator start -c $simulator_tcp_port | ||
else | ||
echo "PX4 SIM HOST: $PX4_SIM_HOST_ADDR" | ||
simulator start -t $PX4_SIM_HOST_ADDR $simulator_tcp_port | ||
fi | ||
else | ||
echo "PX4 SIM HOST: $PX4_SIM_HOSTNAME" | ||
simulator start -h $PX4_SIM_HOSTNAME $simulator_tcp_port | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters