Changeset 216 in flair-src for trunk


Ignore:
Timestamp:
Feb 15, 2018, 4:44:23 PM (7 years ago)
Author:
Sanahuja Guillaume
Message:

maj

Location:
trunk/lib
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/CMakeLists.txt

    r211 r216  
    2323        ${LIBXML2_INCLUDE_DIR}
    2424        ${CMAKE_SYSROOT}/usr/include/opencv1
     25    ${CMAKE_SYSROOT}/usr/include/opencv/
    2526        ${CMAKE_SYSROOT}/usr/include/udt
    2627        ${CMAKE_CURRENT_SOURCE_DIR}/src
  • trunk/lib/FlairCore/src/Unix_I2cPort.cpp

    r133 r216  
    4949  int err = ioctl(fd, I2C_SLAVE_FORCE, address);
    5050  if (err < 0) {
    51     Err("Failed to set slave address\n");
     51    Err("Failed to set slave address (0x%x)\n",address);
    5252  }
    5353
  • trunk/lib/FlairFilter/CMakeLists.txt

    r211 r216  
    2525        ${CMAKE_CURRENT_SOURCE_DIR}/src/
    2626        ${CMAKE_SYSROOT}/usr/include/opencv1
     27    ${CMAKE_SYSROOT}/usr/include/opencv
    2728        ${CMAKE_SYSROOT}/usr/include/iir
    2829)
  • trunk/lib/FlairFilter/src/ControlLaw.h

    r214 r216  
    8888  * \brief Reset the internal state of the control law
    8989  *
    90   * Doesn't do anything by default
     90  * Does nothing by default
    9191  *
    9292  */
  • trunk/lib/FlairFilter/src/PidThrust.cpp

    r214 r216  
    4343}
    4444
     45void PidThrust::Reset(void) {
     46  ResetI();
     47  SetDefaultOffset();
     48  SetValues(0,0);
     49}
     50
    4551void PidThrust::ResetI(void) { pimpl_->i = 0; }
    4652
    47 float PidThrust::GetOffset(void) { return pimpl_->offset_g; }
     53float PidThrust::GetOffset(void) const { return pimpl_->offset_g; }
     54
     55float PidThrust::GetIntegral(void) const { return pimpl_->i; }
    4856
    4957void PidThrust::UpdateFrom(const io_data *data) {
  • trunk/lib/FlairFilter/src/PidThrust.h

    r206 r216  
    5555
    5656  /*!
     57  * \brief Reset the control law
     58  * equivalent to:
     59  * ResetI();
     60  * SetDefaultOffset();
     61  * SetValues(0,0);
     62  *
     63  */
     64  void Reset(void);
     65 
     66  /*!
    5767  * \brief Reset integral to 0
    5868  *
     
    7888  * \return current offset
    7989  */
    80   float GetOffset(void);
     90  float GetOffset(void) const;
     91 
     92  /*!
     93  * \brief Get intergral part
     94  *
     95  * \return current integral part
     96  */
     97  float GetIntegral(void) const;
    8198
    8299  /*!
  • trunk/lib/FlairMeta/CMakeLists.txt

    r211 r216  
    2626        ${CMAKE_CURRENT_SOURCE_DIR}/src/
    2727        ${CMAKE_SYSROOT}/usr/include/opencv1
     28    ${CMAKE_SYSROOT}/usr/include/opencv
    2829)
    2930
  • trunk/lib/FlairMeta/src/UavStateMachine.cpp

    r214 r216  
    9090  uZ->AddDeviceToLog(uYaw);
    9191
    92     joy=new MetaDualShock3("uav high level controller",controller);
    93     uav->GetAhrs()->AddPlot(joy->GetReferenceOrientation(),DataPlot::Blue);
     92  joy=new MetaDualShock3("uav high level controller",controller);
     93  uav->GetAhrs()->AddPlot(joy->GetReferenceOrientation(),DataPlot::Blue);
    9494
    9595  altitudeMode = AltitudeMode_t::Manual;
     
    484484    joy->SetZRef(0);
    485485
    486     uZ->SetDefaultOffset(); // positionne l'offset de compensation de la gravité à sa
    487                      // valeur initiale (station sol)
     486    uZ->Reset();
     487    uRoll->Reset();
     488    uPitch->Reset();
     489    uYaw->Reset();
    488490
    489491    uav->GetUavMultiplex()->LockUserInterface();
     
    569571  uav->GetAhrs()->UnlockUserInterface();
    570572
    571   uZ->SetValues(0, 0);
    572573  uZ->Reset();
     574  uRoll->Reset();
     575  uPitch->Reset();
     576  uYaw->Reset();
    573577}
    574578
  • trunk/lib/FlairSensorActuator/CMakeLists.txt

    r211 r216  
    2525        ${CMAKE_CURRENT_SOURCE_DIR}/../FlairVisionFilter/src
    2626        ${CMAKE_SYSROOT}/usr/include/opencv1
     27    ${CMAKE_SYSROOT}/usr/include/opencv
    2728        ${CMAKE_SYSROOT}/usr/include/vrpn
    2829)
  • trunk/lib/FlairSensorActuator/src/NmeaGps.cpp

    r214 r216  
    174174
    175175void NmeaGps::parseFrame(const char *frame, int frame_size) {
    176 
     176  //avoid unrecognized nmea sentence (when no satelites
     177  if(strncmp(frame,"$GNGGA,,",8)==0) return;
     178  if(strncmp(frame,"$GNVTG,,",8)==0) return;
     179  if(strstr(frame,",,,,,")!=NULL) return;
     180 
    177181  int result;
    178182  result = nmea_parse(&parser, frame, frame_size, &info);
    179  
    180183  if (result != 1) {
    181184    Warn("unrecognized nmea sentence: %s\n",frame);
    182185    return;
    183186  }
    184 
     187 
    185188  result = nmea_parse_GPGGA(frame, frame_size, &pack);
    186189
  • trunk/lib/FlairSensorActuator/src/PressureSensor.cpp

    r215 r216  
    7979
    8080  plot_tab = new Tab(tab, "Mesures");
    81   plot = new DataPlot1D(plot_tab->NewRow(), ObjectName(), 0, 2);
     81  plot = new DataPlot1D(plot_tab->NewRow(), ObjectName(), 101000, 101500);
    8282  plot->AddCurve(output->Element(0));
    8383}
  • trunk/lib/FlairSensorActuator/src/PressureSensor.h

    r215 r216  
    109109  * \brief Value
    110110  *
    111   * \return output value
     111  * \return output value in pascal
    112112  */
    113113  float Value(void) const;
  • trunk/lib/FlairSimulator/CMakeLists.txt

    r211 r216  
    2626        ${CMAKE_SYSROOT}/usr/include/vrpn
    2727        ${CMAKE_SYSROOT}/usr/include/opencv1
     28    ${CMAKE_SYSROOT}/usr/include/opencv
    2829        ${CMAKE_SYSROOT}/usr/include/irrlicht
    2930)
  • trunk/lib/FlairVisionFilter/CMakeLists.txt

    r211 r216  
    2424        $ENV{FLAIR_ROOT}/flair-src/lib/FlairCore/src
    2525        ${CMAKE_SYSROOT}/usr/include/opencv1
     26    ${CMAKE_SYSROOT}/usr/include/opencv
    2627)
    2728
Note: See TracChangeset for help on using the changeset viewer.