summaryrefslogtreecommitdiffstats
path: root/app/Sensor.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Sensor.hs')
-rw-r--r--app/Sensor.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Sensor.hs b/app/Sensor.hs
index 9ef38d0..8bfed22 100644
--- a/app/Sensor.hs
+++ b/app/Sensor.hs
@@ -139,9 +139,9 @@ maxS sf = S.feedbackS 0 $ proc ((), xMax) -> do
returnA -< (if xMax <= 0 then 0 else x / xMax', xMax')
rate :: (Monad m, Num a) => S.Sensor m () a -> S.Sensor m () a
-rate sf = S.feedbackS 0 $ proc ((), x') -> do
+rate sf = S.feedbackS Nothing $ proc ((), x') -> do
x <- sf -< ()
- returnA -< (x - x', x)
+ returnA -< (maybe 0 ((-) x) x', Just x)
data NetStat = NetStat deriving (Show)