Fixing hang-on bug in lfgen protocol

r3689 | jgn | 2012-08-03 14:09:14 +1000 (Fri, 03 Aug 2012) | 1 line
This commit is contained in:
Jing Chen
2012-08-03 14:09:14 +10:00
committed by Douglas Clowes
parent 74edc8ab56
commit 27a37364ab

View File

@@ -345,6 +345,10 @@ proc ::scobj::ag1010::rdValue {} {
#set ns [sct]
if {[ catch {
set data [string trim [sct result] " "]
if {[string length $data] < 1} {
broadcast "Error in rdValue: no message returned from device"
return -code error "Error in rdValue: no message returned from device"
}
set ctrlCode [format %d 0x[string range $data 4 5]]
switch -glob $ctrlCode {
@@ -1121,8 +1125,8 @@ publish LFGetMEAS user
# IP 137.157.202.219
::scobj::ag1010::mkAG {
name "ag1010"
IP 137.157.202.219
PORT 4001
IP localhost
PORT 50001
tuning 1
interval 5
}