From 864a1d2a22580a33b5e928734fd256c2133fb672 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Sat, 3 Jan 2026 00:26:51 +0000 Subject: Adds camera streaming to frontend --- hsm-ina226/Test/INA226.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hsm-ina226/Test/INA226.hs') 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 -- cgit v1.2.1