Implement a reset capability

r3150 | dcl | 2011-05-20 10:26:59 +1000 (Fri, 20 May 2011) | 1 line
This commit is contained in:
Douglas Clowes
2011-05-20 10:26:59 +10:00
parent df6f44a2ac
commit afa42563a0

View File

@@ -754,6 +754,16 @@ debug_log "setPoint $cmd $par"
return idle
}
proc setRest {tc_root nextState cmd} {
debug_log "setRest $tc_root [sct] [sct target]"
sct print "setRest $tc_root [sct] [sct target]"
hsetprop $tc_root/device_state my_state "STATE_INIT"
hsetprop $tc_root/device_state my_substate "0"
hsetprop $tc_root/setpoint driving "0"
# TODO What else needs to be set
return $nextState
}
proc chkWrite {tc_root} {
set data [sct result]
debug_log "chkWrite resp=$data sct=[sct] tc_root=$tc_root"
@@ -945,6 +955,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable\
{} viscosity 1 0 0 float internal {RSI} {rdVisc} {0} {} {}\
{} profile 0 1 0 text user {} {} {0} {setProf.ackProf} {}\
{} test 1 1 0 text user {RD000000} {rdTest} {0} {setTest.ackTest} {}\
{} reset 0 1 0 text user {} {} {0} {setRest} {}\
}
hfactory $scobj_hpath/sensor plain spy none