Changeset 13137 for trunk


Ignore:
Timestamp:
03/18/12 22:59:13 (13 years ago)
Author:
tbretz
Message:
Ensure that the calibration starts now that the biasctrl doesn't sent a voltage set request (which would return the currents) anymore when the voltage is already set.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/feedback.cc

    r13116 r13137  
    105105     int64_t fCursorCur;
    106106    uint64_t fCursorAmpl;
     107    uint64_t fCursorTemp;
    107108
    108109    Time fBiasLast;
     
    204205            return;
    205206
     207        // Trigger calibration
     208        if (GetCurrentState()==kStateCalibrating && fCursorTemp==1)
     209        {
     210            DimClient::sendCommandNB("BIAS_CONTROL/REQUEST_STATUS", NULL, 0);
     211            return;
     212        }
     213
    206214        ostringstream msg;
    207215        msg << setprecision(4) << "Sending new absolute offset (" << diff << "V+" << avg << "V) to biasctrl.";
     
    210218        DimClient::sendCommandNB((char*)"BIAS_CONTROL/SET_GAPD_REFERENCE_OFFSET",
    211219                                 (void*)&diff, sizeof(float));
     220
     221        fCursorTemp++;
    212222    }
    213223
     
    753763        fCursorAmpl = 0;
    754764        fCursorCur  = 0;
     765        fCursorTemp = 0;
    755766
    756767        fStartTime = Time();
     
    912923        fControlType = kTemp;
    913924        fCursorCur = -10;
     925        fCursorTemp = 0;
    914926        fCurrentsAvg.assign(416, 0);
    915927        fCurrentsRms.assign(416, 0);
Note: See TracChangeset for help on using the changeset viewer.