Make sure spin flipper code in rfamp.c is initialised
Fixed drive bugs in lakeshore drivers. r3071 | ffr | 2011-02-25 18:27:31 +1100 (Fri, 25 Feb 2011) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
009fdbfc29
commit
7371a561d9
@@ -22,6 +22,7 @@ namespace eval ::scobj::lh45 {
|
||||
|
||||
proc setPoint {tc_root nextState cmd} {
|
||||
if {[hval $tc_root/remote_ctrl] == "False"} {
|
||||
sct driving 0
|
||||
return idle
|
||||
}
|
||||
set par [sct target]
|
||||
@@ -33,12 +34,8 @@ namespace eval ::scobj::lh45 {
|
||||
# }
|
||||
hset $tc_root/power 1
|
||||
hset $tc_root/status "busy"
|
||||
if {[sct writestatus] == "start"} {
|
||||
# Called by drive adapter
|
||||
hsetprop $tc_root/setpoint driving 1
|
||||
}
|
||||
sct send "$cmd $par"
|
||||
sct updated 0
|
||||
sct setpoint_pending 0
|
||||
return $nextState
|
||||
}
|
||||
|
||||
@@ -53,7 +50,6 @@ namespace eval ::scobj::lh45 {
|
||||
sct oldval $data
|
||||
sct update $data
|
||||
sct utime readtime
|
||||
sct updated 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,8 +84,8 @@ namespace eval ::scobj::lh45 {
|
||||
sct update $power
|
||||
}
|
||||
if {$power==1} {
|
||||
set setpoint_updated [hgetpropval $tc_root/setpoint updated]
|
||||
if {$setpoint_updated != 1} {
|
||||
if [hgetpropval $tc_root/setpoint setpoint_pending] {
|
||||
# Don't update status while we're waiting for the new setpoint to be sent
|
||||
return idle
|
||||
}
|
||||
set currtime [sct readtime]
|
||||
@@ -196,8 +192,10 @@ namespace eval ::scobj::lh45 {
|
||||
set lolimit [hval $tc_root/lowerlimit]
|
||||
set hilimit [hval $tc_root/upperlimit]
|
||||
if {$setpoint < $lolimit || $setpoint > $hilimit} {
|
||||
sct driving 0
|
||||
error "setpoint violates limits"
|
||||
}
|
||||
sct setpoint_pending 1
|
||||
return OK
|
||||
}
|
||||
|
||||
@@ -239,7 +237,7 @@ namespace eval ::scobj::lh45 {
|
||||
hsetprop $scobj_hpath/setpoint driving 0
|
||||
hsetprop $scobj_hpath/setpoint writestatus UNKNOWN
|
||||
hsetprop $scobj_hpath/setpoint type drivable
|
||||
hsetprop $scobj_hpath/setpoint updated 0
|
||||
hsetprop $scobj_hpath/setpoint setpoint_pending 0
|
||||
# Drive adapter interface
|
||||
hsetprop $scobj_hpath/setpoint checklimits ${ns}::check $scobj_hpath
|
||||
hsetprop $scobj_hpath/setpoint checkstatus ${ns}::drivestatus $scobj_hpath
|
||||
|
||||
Reference in New Issue
Block a user