fix ranges

This commit is contained in:
2026-02-23 01:12:49 +01:00
parent dd18f74e65
commit e115106b2b
3 changed files with 22 additions and 22 deletions

View File

@@ -164,13 +164,13 @@ func isReadableParamID(id int) bool {
// validateParamRange checks if value is within acceptable range for parameter
func validateParamRange(id, value int) bool {
ranges := map[int][2]int{
1: {0, 2000}, // W1 - Min Threshold
2: {0, 4095}, // W2 - Max Threshold
3: {1, 50}, // W3 - Pulse Count
4: {10, 1000}, // W4 - Time Window
11: {0, 1000}, // W11 - Min Pulse Duration
12: {0, 1000}, // W12 - Max Pulse Duration
20: {0, 255}, // W20 - Gain (Wiper)
1: {0, 255}, // W1 - Min Threshold
2: {0, 4095}, // W2 - Max Threshold
3: {1, 50}, // W3 - Pulse Count
4: {1000, 60000},// W4 - Time Window
11: {5, 300}, // W11 - Min Pulse Duration
12: {5, 300}, // W12 - Max Pulse Duration
20: {0, 255}, // W20 - Gain (Wiper)
}
r, ok := ranges[id]