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}]
|
||||
@ }
|
||||
@ }
|
||||
@ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user