Changeset 11087 for fact/FADctrl


Ignore:
Timestamp:
06/21/11 10:34:14 (13 years ago)
Author:
ogrimm
Message:
Command 'boards' accepts 'none' as argument
Location:
fact/FADctrl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FAD.cc

    r11077 r11087  
    2020                          const char *Help;
    2121  } CommandList[] =
    22   {{"board", &FAD::cmd_board, false, 1, "[+|-]<range>" ,"Activate or deactivate board(s)"},
     22  {{"board", &FAD::cmd_board, true, 1, "<[+|-]range|none>" ,"Activate or deactivate board(s)"},
    2323   {"status", &FAD::cmd_status, false, 0, "[range]", "Show board status information"},
    2424   {"domino", &FAD::cmd_domino, true, 1, "<on|off>", "Switch Domino wave"},
     
    700700  if (Mode != 0) Parameter[1][0] = ' ';
    701701
     702  // Disable all boards
     703  if (Match(Parameter[1], "none")) {
     704        for (int i=0; i<(int) Boards.size(); i++) Boards[i]->Active = false;
     705        return;
     706  }
     707
    702708  // Evaluate given range
    703709  if (!ConvertToRange(Parameter[1], R)) {
     
    10861092          // Close data file and terminate run
    10871093          if(close(Datafile) == -1) Message(ERROR, "Could not close data file (%s)", strerror(errno));
    1088           else PrintMessage("Data file closed (size %.1f MByte).\n", FileSizeMB);
     1094          else PrintMessage("Data file closed (size %.1f MByte, %d events).\n", FileSizeMB, NumEvents);
    10891095
    10901096          Datafile = -1;
  • fact/FADctrl/FADBoard.cc

    r10980 r11087  
    408408  }
    409409
    410   memset(&PrevStatus, 0, sizeof(PrevStatus));
     410  // Use not zero so that comparing Status and PrevStatus at first test will likely show differences
     411  memset(&PrevStatus, 0xee, sizeof(PrevStatus));
    411412
    412413  // Leave loop if program termination requested or board communication not OK
  • fact/FADctrl/History.txt

    r10980 r11087  
    32323/6/2011        Raw data files will only contain boards active at the start of the run.
    33337/6/2011        DIM event service only contains active boards
     3421/6/2011       Command 'boards' takes 'none as argument
Note: See TracChangeset for help on using the changeset viewer.