Fix the Pfeiffer/mercury driver
This commit is contained in:
@ -30,12 +30,15 @@ driver pfeiffer_hg = {
|
||||
|
||||
code pid_function pid_pressure = {
|
||||
@ if { [hpropexists [sct] pid_control] } {
|
||||
@ hsetprop [hgetpropval [sct] pid_control] pid_bias ${pid}
|
||||
@ if { [hpropexists [hgetpropval [sct] pid_control] target] } {
|
||||
@ hset [hgetpropval [sct] pid_control] [hgetpropval [hgetpropval [sct] pid_control] target]
|
||||
@ set co [hgetpropval [sct] pid_control]
|
||||
@ if { !([hpropexists ${co} pid_bias] && [hgetpropval ${co} pid_bias] == ${pid}) } {
|
||||
@ hsetprop ${co} pid_bias ${pid}
|
||||
@ if { [hpropexists ${co} target] } {
|
||||
@ hset ${co} [hgetpropval ${co} target]
|
||||
@ } else {
|
||||
@ hset [hgetpropval [sct] pid_control] [hval [hgetpropval [sct] pid_control]]
|
||||
@ hset ${co} [hval ${co}]
|
||||
@ }
|
||||
@ }
|
||||
@ }
|
||||
}
|
||||
|
||||
@ -61,6 +64,9 @@ driver pfeiffer_hg = {
|
||||
|
||||
code write_function setPoint = {
|
||||
@ sct pid_control /sample/tc9/Valve/Setpoint
|
||||
@ sct update [sct target]
|
||||
@ set cmd "@@NOSEND@@"
|
||||
@ set nextState "idle"
|
||||
}
|
||||
|
||||
code mkDriver = {
|
||||
|
Reference in New Issue
Block a user