lightswitch: 0.2s sample period
authorArjen Baart <arjen@andromeda.nl>
Tue, 10 Nov 2020 06:56:42 +0000 (07:56 +0100)
committerArjen Baart <arjen@andromeda.nl>
Tue, 10 Nov 2020 06:56:42 +0000 (07:56 +0100)
src/lightswitch.c
src/wakeup.conf
src/wakeup_alarms.xml

index 8edc613..d23997f 100644 (file)
@@ -53,8 +53,8 @@ int main(int argc, char *argv[])
    int    old_state, new_state;
    struct timespec interval;
 
-   interval.tv_sec   = 1;
-   interval.tv_nsec  = 0;
+   interval.tv_sec   = 0;
+   interval.tv_nsec  = 200000000;
 
    // Set up gpi pointer for direct register access
    setup_io();
index 40b9de2..239ca29 100644 (file)
@@ -6,7 +6,7 @@
    </location>
    <logging>
       <method>file</method>
-      <destination>/var/log</destination>
+      <destination>/var/log/wakeup</destination>
       <level>0</level>
    </logging>
    <alarms>
index d6ce205..2df9d44 100644 (file)
@@ -13,7 +13,7 @@
   <event id='sunrise'>
     <start>sunrise</start>
     <action>curtain -o 2</action>
-    <action>lightcontrol -r 0 -g 0 -w 0-f 200</action>
+    <action>lightcontrol -r 0 -g 0 -w 0 -f 200</action>
     <recurrance>
        <pattern>weekdays</pattern>
        <number>1,2,3,4,5</number>