summaryrefslogtreecommitdiffstats
path: root/app/Sensor.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Sensor.hs')
-rw-r--r--app/Sensor.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Sensor.hs b/app/Sensor.hs
index de14783..be11e2f 100644
--- a/app/Sensor.hs
+++ b/app/Sensor.hs
@@ -112,12 +112,12 @@ cpu = step <$$> diagram 3 cpuStat
diagram :: Int -> S.Sensor () a -> S.Sensor () (P.Diagram [a])
diagram n sf = S.feedbackS [] $ proc ((), xs) -> do
x <- sf -< ()
- returnA -< (P.diagram n (reverse (x : xs)), take (2 * (n - 1) + 1) (x : xs))
+ returnA -< (P.diagram n (reverse (take n (x : xs))), take n (x : xs))
thermal :: S.Sensor () (P.Diagram [Float])
thermal =
((\x -> clamp 0 1 (x / 100)) <$$$>) $
- diagram 1 $
+ diagram 3 $
S.sensor (\() -> "thermal") $ \() yield -> forever do
yield =<< parse <* sleep
where
@@ -363,7 +363,7 @@ diskStat =
/ fi (stat.statVFS_bfree + stat.statVFS_bavail)
disk :: S.Sensor () (P.Diagram [Float])
-disk = diagram 1 diskStat
+disk = diagram 3 diskStat
data Forecast = Forecast
{ properties :: ForecastProperties