improve autodevice deature

for autodevice to work, it is not necessary to be unplugged
for 60 seconds, only for a short time.
fixed this behaviour
This commit is contained in:
l_samenv
2024-11-11 16:41:41 +01:00
parent 5d8fa3b24f
commit f5a129b6d9
2 changed files with 17 additions and 9 deletions

View File

@ -548,6 +548,14 @@ proc ccu4::update {} {
}
}
}
cda - cdb {
set cda [hval [sct]/cda]
set cdb [hval [sct]/cdb]
set $name $value
if {$cda == 999999 && $cdb == 999999} {
device makeitem was_unplugged 1
}
}
}
set visible [silent true hgetpropval [sct]/$name visible]
if {[silent notFound hlist [sct]/$name] eq "notFound"} {
@ -639,7 +647,10 @@ clientlog RENEW
if {[llength $guess] == 1} {
set newdevice [lindex [split $guess .] 0]
}
}
}
if {$newdevice eq "none"} {
device makeitem was_unplugged 1
}
device makeitem newdevice $newdevice
if {$deviceaction == 3} {
clientlog "PLUGGED $newdevice"