Changeset 271 in flair-src


Ignore:
Timestamp:
Nov 8, 2018, 5:26:24 PM (6 years ago)
Author:
Sanahuja Guillaume
Message:

warn for all nan/inf torques/thrust

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairMeta/src/UavStateMachine.cpp

    r216 r271  
    180180
    181181    //check nan/inf problems
    182     if(!IsValuePossible(currentTorques.roll,"roll torque")
    183        || !IsValuePossible(currentTorques.pitch,"pitch torque")
    184        || !IsValuePossible(currentTorques.yaw,"yaw torque")
    185        || !IsValuePossible(currentThrust,"thrust")) {
     182    bool isValuePossible=true;
     183    //test it separately to warn for all problems
     184    if(!IsValuePossible(currentTorques.roll,"roll torque")) isValuePossible=false;
     185    if(!IsValuePossible(currentTorques.pitch,"pitch torque")) isValuePossible=false;
     186    if(!IsValuePossible(currentTorques.yaw,"yaw torque")) isValuePossible=false;
     187    if(!IsValuePossible(currentThrust,"thrust")) isValuePossible=false;
     188    if(!isValuePossible) {
    186189
    187190        if(altitudeState==AltitudeState_t::Stopped) {
  • trunk/lib/FlairSensorActuator/src/SimuCamera.cpp

    r268 r271  
    8888    } else {
    8989      output->ReleaseMutex();
    90       Thread::Warn("Read Timeout\n");
     90      //Thread::Warn("Read Timeout\n");
    9191    }
    9292  }
Note: See TracChangeset for help on using the changeset viewer.