]> Entropealabs - drone.git/commitdiff
ensure shutter is binary when calling system command mirror/main origin/main
authorChristopher Coté <chris@entropealabs.com>
Sun, 27 Apr 2025 14:56:17 +0000 (10:56 -0400)
committerChristopher Coté <chris@entropealabs.com>
Sun, 27 Apr 2025 14:56:17 +0000 (10:56 -0400)
lib/drone/camera.ex

index 808796e397af008cc52c84072055e0803f6f5e8c..38ef4ef41a8ebf47a7d455d008c7b8f10fcf079e 100644 (file)
@@ -1,16 +1,17 @@
 defmodule Drone.Camera do
   defmodule Settings do
-    @default_shutter "5000"
+    @default_shutter 5000
     @default_gain "9"
     @default_awb "daylight"
     @default_awbgains "2,2"
+    @default_pitch 25.0
 
     @derive Jason.Encoder
     defstruct shutter: @default_shutter,
               gain: @default_gain,
               awb: @default_awb,
               awbgains: @default_awbgains,
-              pitch: 25.0
+              pitch: @default_pitch
   end
 
   def default_settings, do: %Settings{}
@@ -31,7 +32,7 @@ defmodule Drone.Camera do
           "jpg",
           "-n",
           "--shutter",
-          s,
+          "#{s}",
           "--lens-position",
           "0.0",
           "-q",