Changes to sct files

This commit is contained in:
Douglas Clowes
2014-04-24 10:45:45 +10:00
parent bf84f65e5a
commit a52835379d
3 changed files with 18 additions and 13 deletions

View File

@ -223,14 +223,16 @@ driver hiden_xcs = {
code pid_function pid_humidity = { code pid_function pid_humidity = {
@ set sign 1 @ 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 sign [expr -${sign}]
@ set signed_pid [expr ${sign} * ${pid}] @ set signed_pid [expr ${sign} * ${pid}]
@ hsetprop ${tc_root}/${node} bias_humidity ${signed_pid} @ if { !([hpropexists ${node} bias_humidity] && [hgetpropval ${node} bias_humidity] == ${signed_pid}) } {
@ if { [hpropexists ${tc_root}/${node} target] } { @ hsetprop ${node} bias_humidity ${signed_pid}
@ hset ${tc_root}/${node} [hgetpropval ${tc_root}/${node} target] @ if { [hpropexists ${node} target] } {
@ } else { @ hset ${node} [hgetpropval ${node} target]
@ hset ${tc_root}/${node} [hval ${tc_root}/${node}] @ } else {
@ hset ${node} [hval ${node}]
@ }
@ } @ }
@ } @ }
} }
@ -250,12 +252,14 @@ driver hiden_xcs = {
} }
code pid_function pid_flow = { code pid_function pid_flow = {
@ foreach node [list analog/sp1 analog/sp2] { @ foreach node [list ${tc_root}/analog/sp1 ${tc_root}/analog/sp2] {
@ hsetprop ${tc_root}/${node} bias_flow ${pid} @ if { !([hpropexists ${node} bias_flow] && [hgetpropval ${node} bias_flow] == ${pid}) } {
@ if { [hpropexists ${tc_root}/${node} target] } { @ hsetprop ${node} bias_flow ${pid}
@ hset ${tc_root}/${node} [hgetpropval ${tc_root}/${node} target] @ if { [hpropexists ${node} target] } {
@ } else { @ hset ${node} [hgetpropval ${node} target]
@ hset ${tc_root}/${node} [hval ${tc_root}/${node}] @ } else {
@ hset ${node} [hval ${node}]
@ }
@ } @ }
@ } @ }
} }

View File

@ -84,5 +84,6 @@ driver mercury_scpi = {
@ set par [expr ${par} + [hgetpropval [sct] pid_bias]] @ set par [expr ${par} + [hgetpropval [sct] pid_bias]]
@ set cmd "${cmd_str}${par}" @ set cmd "${cmd_str}${par}"
@ } @ }
@ sct update [sct target]
} }
} }

View File

@ -44,7 +44,7 @@ driver pfeiffer_hg = {
code read_function ack_enq = { code read_function ack_enq = {
@ if {[string equal -nocase -length 1 ${data} "\x06"]} { @ 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" @ sct send "\x05"
@ } @ }
@ return "readPR1" @ return "readPR1"