From e36ee1ea929693dee0739f3810b35f6c00c8621a Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <MichielCottaar@protonmail.com>
Date: Wed, 18 Sep 2024 13:19:46 +0100
Subject: [PATCH] resolution and oversample should at least be 1

---
 src/components/readouts/ADCs.jl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/readouts/ADCs.jl b/src/components/readouts/ADCs.jl
index eca7967..5e74584 100644
--- a/src/components/readouts/ADCs.jl
+++ b/src/components/readouts/ADCs.jl
@@ -37,7 +37,8 @@ function ADC(; resolution=nothing, dwell_time=nothing, time_to_center=nothing, c
         get_free_variable(oversample, integer=true),
     )
     apply_simple_constraint!(res.dwell_time, :>=, 0)
-    apply_simple_constraint!(res.oversample, :>=, 0)
+    apply_simple_constraint!(res.oversample, :>=, 1)
+    apply_simple_constraint!(res.resolution, :>=, 1)
     if center_halfway
         apply_simple_constraint!(variables.duration(res), 2 * res.time_to_center)
     else
-- 
GitLab