aboutsummaryrefslogtreecommitdiff
path: root/hsm-ina226/Test/INA226.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hsm-ina226/Test/INA226.hs')
-rw-r--r--hsm-ina226/Test/INA226.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/hsm-ina226/Test/INA226.hs b/hsm-ina226/Test/INA226.hs
index 71f8f45..a92fec7 100644
--- a/hsm-ina226/Test/INA226.hs
+++ b/hsm-ina226/Test/INA226.hs
@@ -1,9 +1,9 @@
{-# LANGUAGE TemplateHaskell #-}
-import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Data.Function ((&))
import Effectful (liftIO, runEff)
+import Effectful.Concurrent (runConcurrent, threadDelay)
import Hsm.Core.App (bootstrapApp)
import Hsm.I2C (runI2C)
import Hsm.INA226 (readINA226State, runINA226)
@@ -20,8 +20,9 @@ $(makeLoggerOptionParser @Logs "Options" "parser" 'Info)
main :: IO ()
main =
bootstrapApp parser "Launch INA226 Monitoring Test Application" $ \opts ->
- forever (liftIO (threadDelay 1000000) >> readINA226State >>= logMsg @"ina226" Info . show)
+ forever (threadDelay 1000000 >> readINA226State >>= logMsg @"ina226" Info . show)
& runINA226
& runI2C
& runLogsOpt @Options @Logs opts
+ & runConcurrent
& runEff