- Timestamp:
- 04/01/17 22:00:42 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/biasctrl.cc
r18463 r18798 1494 1494 } 1495 1495 1496 bool HasOvercurrent() const 1497 { 1498 for (int ch=0; ch<kNumChannels; ch++) 1499 if (fPresent[ch/kNumChannelsPerBoard] && fCurrent[ch]<0) 1500 return true; 1501 1502 return false; 1503 } 1504 1505 bool IsVoltageOff() const 1506 { 1507 for (int ch=0; ch<kNumChannels; ch++) 1508 if (fPresent[ch/kNumChannelsPerBoard] && fDacActual[ch]!=0) 1509 return false; 1510 1511 return true; 1512 } 1513 1496 1514 State::states_t GetStatus() 1497 1515 { … … 1508 1526 return State::kRamping; 1509 1527 1510 for (int ch=0; ch<kNumChannels; ch++) 1511 if (fPresent[ch/kNumChannelsPerBoard] && fCurrent[ch]<0) 1512 return State::kOverCurrent; 1513 1514 bool isoff = true; 1515 for (int ch=0; ch<kNumChannels; ch++) 1516 if (fPresent[ch/kNumChannelsPerBoard] && fDacActual[ch]!=0) 1517 isoff = false; 1518 if (isoff) 1528 if (HasOvercurrent()) 1529 return State::kOverCurrent; 1530 1531 if (IsVoltageOff()) 1519 1532 return State::kVoltageOff; 1520 1533 … … 1943 1956 { 1944 1957 // This needs to be repeated for the case that in between a different command was processed 1945 fBias.RampAllDacs(0); 1958 if (!fBias.IsVoltageOff()) 1959 fBias.RampAllDacs(0); 1960 1946 1961 return State::kLocked; 1947 1962 }
Note:
See TracChangeset
for help on using the changeset viewer.