Changeset 16449 for trunk/FACT++


Ignore:
Timestamp:
05/30/13 00:33:44 (11 years ago)
Author:
tbretz
Message:
Changed some SendCommand to SendCommandNB - no need to block; added some debugging log to know how much command were sent during calibration; replaced DimClient by Dim
File:
1 edited

Legend:

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

    r16445 r16449  
    147147
    148148        const uint32_t val[2] = { idx,  diff };
    149         DimClient::sendCommandNB("FTM_CONTROL/SET_THRESHOLD", (void*)val, 8);
     149        Dim::SendCommandNB("FTM_CONTROL/SET_THRESHOLD", val);
    150150
    151151        fBlock[idx/4] = true;
     
    348348
    349349        const uint32_t val[2] = { -1,  diff };
    350         DimClient::sendCommandNB("FTM_CONTROL/SET_THRESHOLD", (void*)val, 8);
     350        DimClient::SendCommandNB("FTM_CONTROL/SET_THRESHOLD", val);
    351351
    352352        fThresholdMin = diff;
     
    492492        fThresholds.assign(160, fThresholdMin);
    493493
     494        int counter = 1;
     495
    494496        const int32_t val[2] = { -1, fThresholdMin };
    495         Dim::SendCommand("FTM_CONTROL/SET_THRESHOLD", val);
     497        Dim::SendCommandNB("FTM_CONTROL/SET_THRESHOLD", val);
    496498
    497499        double avg2 = 0;
     
    506508
    507509                const int32_t dat[2] = { i, fThresholds[i] };
    508                 Dim::SendCommand("FTM_CONTROL/SET_THRESHOLD", dat);
     510                Dim::SendCommandNB("FTM_CONTROL/SET_THRESHOLD", dat);
    509511
    510512                fBlock[i/4] = true;
     513
     514                counter++;
    511515            }
    512516        }
     
    517521        fDimThreshold.setQuality(2);
    518522        fDimThreshold.Update(data);
     523
     524        Info("Sent a total of "+to_string(counter)+" commands for threshold setting");
    519525
    520526        ostringstream out;
     
    535541
    536542        const int32_t val[2] = { -1, fThresholdReference };
    537         Dim::SendCommand("FTM_CONTROL/SET_THRESHOLD", val);
     543        Dim::sendCommandNB("FTM_CONTROL/SET_THRESHOLD", val);
    538544
    539545        fThresholds.assign(160, fThresholdReference);
Note: See TracChangeset for help on using the changeset viewer.