add memory reset when resetting, add debug for share writes and add live share changi...
[mTask.git] / miTask.icl
index fd5dac5..cafbffa 100644 (file)
@@ -30,7 +30,16 @@ Start world = startEngine [
                publish "/" $ const demo
        ] world
 
-demo = viewInformation "" [] "Hello world"
+demo = viewSharedInformation "Devices" [] deviceStore
+       >>* [OnValue $ ifValue pred (cont o hd)]
+       where
+               pred [] = False
+               pred [x:_] = not $ isEmpty x.deviceShares
+
+               cont :: MTaskDevice -> Task ()
+               cont dev = updateSharedInformation "Blinkyblink" [] (getRealShare dev (hd dev.deviceShares))
+                       >>| cont dev
+       
 
 mTaskManager :: Task ()
 mTaskManager = startupDevices >>| anyTask