Generate sct_hiden_xcs.tcl with new PID parameters and range check
This commit is contained in:
@ -577,6 +577,12 @@ proc ::scobj::hiden_xcs::write_twelve {tc_root nextState cmd_str} {
|
||||
if { [hpropexists [sct] bias_flow] } {
|
||||
set par [expr ${par} + [sct bias_flow]]
|
||||
}
|
||||
if { ${par} < 0.0 } {
|
||||
set par 0.0
|
||||
}
|
||||
if { ${par} > ${span} } {
|
||||
set par ${span}
|
||||
}
|
||||
set par [expr int(${base} + (4095.0 * ${par} / ${span}))]
|
||||
set cmd "${cmd_str}${par}"
|
||||
# hook code ends
|
||||
@ -630,10 +636,10 @@ proc ::scobj::hiden_xcs::mk_sct_hiden_xcs { sct_controller name tol } {
|
||||
hsetprop ${scobj_hpath}/flow pid_deriv "0"
|
||||
hsetprop ${scobj_hpath}/flow pid_dvalue "0.0"
|
||||
hsetprop ${scobj_hpath}/flow pid_error "0"
|
||||
hsetprop ${scobj_hpath}/flow pid_imax "1"
|
||||
hsetprop ${scobj_hpath}/flow pid_imax "30"
|
||||
hsetprop ${scobj_hpath}/flow pid_integ "0"
|
||||
hsetprop ${scobj_hpath}/flow pid_ivalue "0.01"
|
||||
hsetprop ${scobj_hpath}/flow pid_pvalue "0.05"
|
||||
hsetprop ${scobj_hpath}/flow pid_ivalue "0.1"
|
||||
hsetprop ${scobj_hpath}/flow pid_pvalue "0.2"
|
||||
|
||||
hfactory ${scobj_hpath}/flow1 plain user float
|
||||
hsetprop ${scobj_hpath}/flow1 control true
|
||||
@ -687,10 +693,10 @@ proc ::scobj::hiden_xcs::mk_sct_hiden_xcs { sct_controller name tol } {
|
||||
hsetprop ${scobj_hpath}/humidity pid_deriv "0"
|
||||
hsetprop ${scobj_hpath}/humidity pid_dvalue "0.0"
|
||||
hsetprop ${scobj_hpath}/humidity pid_error "0"
|
||||
hsetprop ${scobj_hpath}/humidity pid_imax "1"
|
||||
hsetprop ${scobj_hpath}/humidity pid_imax "30"
|
||||
hsetprop ${scobj_hpath}/humidity pid_integ "0"
|
||||
hsetprop ${scobj_hpath}/humidity pid_ivalue "0.005"
|
||||
hsetprop ${scobj_hpath}/humidity pid_pvalue "0.05"
|
||||
hsetprop ${scobj_hpath}/humidity pid_ivalue "0.1"
|
||||
hsetprop ${scobj_hpath}/humidity pid_pvalue "0.2"
|
||||
|
||||
hfactory ${scobj_hpath}/temperature plain user float
|
||||
hsetprop ${scobj_hpath}/temperature control true
|
||||
|
Reference in New Issue
Block a user