diff --git a/internal/device/logic.go b/internal/device/logic.go index 5b33b2b..039c6da 100644 --- a/internal/device/logic.go +++ b/internal/device/logic.go @@ -164,7 +164,7 @@ 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, 255}, // W1 - Min Threshold + 1: {0, 2000}, // W1 - Min Threshold 2: {0, 4095}, // W2 - Max Threshold 3: {1, 50}, // W3 - Pulse Count 4: {1000, 60000},// W4 - Time Window diff --git a/internal/device/state.go b/internal/device/state.go index 8c245dd..ad4b066 100644 --- a/internal/device/state.go +++ b/internal/device/state.go @@ -35,7 +35,7 @@ func NewDeviceState() *DeviceState { alarmActive: false, alarmType: "", params: map[int]int{ - 1: 127, // W1 - Min Threshold (middle of 0-255) + 1: 1200, // W1 - Min Threshold (default as per docs) 2: 2047, // W2 - Max Threshold (middle of 0-4095) 3: 25, // W3 - Pulse Count (middle of 1-50) 4: 30500, // W4 - Time Window (middle of 1000-60000) diff --git a/internal/tui/view.go b/internal/tui/view.go index d20df7e..ab81a02 100644 --- a/internal/tui/view.go +++ b/internal/tui/view.go @@ -155,7 +155,7 @@ func (m Model) renderControlsPanel(width int) string { 20: "W20 (Gain)", } paramRanges := map[int][2]int{ - 1: {0, 255}, + 1: {0, 2000}, 2: {0, 4095}, 3: {1, 50}, 4: {1000, 60000},