fix W1 range
This commit is contained in:
@@ -164,7 +164,7 @@ func isReadableParamID(id int) bool {
|
|||||||
// validateParamRange checks if value is within acceptable range for parameter
|
// validateParamRange checks if value is within acceptable range for parameter
|
||||||
func validateParamRange(id, value int) bool {
|
func validateParamRange(id, value int) bool {
|
||||||
ranges := map[int][2]int{
|
ranges := map[int][2]int{
|
||||||
1: {0, 255}, // W1 - Min Threshold
|
1: {0, 2000}, // W1 - Min Threshold
|
||||||
2: {0, 4095}, // W2 - Max Threshold
|
2: {0, 4095}, // W2 - Max Threshold
|
||||||
3: {1, 50}, // W3 - Pulse Count
|
3: {1, 50}, // W3 - Pulse Count
|
||||||
4: {1000, 60000},// W4 - Time Window
|
4: {1000, 60000},// W4 - Time Window
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ func NewDeviceState() *DeviceState {
|
|||||||
alarmActive: false,
|
alarmActive: false,
|
||||||
alarmType: "",
|
alarmType: "",
|
||||||
params: map[int]int{
|
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)
|
2: 2047, // W2 - Max Threshold (middle of 0-4095)
|
||||||
3: 25, // W3 - Pulse Count (middle of 1-50)
|
3: 25, // W3 - Pulse Count (middle of 1-50)
|
||||||
4: 30500, // W4 - Time Window (middle of 1000-60000)
|
4: 30500, // W4 - Time Window (middle of 1000-60000)
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ func (m Model) renderControlsPanel(width int) string {
|
|||||||
20: "W20 (Gain)",
|
20: "W20 (Gain)",
|
||||||
}
|
}
|
||||||
paramRanges := map[int][2]int{
|
paramRanges := map[int][2]int{
|
||||||
1: {0, 255},
|
1: {0, 2000},
|
||||||
2: {0, 4095},
|
2: {0, 4095},
|
||||||
3: {1, 50},
|
3: {1, 50},
|
||||||
4: {1000, 60000},
|
4: {1000, 60000},
|
||||||
|
|||||||
Reference in New Issue
Block a user