Copied in-situ modifications from ics1-quokka.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user