fix issue when unplug and plug happen within wshort time

see issue with MA10 on ZEBRA at 2024-04-26
http://samenv.psi.ch:8080/sample_environment/437
This commit is contained in:
l_samenv
2024-06-27 14:52:25 +02:00
parent 5b4a7ac173
commit d1170397c2
2 changed files with 4 additions and 1 deletions

View File

@ -649,7 +649,6 @@ clientlog "SELECTED $newdevice"
device makeitem action "selected on touch display"
}
# set device state to "loading"
clientput loading
sct send cds=2
} elseif {$deviceaction == 3} {
# clientput "plugged [string tolower $newdevice] but autodevice off"

View File

@ -1786,6 +1786,10 @@ clientput "CONFIG $device/$stick/$addons"
} else {
if {[result device name] ne "none" && $act eq "plugged"} {
clientlog "unplugged time too short [result device name] -> $new"
device makeitem confirmed none
catch {samenv -q none} msg
clientput $msg
return
} else {
device makeitem confirmed $new
clientput "LOAD $new $act"