Changeset 13974 for trunk/FACT++/src
- Timestamp:
- 05/30/12 11:35:44 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/feedback.cc
r13922 r13974 79 79 80 80 double fBiasOffset; 81 double fTempOffset; 81 82 double fCalibrationOffset; 82 83 double fAppliedOffset; … … 115 116 avgt /= numt; // [deg C] 116 117 117 const double dUt = (avgt-25)*4./70; // [V] 118 fTempOffset = (avgt-25)*4./70; // [V] 119 120 return HandleCurrentControl(); 121 } 122 123 int HandleCurrentControl() 124 { 125 const double dUt = fTempOffset; // [V] 118 126 119 127 if (GetCurrentState()==Feedback::State::kCalibrating && fBiasOffset>dUt-1.2) 120 128 { 121 129 ostringstream msg; 122 msg << " (applied calibration offset " << fBiasOffset << "V exceeds temperature correction " << avgt << "V - 1.2V.";130 msg << " (applied calibration offset " << fBiasOffset << "V exceeds temperature correction " << fTempOffset << "V - 1.2V."; 123 131 Warn("Trying to calibrate above G-APD breakdown volatge!"); 124 132 Warn(msg); … … 711 719 AverageCurrents(evt); 712 720 721 if (fControlType==kCurrents && fTempOffset>-2 && fCursorTemp && fCursorCur%3==0) 722 HandleCurrentControl(); 723 713 724 return GetCurrentState(); 714 725 } … … 930 941 931 942 fBiasOffset = evt.GetFloat(); 943 fTempOffset = -3; 932 944 ResetData(0); 933 945 fControlType = kCurrents; … … 1135 1147 } 1136 1148 1137 return fOutputEnabled ? Feedback::State::kCurrentCtrlRunning : Feedback::State::kCurrentCtrlIdle;1149 return fOutputEnabled && fCursorTemp>0 ? Feedback::State::kCurrentCtrlRunning : Feedback::State::kCurrentCtrlIdle; 1138 1150 } 1139 1151 }
Note:
See TracChangeset
for help on using the changeset viewer.