diff options
Diffstat (limited to 'hsm-cam/Test')
-rw-r--r-- | hsm-cam/Test/Cam.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hsm-cam/Test/Cam.hs b/hsm-cam/Test/Cam.hs new file mode 100644 index 0000000..94d3b73 --- /dev/null +++ b/hsm-cam/Test/Cam.hs @@ -0,0 +1,17 @@ +import Control.Monad (forM_) +import Data.Function ((&)) +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 = + forM_ [0 .. 31] (\index -> capturePng >>= writeFile ("/tmp/hsm-cam-test" <> show @Int index <> ".png")) + & runCam + & runLog @"cam" Trace + & runLog @"libcamera" Info + & runFileSystem + & runEff |