services-ros1-xbee_mav/docker-compose-flash-device...

29 lines
895 B
YAML

# Flash Xbee devices
# ---------------------------------------------------------------------------------
# 1. To flash a single device, modify the .env file like shown below:
# DEVICE_PATH=/dev/ttyUSB0
# BAUD_RATE=230400
# Then use the cmd: docker compose -f docker-compose-flash-device.yml up --build
#
# 2. To flash multiple devices, modify the .env file like shown below:
# DEVICES="
# /dev/ttyUSB0,230400
# /dev/ttyUSB1,230400
# /dev/ttyUSB2,230400
# "
# Then run the bash script using: sh ./flash-devices-batch.sh
# -----------------------------------------------------------------------------------
version: "3.8"
services:
xbee-mav:
command: rosrun xbee_ros_node xbee_config ${DEVICE_PATH} ${BAUD_RATE}
build:
context: .
dockerfile: Dockerfile
devices:
- ${DEVICE_PATH}:${DEVICE_PATH}