aboutsummaryrefslogtreecommitdiff
path: root/hsm-web/Main.hs
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2026-01-02 11:37:35 +0000
committerPaul Oliver <contact@pauloliver.dev>2026-01-02 11:57:54 +0000
commitf7f11acafe0a404fa218c13832e32fce574ae0f6 (patch)
treef3a531050b4be2d708eb6aac53ce4474f798886b /hsm-web/Main.hs
parent43af089b3588b6fd29a1b09be9874054e0291c5e (diff)
Adds battery monitoring to frontend
Diffstat (limited to 'hsm-web/Main.hs')
-rw-r--r--hsm-web/Main.hs6
1 files changed, 4 insertions, 2 deletions
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