summaryrefslogtreecommitdiff
path: root/api_layers
diff options
context:
space:
mode:
authorChristian Kolset <ckolset@colostate.edu>2026-08-03 17:04:19 -0600
committerChristian Kolset <ckolset@colostate.edu>2026-08-03 17:04:19 -0600
commitfc2c0000af4009d114c908411eb8cfd36f14b53f (patch)
tree3d42bb09ca42f7a64d117c95f7a68ca617de3639 /api_layers
parent9bcad5d3af258eb72bc9c8ac87e3f1713e1b8b80 (diff)
Fix clipped/jagged simulated Arduino waveforms
amp+offset spanned the full [0,5] clamp range edge-to-edge, so per-sample noise pushed past the rails on every peak/trough and got hard-clamped into a flat plateau. Shrinking amp gives ~8.7 sigma of headroom so the clamp stays a safety net instead of firing every cycle. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'api_layers')
-rw-r--r--api_layers/arduino_layer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/api_layers/arduino_layer.py b/api_layers/arduino_layer.py
index 88a2655..52eeb30 100644
--- a/api_layers/arduino_layer.py
+++ b/api_layers/arduino_layer.py
@@ -121,7 +121,7 @@ class ArduinoLayer:
self._sim_params = {
pin: {
"freq": 0.1 + i * 0.13,
- "amp": 2.5,
+ "amp": 2.3, # headroom below the [0,5] clamp so noise doesn't flat-clip every peak
"offset": 2.5,
"noise": 0.01,
"phase": i * 1.1,