diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-06-11 16:57:18 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-06-11 16:57:18 (GMT) |
commit | 6489dc12e00c3704176619f7e6a43369ae50b2ec (patch) | |
tree | 275f5a867166ed5fb012f8af4956ae7214bbc468 /ds9/library/rgb.tcl | |
parent | d233cb16ebbd17b7b0279a369554531709e1e9e5 (diff) | |
download | blt-6489dc12e00c3704176619f7e6a43369ae50b2ec.zip blt-6489dc12e00c3704176619f7e6a43369ae50b2ec.tar.gz blt-6489dc12e00c3704176619f7e6a43369ae50b2ec.tar.bz2 |
add ds9 rgb send parser
Diffstat (limited to 'ds9/library/rgb.tcl')
-rw-r--r-- | ds9/library/rgb.tcl | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/ds9/library/rgb.tcl b/ds9/library/rgb.tcl index 246eccc..98e3d03 100644 --- a/ds9/library/rgb.tcl +++ b/ds9/library/rgb.tcl @@ -271,35 +271,12 @@ proc ProcessRGBCmd {varname iname} { } proc ProcessSendRGBCmd {proc id param {sock {}} {fn {}}} { - global current - global rgb + global parse + set parse(proc) $proc + set parse(id) $id - switch -- [lindex $param 0] { - channel {$proc $id "$current(rgb)\n"} - lock { - switch -- [string tolower [lindex $param 1]] { - wcs {$proc $id [ToYesNo $rgb(lock,wcs)]} - crop {$proc $id [ToYesNo $rgb(lock,crop)]} - slice {$proc $id [ToYesNo $rgb(lock,slice)]} - bin {$proc $id [ToYesNo $rgb(lock,bin)]} - axes - - order {$proc $id [ToYesNo $rgb(lock,axes)]} - scale {$proc $id [ToYesNo $rgb(lock,scale)]} - limits - - scalelimits {$proc $id [ToYesNo $rgb(lock,scalelimits)]} - colorbar {$proc $id [ToYesNo $rgb(lock,colorbar)]} - block {$proc $id [ToYesNo $rgb(lock,block)]} - smooth {$proc $id [ToYesNo $rgb(lock,smooth)]} - } - } - system {$proc $id "$rgb(system)\n"} - view { - switch -- [lindex $param 1] { - red {$proc $id [ToYesNo $rgb(red)]} - green {$proc $id [ToYesNo $rgb(green)]} - blue {$proc $id [ToYesNo $rgb(blue)]} - } - } - } + rgbsend::YY_FLUSH_BUFFER + rgbsend::yy_scan_string $param + rgbsend::yyparse } |