Write "delay" and "message" options to their respective files,
allowing Morse code message configuration through UCI.
The delay (dit length) defaults to 150ms (about 8 words per minute,
suitable for beginners).
Signed-off-by: Petr Viktorin <encukou@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34380
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=base-files
-PKG_RELEASE:=119
+PKG_RELEASE:=120
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=opkg/host
config_get delayoff $1 delayoff
config_get interval $1 interval "50"
config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
if [ "$trigger" = "rssi" ]; then
# handled by rssileds userspace process
echo $port_state > /sys/class/leds/${sysfs}/port_state
;;
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
switch[0-9]*)
local port_mask