Skip to content

Commit

Permalink
update tools submodule: fix issue when sometimes slcan could not be c…
Browse files Browse the repository at this point in the history
…reated
  • Loading branch information
PonomarevDA committed Oct 4, 2023
1 parent 1f4a05a commit 5d4004d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ setup_mavlink_sitl_config() {

setup_dronecan_hitl_config() {
setup_mavlink_sitl_config
source ./tools/can/get_sniffer_symlink.sh
DRONECAN_DEV_PATH_SYMLINK=$DEV_PATH_SYMLINK
source ./tools/can/create_slcan.sh --only-find
DRONECAN_DEV_PATH_SYMLINK=$DEV_PATH

if [ ! -z $DRONECAN_DEV_PATH_SYMLINK ]; then
DOCKER_FLAGS="$DOCKER_FLAGS --privileged -v $DRONECAN_DEV_PATH_SYMLINK:$DRONECAN_DEV_PATH_SYMLINK"
Expand All @@ -76,8 +76,8 @@ setup_dronecan_hitl_config() {

setup_cyphal_hitl_config() {
setup_mavlink_sitl_config
source ./tools/can/get_sniffer_symlink.sh
CYPHAL_DEV_PATH_SYMLINK=$DEV_PATH_SYMLINK
source ./tools/can/create_slcan.sh --only-find
CYPHAL_DEV_PATH_SYMLINK=$DEV_PATH

if [ ! -z $CYPHAL_DEV_PATH_SYMLINK ]; then
DOCKER_FLAGS="$DOCKER_FLAGS --privileged -v $CYPHAL_DEV_PATH_SYMLINK:$CYPHAL_DEV_PATH_SYMLINK"
Expand Down
8 changes: 4 additions & 4 deletions scripts/run_sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ setup_sitl_px4_flight_stack() {
setup_dronecan_hitl() {
if [ ! -z $DRONECAN_DEV_PATH_SYMLINK ]; then
echo "Trying to create slcan0 for dronecan..."
$SCRIPT_DIR/tools/can/create_slcan_from_serial.sh $DRONECAN_DEV_PATH_SYMLINK slcan0
$SCRIPT_DIR/tools/can/create_slcan.sh -d $DRONECAN_DEV_PATH_SYMLINK -i slcan0
fi
if [[ -z $(ifconfig | grep slcan0) ]]; then
echo "HITL can't be started without CAN interface!"
Expand All @@ -62,7 +62,7 @@ setup_dronecan_hitl() {
setup_cyphal_hitl() {
if [ ! -z $CYPHAL_DEV_PATH_SYMLINK ]; then
echo "Trying to create slcan0 for cyphal/serial..."
$SCRIPT_DIR/tools/can/create_slcan_from_serial.sh $CYPHAL_DEV_PATH_SYMLINK slcan0
$SCRIPT_DIR/tools/can/create_slcan.sh -d $CYPHAL_DEV_PATH_SYMLINK -i slcan0
fi
if [[ -z $(ifconfig | grep slcan0) ]]; then
echo "HITL can't be started without CAN interface!"
Expand All @@ -74,11 +74,11 @@ setup_cyphal_hitl() {
setup_combined_hitl() {
if [ ! -z $DRONECAN_DEV_PATH_SYMLINK ]; then
echo "Trying to create slcan0 for dronecan..."
$SCRIPT_DIR/tools/can/create_slcan_from_serial.sh $DRONECAN_DEV_PATH_SYMLINK slcan0
$SCRIPT_DIR/tools/can/create_slcan.sh -d $DRONECAN_DEV_PATH_SYMLINK -i slcan0
fi
if [ ! -z $CYPHAL_DEV_PATH_SYMLINK ]; then
echo "Trying to create slcan1 for cyphal..."
$SCRIPT_DIR/tools/can/create_slcan_from_serial.sh $CYPHAL_DEV_PATH_SYMLINK slcan1
$SCRIPT_DIR/tools/can/create_slcan.sh -d $CYPHAL_DEV_PATH_SYMLINK -i slcan1
source $SCRIPT_DIR/cyphal_config_slcan1.sh
fi
}
Expand Down

0 comments on commit 5d4004d

Please sign in to comment.