- Timestamp:
- 04/22/10 15:32:57 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/vchvtest/vchvtest.cc
r200 r201 37 37 void cmd_help(); void cmd_repeat(); 38 38 void cmd_config(); void cmd_rate(); 39 void cmd_test(); 39 40 40 41 int ParseInput(char*, const char *Param[]); … … 63 64 {"rate", &cmd_rate, 1, "<n>", "Make n 'rd 0 0' cycles and measure time", false}, 64 65 {"repeat", &cmd_repeat, 1, "<on|off>", "Command repetition (ENTER to stop)", false}, 66 {"test", &cmd_test, 1, "<Voltage>", "Set all channels consecutively", false}, 65 67 {"exit", &cmd_exit, 0, "", "Exit program", false}, 66 68 {"help", &cmd_help, 0, "", "Print help", false}}; … … 221 223 } 222 224 225 // Switch on all channels consecutively for cabling test 226 void cmd_test() { 227 228 for (int i=FirstCrate; i<=LastCrate; i++) { 229 printf("Testing board %d (Enter to continue, any key plus enter to stop)\n", fHVBoard[i]->BoardNumber); 230 if (fHVBoard[i]->GlobalSet(0) != 1) { 231 printf("Error: Could not global set board to zero\n"); 232 return; 233 } 234 235 for (int k=0; k<MAX_NUM_BOARDS; k++) for (int j=0; j<NUM_CHANNELS; j++) { 236 printf("\rBoard %d, channel %d", k, j); 237 fflush(stdout); 238 Verbose = false; 239 if (fHVBoard[i]->ChannelSet(k, j, atoi(Param[1])) != 1) { 240 printf("Error setting voltage\n"); 241 return; 242 } 243 Verbose = true; 244 if (getchar() != '\n') return; 245 } 246 } 247 } 248 223 249 // Send bytes and wait for response 224 250 void cmd_send() {
Note:
See TracChangeset
for help on using the changeset viewer.