diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2026-01-03 00:26:51 +0000 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2026-01-03 03:42:43 +0000 |
| commit | 864a1d2a22580a33b5e928734fd256c2133fb672 (patch) | |
| tree | f164047133c293ae768112a6aad7eaab5df53401 /hsm-ina226 | |
| parent | f7f11acafe0a404fa218c13832e32fce574ae0f6 (diff) | |
Adds camera streaming to frontend
Diffstat (limited to 'hsm-ina226')
| -rw-r--r-- | hsm-ina226/Test/INA226.hs | 5 | ||||
| -rw-r--r-- | hsm-ina226/hsm-ina226.cabal | 1 |
2 files changed, 4 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 diff --git a/hsm-ina226/hsm-ina226.cabal b/hsm-ina226/hsm-ina226.cabal index 6ac642a..ce831d1 100644 --- a/hsm-ina226/hsm-ina226.cabal +++ b/hsm-ina226/hsm-ina226.cabal @@ -23,6 +23,7 @@ executable test-ina226 build-depends: , aeson , base + , effectful , effectful-core , effectful-plugin , hsm-core |
