Changeset 421 in flair-src for trunk/lib/FlairFilter


Ignore:
Timestamp:
04/22/21 11:57:57 (3 years ago)
Author:
Sanahuja Guillaume
Message:

add a permanent trim, usefull when uav is not well balanced (ie intel aero)

Location:
trunk/lib/FlairFilter/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairFilter/src/X4X8Multiplex_impl.cpp

    r318 r421  
    2424#include <ComboBox.h>
    2525#include <DataPlot1D.h>
     26#include <DoubleSpinBox.h>
    2627#include <math.h>
    2728
     
    4950  pas->AddItem("counter clockwise");
    5051  pas->AddItem("clockwise");
     52 
     53  permanent_trim_roll=new DoubleSpinBox(self->GetLayout()->NewRow(), "permanent trim roll",-1, 1, 0.01);
     54  permanent_trim_pitch=new DoubleSpinBox(self->GetLayout()->NewRow(), "permanent trim pitch",-1, 1, 0.01);
    5155
    5256  MatrixDescriptor *desc = new MatrixDescriptor(nb_mot, 1);
     
    97101  u_yaw = input->ValueNoMutex(2, 0);
    98102  u_thrust = input->ValueNoMutex(3, 0);
    99   trim_roll = input->ValueNoMutex(4, 0);
    100   trim_pitch = input->ValueNoMutex(5, 0);
     103  trim_roll = input->ValueNoMutex(4, 0)+permanent_trim_roll->Value();
     104  trim_pitch = input->ValueNoMutex(5, 0)+permanent_trim_pitch->Value();
    101105  trim_yaw = input->ValueNoMutex(6, 0);
    102106
  • trunk/lib/FlairFilter/src/unexported/X4X8Multiplex_impl.h

    r214 r421  
    2424class DataPlot1D;
    2525class ComboBox;
     26class DoubleSpinBox;
    2627}
    2728namespace filter {
     
    4748  flair::gui::ComboBox *pas;
    4849  flair::gui::DataPlot1D *plots[4];
     50  flair::gui::DoubleSpinBox *permanent_trim_roll,*permanent_trim_pitch;
    4951  flair::filter::X4X8Multiplex *self;
    5052  float Set(float trim, float u);
Note: See TracChangeset for help on using the changeset viewer.