Copied in-situ modifications from ics1-quokka.

This commit is contained in:
Ferdi Franceschini
2013-02-20 18:19:44 +11:00
parent b5b4d7a747
commit e7a478489e
17 changed files with 299 additions and 78 deletions

View File

@@ -208,7 +208,8 @@ proc rdPwdAck {} {
set speedvar [expr 0.2*$rspeed/100]
if {[hval $root/status] == "busy"} {
set target [hgetpropval $root/setspeed target]
if {$rspeed != $target} {
# rspeed doesn't always match the speed you sent, eg If you send 15922 the velsel says it got 15923
if {[expr abs($rspeed - $target)] > 1} {
hset $root/device_error "Resending target speed $target"
hset $root/setspeed $target"
return idle
@@ -459,7 +460,7 @@ proc halt {root} {
set fmtspeed [format "%5d" $speed]
sct send "N#SOS#SPEED $fmtspeed"
sct target $lambda
hsetprop $vs_root/setspeed target $speed
hsetprop $vs_root/setspeed target $fmtspeed
hset $vs_root/status "busy"
statemon start nvs_speed
statemon start nvs_lambda