Changeset 307 in flair-src for trunk/lib/FlairSensorActuator


Ignore:
Timestamp:
Mar 8, 2019, 10:30:25 AM (3 years ago)
Author:
Sanahuja Guillaume
Message:

resove bug in times

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/V4LCamera.cpp

    r169 r307  
    104104    // fps counter
    105105    fpsCounter++;
    106     if (fpsCounter == 100) {
     106    if (GetTime() > (fpsPrev + 5 * (Time)1000000000)) {
     107      // toute les 5 secondes
    107108      fpsNow = GetTime();
    108109      fps->SetText("fps: %.1f",
    109        fpsCounter / ((float)(fpsNow - fpsPrev) / 1000000000.));
     110      fpsCounter / ((float)(fpsNow - fpsPrev) / 1000000000.));
    110111      fpsCounter = 0;
    111112      fpsPrev = fpsNow;
    112     }
    113 
     113    } 
     114   
    114115    // cam properties
    115116    if (gain->ValueChanged() == true && autogain->Value() == false)
Note: See TracChangeset for help on using the changeset viewer.