From: Arjen Baart Date: Sun, 3 May 2020 06:59:29 +0000 (+0200) Subject: Installation of pwm startup script X-Git-Url: http://www.andromeda.nl/gitweb/?a=commitdiff_plain;h=64f515f14fd852485ebd85ac6a56da78ad68bf38;p=wakeup.git Installation of pwm startup script --- diff --git a/src/Makefile.am b/src/Makefile.am index ebf5eb9..268461c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/pwm.c b/src/pwm.c index 8bdc7d4..2fab5bf 100644 --- 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 { diff --git a/test/wakeupsequence b/test/wakeupsequence index a7c013e..4abff51 100755 --- a/test/wakeupsequence +++ b/test/wakeupsequence @@ -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