Removed old error message
This commit is contained in:

committed by
Ferdi Franceschini

parent
58caa19668
commit
17d72343e7
@ -41,6 +41,10 @@ namespace eval ::scobj::ls218 {
|
||||
# @return nextState The next function to call after this one (typically 'rdValue')
|
||||
proc ::scobj::ls218::getValue {idx cmd chID nextState} {
|
||||
if {[ catch {
|
||||
if {[hpropexists [sct] geterror]} {
|
||||
hdelprop [sct] geterror
|
||||
}
|
||||
|
||||
if {$chID == 1} {
|
||||
set comm "$cmd $idx"
|
||||
} elseif {$chID == 0} {
|
||||
@ -72,8 +76,18 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
|
||||
|
||||
if {[ catch {
|
||||
set replyData [string trimright [sct result] " \r\n"]
|
||||
set fields [split $replyData ,]
|
||||
set curValue $replyData
|
||||
|
||||
if {[string first "ASCERR" $replyData] != -1} {
|
||||
#broadcast "Error in LS218 Response: ASCERR:"
|
||||
sct geterror $replyData
|
||||
return -code error "Error in LS218 Response: $replyData"
|
||||
} elseif {[string length $replyData] < 1} {
|
||||
#broadcast "Error in LS218 Response: no message returned from device"
|
||||
return -code error "Error in LS218: no message returned from device"
|
||||
} else {
|
||||
set fields [split $replyData ,]
|
||||
set curValue $replyData
|
||||
}
|
||||
|
||||
switch -exact $varName {
|
||||
"alarm" { if {[lindex $fields 0] == 0} {
|
||||
|
Reference in New Issue
Block a user