Changeset 14033 for trunk/FACT++
- Timestamp:
- 06/02/12 12:50:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/feedback.cc
r14021 r14033 118 118 fTempOffset = (avgt-25)*4./70; // [V] 119 119 120 fCursorTemp++; 121 120 122 return HandleCurrentControl(); 121 123 } … … 127 129 if (GetCurrentState()==Feedback::State::kCalibrating && fBiasOffset>dUt-1.2) 128 130 { 131 fCursorTemp = 0; 132 129 133 ostringstream msg; 130 134 msg << " (applied calibration offset " << fBiasOffset << "V exceeds temperature correction " << fTempOffset << "V - 1.2V."; … … 262 266 fDimDeviation.Update(vec); 263 267 264 if (!fOutputEnabled || fDimBias.state()!=BIAS::State::kVoltageOn)268 if (!fOutputEnabled) || fDimBias.state()!=BIAS::State::kVoltageOn) 265 269 return GetCurrentState(); 266 270 267 271 // Trigger calibration 268 if (GetCurrentState()==Feedback::State::kCalibrating && fCursorTemp== 1)272 if (GetCurrentState()==Feedback::State::kCalibrating && fCursorTemp==2) 269 273 { 270 274 DimClient::sendCommandNB("BIAS_CONTROL/REQUEST_STATUS", NULL, 0); … … 297 301 DimClient::sendCommandNB("BIAS_CONTROL/SET_ALL_CHANNELS_OFFSET", 298 302 vec.data()+BIAS::kNumChannels, BIAS::kNumChannels*sizeof(float)); 299 300 fCursorTemp++;301 303 302 304 return GetCurrentState(); … … 719 721 AverageCurrents(evt); 720 722 721 if (curr==&fBiasA && fControlType==kCurrents && fTempOffset>-2) 723 if (curr==&fBiasA && fControlType==kCurrents && 724 fCursorTemp>0 && fCursorCur>0) 722 725 { 723 726 // fCursorTemp: 1 2 3 4 5 6 7 8 724 727 // fCursor%x: 1 1 1 2 2 2 3 3 // 9 steps in ~15s 725 if (fCursorTemp< 9 && fCursorCur%((fCursorTemp+2)/3)==0)728 if (fCursorTemp<3 && fCursorCur%(fCursorTemp/3+1)==0) 726 729 HandleCurrentControl(); 727 730 } … … 850 853 851 854 fOutputEnabled = evt.GetBool(); 855 856 if (fControlType==kCurrents) 857 if (fCursorTemp>1) 858 fCursorTemp = 1; 852 859 853 860 return GetCurrentState();
Note:
See TracChangeset
for help on using the changeset viewer.