Skip to content

20191030

Dan Avner edited this page Nov 6, 2019 · 1 revision

Filter Start Up

  • Populate

Start up

  • Need to make sure everything is closed before editing the filter file
    • If not galil will lock up
  • Populate
    • Loaded filters
  • Populate done
    • Nothing changed
  • Read filters
    • Populated with past gall state filters
    • No buttons grayed when reading filters, could cause errors
    • Moving filter wheel
  • Initialize
    • Populated with current filters
    • Moves through filters again

Important Notes

  • #{} is string interpolation (substitution) like python {}.format
  • hash is a dictionary like collection of keys and values
  • stored in /usr/local/bin

Startup terminal output

  • cannot open gui statefile
    • strange because it has no issue reading the lines of the state
    • I think the code is wrong there
      • should have a not (!)
  • reads the state file
    • displays l + line of state file
    • displays read + GUI + state + line of state file

function readfwguistatefile

  • reads file from location
    • /home/primefocus/fwgui.state
      • selectedfilter:none
      • initialized:yes
      • filterlist:g-u-z-i-r-bokr
      • loaded?:no
      • loadedfilter:none
      • filtersread:yes
      • loadedfiler:jammed
    • puts information into array $fwguistatehash

class Filter

  • each line of the filter text is read into class Filter
  • the line is split and assigned to magnet code, shortname, and filter color
  • seems to create a hash of @filtercolor which is never used through the code
  • also looking inside the filter text file, there is never supplied a filter color entered

Galil

  • TCP Socket to localhost and server port
    • looks like serveraddress is not used function ogs (open galil socket)
  • Creates a class Galil with telescope, instrument, server address, and server port
Clone this wiki locally