cryotel: fix cool flag
This commit is contained in:
@ -26,10 +26,9 @@ proc stdConfig::cryotel {} {
|
||||
|
||||
node cool wr
|
||||
prop label Cool
|
||||
prop enum on,off
|
||||
prop writecmd "SET SSTOP=%i"
|
||||
prop readcmd "SET SSTOP{2}"
|
||||
prop readfmt "SET SSTOP ,%i"
|
||||
prop enum 1
|
||||
prop write cryotel::writecool
|
||||
prop read cryotel::readcool
|
||||
|
||||
node control wr
|
||||
default 1
|
||||
@ -219,3 +218,23 @@ proc cryotel::checkcontrol {} {
|
||||
hsetprop [sct] write stdSct::write
|
||||
}
|
||||
}
|
||||
|
||||
proc cryotel::writecool {} {
|
||||
set flag [expr ! [sct target]]
|
||||
sct send "SET SSTOP=$flag"
|
||||
sct update [sct target]
|
||||
return stdSct::complete
|
||||
}
|
||||
|
||||
proc cryotel::readcool {} {
|
||||
sct send "SET SSTOP{2}"
|
||||
return cryotelboa::updatecool
|
||||
}
|
||||
|
||||
proc cryotel::updatecool {} {
|
||||
lassign [split [sct result] ,] _ value
|
||||
sct update [expr $value == 0]
|
||||
return idle
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,10 +28,9 @@ proc stdConfig::cryotelboa {} {
|
||||
|
||||
node cool wr
|
||||
prop label Cool
|
||||
prop enum on,off
|
||||
prop writecmd "SET SSTOP=%i"
|
||||
prop readcmd "SET SSTOP{2}"
|
||||
prop readfmt "SET SSTOP ,%i"
|
||||
prop enum 1
|
||||
prop read cryotelboa::readcool
|
||||
prop write cryotelboa::writecool
|
||||
|
||||
node control wr
|
||||
default 1
|
||||
@ -193,3 +192,22 @@ proc cryotelboa::checkcontrol {} {
|
||||
sct write stdSct::write
|
||||
}
|
||||
}
|
||||
|
||||
proc cryotelboa::writecool {} {
|
||||
set flag [expr ! [sct target]]
|
||||
sct send "SET SSTOP=$flag"
|
||||
sct update [sct target]
|
||||
return stdSct::complete
|
||||
}
|
||||
|
||||
proc cryotelboa::readcool {} {
|
||||
sct send "SET SSTOP{2}"
|
||||
return cryotelboa::updatecool
|
||||
}
|
||||
|
||||
proc cryotelboa::updatecool {} {
|
||||
lassign [split [sct result] ,] _ value
|
||||
sct update [expr $value == 0]
|
||||
return idle
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user