Skip to content

Commit

Permalink
fix configuration validation
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikN committed Jul 10, 2024
1 parent 3ab3cc0 commit 63c689d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions snap/local/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ source $SNAP/usr/bin/utils.sh

# Iterate over the snap parameters and retrieve their value.
# If a value is set, it is forwarded to the launch file.
OPTIONS="\
channel-type \
serial-port \
serial-baudrate \
frame-id \
inverted \
angle-compensate \
scan-mode \
device-namespace \
"
OPTIONS=(
channel-type
serial-port
serial-baudrate
frame-id
inverted
angle-compensate
scan-mode
device-namespace
)

# Check if SERIAL_PORT is set to auto or specified
SERIAL_PORT=$(find_ttyUSB driver.serial-port "10c4")
Expand All @@ -34,7 +34,7 @@ fi

LAUNCH_OPTIONS=""

for OPTION in ${OPTIONS}; do
for OPTION in "${OPTIONS[@]}"; do
VALUE="$(snapctl get driver.${OPTION})"

if [ "${OPTION}" == "serial-port" ]; then
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |
The snap provides the following configurable parameters (`param name`: `default value`):
* `configuratin`: `custom`
* `configuration`: `custom`
* `driver`: `{...}`
* `ros`: `{...}`
Expand Down

0 comments on commit 63c689d

Please sign in to comment.