Installation of pwm startup script
authorArjen Baart <arjen@andromeda.nl>
Sun, 3 May 2020 06:59:29 +0000 (08:59 +0200)
committerArjen Baart <arjen@andromeda.nl>
Sun, 3 May 2020 06:59:29 +0000 (08:59 +0200)
src/Makefile.am
src/pwm.c
test/wakeupsequence

index ebf5eb9..268461c 100644 (file)
@@ -1,4 +1,5 @@
 bin_PROGRAMS = wakeup pwm curtain lightcontrol read_serial
+sbin_SCRIPTS = startpwm
 
 wakeup_SOURCES = wakeup.cpp event.cpp
 pwm_SOURCES = pwm.c
index 8bdc7d4..2fab5bf 100644 (file)
--- a/src/pwm.c
+++ b/src/pwm.c
@@ -87,6 +87,11 @@ int main()
           perror("shmat");
           exit(1);
       }
+      signals = (struct pwm *)shm;
+      signals[0].output = LED_RED;
+      signals[1].output = LED_GREEN;
+      signals[2].output = LED_BLUE;
+      signals[3].output = LED_WHITE;
    }
    else
    {
index a7c013e..4abff51 100755 (executable)
@@ -3,14 +3,14 @@
 #  Create a sequence of light colors for test purposes.
 #  The sequence is red - green - blue - white.
 
-PATH=$PATH:../src
+PATH=$PATH:/usr/local/bin
 export LD_LIBRARY_PATH=/usr/local/lib
 
-FADETIME=200
+FADETIME=300
 
 lightcontrol -r 100 -f $FADETIME
 lightcontrol -g 100 -f $FADETIME
 lightcontrol -w 100 -f $FADETIME
-sleep 600
+sleep 3000
 lightcontrol -r 0 -g 0 -w 0 -f $FADETIME