Changes to sct files
This commit is contained in:
@ -223,14 +223,16 @@ driver hiden_xcs = {
|
||||
|
||||
code pid_function pid_humidity = {
|
||||
@ set sign 1
|
||||
@ foreach node [list analog/sp1 analog/sp2] {
|
||||
@ foreach node [list ${tc_root}/analog/sp1 ${tc_root}/analog/sp2] {
|
||||
@ set sign [expr -${sign}]
|
||||
@ set signed_pid [expr ${sign} * ${pid}]
|
||||
@ hsetprop ${tc_root}/${node} bias_humidity ${signed_pid}
|
||||
@ if { [hpropexists ${tc_root}/${node} target] } {
|
||||
@ hset ${tc_root}/${node} [hgetpropval ${tc_root}/${node} target]
|
||||
@ } else {
|
||||
@ hset ${tc_root}/${node} [hval ${tc_root}/${node}]
|
||||
@ if { !([hpropexists ${node} bias_humidity] && [hgetpropval ${node} bias_humidity] == ${signed_pid}) } {
|
||||
@ hsetprop ${node} bias_humidity ${signed_pid}
|
||||
@ if { [hpropexists ${node} target] } {
|
||||
@ hset ${node} [hgetpropval ${node} target]
|
||||
@ } else {
|
||||
@ hset ${node} [hval ${node}]
|
||||
@ }
|
||||
@ }
|
||||
@ }
|
||||
}
|
||||
@ -250,12 +252,14 @@ driver hiden_xcs = {
|
||||
}
|
||||
|
||||
code pid_function pid_flow = {
|
||||
@ foreach node [list analog/sp1 analog/sp2] {
|
||||
@ hsetprop ${tc_root}/${node} bias_flow ${pid}
|
||||
@ if { [hpropexists ${tc_root}/${node} target] } {
|
||||
@ hset ${tc_root}/${node} [hgetpropval ${tc_root}/${node} target]
|
||||
@ } else {
|
||||
@ hset ${tc_root}/${node} [hval ${tc_root}/${node}]
|
||||
@ foreach node [list ${tc_root}/analog/sp1 ${tc_root}/analog/sp2] {
|
||||
@ if { !([hpropexists ${node} bias_flow] && [hgetpropval ${node} bias_flow] == ${pid}) } {
|
||||
@ hsetprop ${node} bias_flow ${pid}
|
||||
@ if { [hpropexists ${node} target] } {
|
||||
@ hset ${node} [hgetpropval ${node} target]
|
||||
@ } else {
|
||||
@ hset ${node} [hval ${node}]
|
||||
@ }
|
||||
@ }
|
||||
@ }
|
||||
}
|
||||
|
@ -84,5 +84,6 @@ driver mercury_scpi = {
|
||||
@ set par [expr ${par} + [hgetpropval [sct] pid_bias]]
|
||||
@ set cmd "${cmd_str}${par}"
|
||||
@ }
|
||||
@ sct update [sct target]
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ driver pfeiffer_hg = {
|
||||
|
||||
code read_function ack_enq = {
|
||||
@ if {[string equal -nocase -length 1 ${data} "\x06"]} {
|
||||
@ debug_log 1 "ack_enq received ACK, send ENQ"
|
||||
@ debug_log ${tc_root} 1 "ack_enq received ACK, send ENQ"
|
||||
@ sct send "\x05"
|
||||
@ }
|
||||
@ return "readPR1"
|
||||
|
Reference in New Issue
Block a user