Files
sea/tcl/drivers/paa33x.tcl
2022-08-18 15:04:28 +02:00

36 lines
759 B
Tcl

namespace eval paa33x {} {
}
proc stdConfig::paa33x {} {
controller bin keller-crc 2
# pollperiod 15 15
prop startcmd "int 250 48 crc / skip code int int int int int skip crc"
prop commerror paa33x::errorscript
obj BIN rd
prop readcmd "int 250 73 1 crc / skip code float int crc"
prop readfmt "%g"
prop read paa33x::read
kids "pressure" {
node temperature rd
prop readcmd "int 250 73 4 crc / skip code float int crc"
prop readfmt "%g"
prop read paa33x::read
}
}
proc paa33x::read {} {
sct trycnt 0
return [stdSct::read]
}
proc paa33x::errorscript {} {
set trycnt [silent 0 sct trycnt]
incr trycnt
sct trycnt $trycnt
if {$trycnt > 10} {
stdSct::errorScript
}
sct send [sct send]
return [sct state]
}