diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-06-08 19:19:26 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-06-08 19:19:26 (GMT) |
commit | 82c78868be2567fc0399379497288892fc6d0506 (patch) | |
tree | 8afa577ad71dd2c2b8ca6fbc526728142e83ce31 /ds9/library/frame.tcl | |
parent | 7f05adf25227fd956f5fb194fcfc4e82cf82135d (diff) | |
download | blt-82c78868be2567fc0399379497288892fc6d0506.zip blt-82c78868be2567fc0399379497288892fc6d0506.tar.gz blt-82c78868be2567fc0399379497288892fc6d0506.tar.bz2 |
add ds9 blink send parser
Diffstat (limited to 'ds9/library/frame.tcl')
-rw-r--r-- | ds9/library/frame.tcl | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/ds9/library/frame.tcl b/ds9/library/frame.tcl index b1fc945..efd630b 100644 --- a/ds9/library/frame.tcl +++ b/ds9/library/frame.tcl @@ -2200,19 +2200,31 @@ proc ProcessBlinkCmd {varname iname} { } proc ProcessSendBlinkCmd {proc id param {sock {}} {fn {}}} { + global parse + set parse(proc) $proc + set parse(id) $id + + blinksend::YY_FLUSH_BUFFER + blinksend::yy_scan_string $param + blinksend::yyparse +} + +proc BlinkSendCmd {} { + global parse global current + + if {$current(display)=="blink"} { + $parse(proc) $parse(id) "yes\n" + } else { + $parse(proc) $parse(id) "no\n" + } +} + +proc BlinkSendCmdInterval {} { + global parse global blink - switch -- [lindex $param 0] { - interval {$proc $id "[expr $blink(interval)/1000.]\n"} - default { - if {$current(display) == {blink}} { - $proc $id [ToYesNo 1] - } else { - $proc $id [ToYesNo 0] - } - } - } + $parse(proc) $parse(id) "[expr $blink(interval)/1000.]\n" } proc ProcessLockCmd {varname iname} { |