Format JSON

This commit is contained in:
atse 2024-07-03 13:40:50 +08:00
parent b768d61e39
commit 0f14212622

View File

@ -1,31 +1,31 @@
{ {
"ctrl_panel":[ "ctrl_panel": [
{ {
"name":"Temperature", "name": "Temperature",
"type":"float", "type": "float",
"format":"{value:.4f} °C", "format": "{value:.4f} °C",
"readonly":true "readonly": true
}, },
{ {
"name":"Current through TEC", "name": "Current through TEC",
"type":"float", "type": "float",
"suffix":"mA", "suffix": "mA",
"decimals":6, "decimals": 6,
"readonly":true "readonly": true
}, },
{ {
"name":"Output Config", "name": "Output Config",
"expanded":true, "expanded": true,
"type":"group", "type": "group",
"children":[ "children": [
{ {
"name":"Control Method", "name": "Control Method",
"type":"mutex", "type": "mutex",
"limits":[ "limits": [
"Constant Current", "Constant Current",
"Temperature PID" "Temperature PID"
], ],
"activaters":[ "activaters": [
null, null,
[ [
"pwm", "pwm",
@ -33,333 +33,333 @@
"pid" "pid"
] ]
], ],
"children":[ "children": [
{ {
"name":"Set Current", "name": "Set Current",
"type":"float", "type": "float",
"value":0, "value": 0,
"step":100, "step": 100,
"limits":[ "limits": [
-2000, -2000,
2000 2000
], ],
"triggerOnShow":true, "triggerOnShow": true,
"decimals":6, "decimals": 6,
"suffix":"mA", "suffix": "mA",
"param":[ "param": [
"pwm", "pwm",
"ch", "ch",
"i_set" "i_set"
], ],
"lock":false "lock": false
}, },
{ {
"name":"Set Temperature", "name": "Set Temperature",
"type":"float", "type": "float",
"value":25, "value": 25,
"step":0.1, "step": 0.1,
"limits":[ "limits": [
-273, -273,
300 300
], ],
"format":"{value:.4f} °C", "format": "{value:.4f} °C",
"param":[ "param": [
"pid", "pid",
"ch", "ch",
"target" "target"
], ],
"lock":false "lock": false
} }
] ]
}, },
{ {
"name":"Limits", "name": "Limits",
"expanded":true, "expanded": true,
"type":"group", "type": "group",
"children":[ "children": [
{ {
"name":"Max Cooling Current", "name": "Max Cooling Current",
"type":"float", "type": "float",
"value":0, "value": 0,
"step":100, "step": 100,
"decimals":6, "decimals": 6,
"limits":[ "limits": [
0, 0,
2000 2000
], ],
"suffix":"mA", "suffix": "mA",
"param":[ "param": [
"pwm", "pwm",
"ch", "ch",
"max_i_pos" "max_i_pos"
], ],
"lock":false "lock": false
}, },
{ {
"name":"Max Heating Current", "name": "Max Heating Current",
"type":"float", "type": "float",
"value":0, "value": 0,
"step":100, "step": 100,
"decimals":6, "decimals": 6,
"limits":[ "limits": [
0, 0,
2000 2000
], ],
"suffix":"mA", "suffix": "mA",
"param":[ "param": [
"pwm", "pwm",
"ch", "ch",
"max_i_neg" "max_i_neg"
], ],
"lock":false "lock": false
}, },
{ {
"name":"Max Voltage Difference", "name": "Max Voltage Difference",
"type":"float", "type": "float",
"value":0, "value": 0,
"step":0.1, "step": 0.1,
"limits":[ "limits": [
0, 0,
5 5
], ],
"siPrefix":true, "siPrefix": true,
"suffix":"V", "suffix": "V",
"param":[ "param": [
"pwm", "pwm",
"ch", "ch",
"max_v" "max_v"
], ],
"lock":false "lock": false
} }
] ]
} }
] ]
}, },
{ {
"name":"Thermistor Config", "name": "Thermistor Config",
"expanded":true, "expanded": true,
"type":"group", "type": "group",
"children":[ "children": [
{ {
"name":"T₀", "name": "T₀",
"type":"float", "type": "float",
"value":25, "value": 25,
"step":0.1, "step": 0.1,
"limits":[ "limits": [
-100, -100,
100 100
], ],
"format":"{value:.4f} °C", "format": "{value:.4f} °C",
"param":[ "param": [
"s-h", "s-h",
"ch", "ch",
"t0" "t0"
], ],
"lock":false "lock": false
}, },
{ {
"name":"R₀", "name": "R₀",
"type":"float", "type": "float",
"value":10000, "value": 10000,
"step":1, "step": 1,
"siPrefix":true, "siPrefix": true,
"suffix":"Ω", "suffix": "Ω",
"param":[ "param": [
"s-h", "s-h",
"ch", "ch",
"r0" "r0"
], ],
"lock":false "lock": false
}, },
{ {
"name":"B", "name": "B",
"type":"float", "type": "float",
"value":3950, "value": 3950,
"step":1, "step": 1,
"suffix":"K", "suffix": "K",
"decimals":4, "decimals": 4,
"param":[ "param": [
"s-h", "s-h",
"ch", "ch",
"b" "b"
], ],
"lock":false "lock": false
}, },
{ {
"name":"Postfilter Rate", "name": "Postfilter Rate",
"type":"list", "type": "list",
"value":16.67, "value": 16.67,
"param":[ "param": [
"postfilter", "postfilter",
"ch", "ch",
"rate" "rate"
], ],
"limits":{ "limits": {
"Off":null, "Off": null,
"16.67 Hz":16.67, "16.67 Hz": 16.67,
"20 Hz":20.0, "20 Hz": 20.0,
"21.25 Hz":21.25, "21.25 Hz": 21.25,
"27 Hz":27.0 "27 Hz": 27.0
}, },
"lock":false "lock": false
} }
] ]
}, },
{ {
"name":"PID Config", "name": "PID Config",
"expanded":true, "expanded": true,
"type":"group", "type": "group",
"children":[ "children": [
{ {
"name":"Kp", "name": "Kp",
"type":"float", "type": "float",
"step":0.1, "step": 0.1,
"suffix":"", "suffix": "",
"param":[ "param": [
"pid", "pid",
"ch", "ch",
"kp" "kp"
], ],
"lock":false "lock": false
}, },
{ {
"name":"Ki", "name": "Ki",
"type":"float", "type": "float",
"step":0.1, "step": 0.1,
"suffix":"Hz", "suffix": "Hz",
"param":[ "param": [
"pid", "pid",
"ch", "ch",
"ki" "ki"
], ],
"lock":false "lock": false
}, },
{ {
"name":"Kd", "name": "Kd",
"type":"float", "type": "float",
"step":0.1, "step": 0.1,
"suffix":"s", "suffix": "s",
"param":[ "param": [
"pid", "pid",
"ch", "ch",
"kd" "kd"
], ],
"lock":false "lock": false
}, },
{ {
"name":"PID Output Clamping", "name": "PID Output Clamping",
"expanded":true, "expanded": true,
"type":"group", "type": "group",
"children":[ "children": [
{ {
"name":"Minimum", "name": "Minimum",
"type":"float", "type": "float",
"step":100, "step": 100,
"limits":[ "limits": [
-2000, -2000,
2000 2000
], ],
"decimals":6, "decimals": 6,
"suffix":"mA", "suffix": "mA",
"param":[ "param": [
"pid", "pid",
"ch", "ch",
"output_min" "output_min"
], ],
"lock":false "lock": false
}, },
{ {
"name":"Maximum", "name": "Maximum",
"type":"float", "type": "float",
"step":100, "step": 100,
"limits":[ "limits": [
-2000, -2000,
2000 2000
], ],
"decimals":6, "decimals": 6,
"suffix":"mA", "suffix": "mA",
"param":[ "param": [
"pid", "pid",
"ch", "ch",
"output_max" "output_max"
], ],
"lock":false "lock": false
} }
] ]
}, },
{ {
"name":"PID Auto Tune", "name": "PID Auto Tune",
"expanded":false, "expanded": false,
"type":"group", "type": "group",
"children":[ "children": [
{ {
"name":"Target Temperature", "name": "Target Temperature",
"type":"float", "type": "float",
"value":20, "value": 20,
"step":0.1, "step": 0.1,
"format":"{value:.4f} °C", "format": "{value:.4f} °C",
"pid_autotune":[ "pid_autotune": [
"target_temp", "target_temp",
"ch" "ch"
] ]
}, },
{ {
"name":"Test Current", "name": "Test Current",
"type":"float", "type": "float",
"value":0, "value": 0,
"decimals":6, "decimals": 6,
"step":100, "step": 100,
"limits":[ "limits": [
-2000, -2000,
2000 2000
], ],
"suffix":"mA", "suffix": "mA",
"pid_autotune":[ "pid_autotune": [
"test_current", "test_current",
"ch" "ch"
] ]
}, },
{ {
"name":"Temperature Swing", "name": "Temperature Swing",
"type":"float", "type": "float",
"value":1.5, "value": 1.5,
"step":0.1, "step": 0.1,
"prefix":"±", "prefix": "±",
"format":"{value:.4f} °C", "format": "{value:.4f} °C",
"pid_autotune":[ "pid_autotune": [
"temp_swing", "temp_swing",
"ch" "ch"
] ]
}, },
{ {
"name":"Lookback", "name": "Lookback",
"type":"float", "type": "float",
"value":3.0, "value": 3.0,
"step":0.1, "step": 0.1,
"format":"{value:.4f} s", "format": "{value:.4f} s",
"pid_autotune":[ "pid_autotune": [
"lookback", "lookback",
"ch" "ch"
] ]
}, },
{ {
"name":"Run", "name": "Run",
"type":"action", "type": "action",
"tip":"Run" "tip": "Run"
} }
] ]
} }
] ]
}, },
{ {
"name":"Save to flash", "name": "Save to flash",
"type":"action", "type": "action",
"tip":"Save config to thermostat, applies on reset" "tip": "Save config to thermostat, applies on reset"
}, },
{ {
"name":"Load from flash", "name": "Load from flash",
"type":"action", "type": "action",
"tip":"Load config from flash" "tip": "Load config from flash"
} }
] ]
} }