Changeset 34380


Ignore:
Timestamp:
2012-11-25T18:20:49+01:00 (5 years ago)
Author:
juhosg
Message:

base-files: add support for the morse LED trigger

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@…>
Signed-off-by: Gabor Juhos <juhosg@…>

Location:
trunk/package/base-files
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/Makefile

    r34308 r34380  
    1212 
    1313PKG_NAME:=base-files 
    14 PKG_RELEASE:=119 
     14PKG_RELEASE:=120 
    1515 
    1616PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ 
  • trunk/package/base-files/files/etc/init.d/led

    r33717 r34380  
    2525        config_get interval $1 interval "50" 
    2626        config_get port_state $1 port_state 
     27        config_get delay $1 delay "150" 
     28        config_get message $1 message "" 
    2729 
    2830        if [ "$trigger" = "rssi" ]; then 
     
    6769                        ;; 
    6870 
     71                "morse") 
     72                        echo $message > /sys/class/leds/${sysfs}/message 
     73                        echo $delay > /sys/class/leds/${sysfs}/delay 
     74                        ;; 
     75 
    6976                switch[0-9]*) 
    7077                        local port_mask 
Note: See TracChangeset for help on using the changeset viewer.