diff --git a/sw/buildroot_overlay/etc/init.d/S03read_config.sh b/sw/buildroot_overlay/etc/init.d/S03read_config.sh new file mode 100755 index 0000000..55aba3d --- /dev/null +++ b/sw/buildroot_overlay/etc/init.d/S03read_config.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Read configuration files from SD card. +# + +. /opt/puzzlefw/lib/functions.sh + +case "$1" in + start) + echo "Reading configuration files from SD card ..." + lock_config || exit 1 + read_config || exit 1 + ;; + stop|restart|reload) + true + ;; + *) + echo "Usage: $0 start" + exit 1 +esac + diff --git a/sw/buildroot_overlay/opt/puzzlefw/bin/puzzle-calibration b/sw/buildroot_overlay/opt/puzzlefw/bin/puzzle-calibration new file mode 100755 index 0000000..cdeddc6 --- /dev/null +++ b/sw/buildroot_overlay/opt/puzzlefw/bin/puzzle-calibration @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Manage analog channel calibration. +# + +. /opt/puzzlefw/lib/functions.sh + +# Copy calibration file to the SD card. +cal_save() { + + # Lock to avoid conflicting changes. + lock_config || exit 1 + + echo "Copying changed calibration to SD card ..." + + sync_config calibration.conf || exit 1 +} + +case "$1" in + show) + cat ${CONFIG_DIR}/calibration.conf + ;; + save) + cal_save + ;; + *) + cat <