blob: 5c8daf51077e96e680cabeda468eaa689ab7477d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import Control.Monad (forM_)
import Effectful (runEff)
import Effectful.FileSystem (runFileSystem)
import Effectful.FileSystem.IO.ByteString.Lazy (writeFile)
import Hsm.Cam (capturePng, runCam)
import Hsm.Log (Severity(Info, Trace), runLog)
import Prelude hiding (writeFile)
main :: IO ()
main =
runEff . runFileSystem . runLog @"cam" Trace . runLog @"libcamera" Info . runCam . forM_ [0 .. 31] $ \index ->
capturePng >>= writeFile ("/tmp/hsm-cam-test" <> show @Int index <> ".png")
|