From f7f11acafe0a404fa218c13832e32fce574ae0f6 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Fri, 2 Jan 2026 11:37:35 +0000 Subject: Adds battery monitoring to frontend --- hsm-web/Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hsm-web/Main.hs') diff --git a/hsm-web/Main.hs b/hsm-web/Main.hs index 7555067..0ec780e 100644 --- a/hsm-web/Main.hs +++ b/hsm-web/Main.hs @@ -3,6 +3,8 @@ import Data.Function ((&)) import Effectful (runEff) import Hsm.Core.App (bootstrapAppNoEcho) +import Hsm.I2C (runI2C) +import Hsm.INA226 (runINA226) import Hsm.Log (Severity (Info), runLogsOpt) import Hsm.Log.Options (makeLoggerOptionParser) import Hsm.Web (runServer, runWeb) @@ -10,9 +12,9 @@ import Hsm.Web (runServer, runWeb) -- Avoids package/module qualifiers in generated code import Options.Applicative -type Logs = '["scotty", "web"] +type Logs = '["i2c", "ina226", "scotty", "web"] $(makeLoggerOptionParser @Logs "Options" "parser" 'Info) main :: IO () -main = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts -> runServer & runWeb & runLogsOpt @Options @Logs opts & runEff +main = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts -> runServer & runWeb & runINA226 & runI2C & runLogsOpt @Options @Logs opts & runEff -- cgit v1.2.1