Skip to content

Clamp EMS/GVS/ET params in /execute to the bounds manual_control_app.py already enforces#3

Open
DIYA73 wants to merge 1 commit into
danielkaijzer:mainfrom
DIYA73:fix/execute-bounds
Open

Clamp EMS/GVS/ET params in /execute to the bounds manual_control_app.py already enforces#3
DIYA73 wants to merge 1 commit into
danielkaijzer:mainfrom
DIYA73:fix/execute-bounds

Conversation

@DIYA73

@DIYA73 DIYA73 commented Jul 15, 2026

Copy link
Copy Markdown

/execute accepted amplitude/frequency/duration/pulse_width straight off the POST body with no bounds-checking, even though manual_control_app.py already hardcodes safe ranges for these same parameters on its sliders (amplitude 0-60, pulse width 0-1000μs, frequency 0-100Hz, duration 0-10000ms). This applies those same bounds to /execute so an out-of-range payload can't drive the stimulator past them — values outside range are clamped and logged, not silently dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant