Changeset 15 in flair-src for trunk/lib/FlairFilter/src/JoyReference.cpp


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (5 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

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

    r10 r15  
    2929using namespace flair::gui;
    3030
    31 namespace flair { namespace filter {
     31namespace flair {
     32namespace filter {
    3233
    33 JoyReference::JoyReference(const LayoutPosition* position,string name) : IODevice(position->getLayout(),name) {
    34     pimpl_=new JoyReference_impl(this,position,name);
    35     AddDataToLog(pimpl_->output);
    36     AddDataToLog(pimpl_->ahrsData);
     34JoyReference::JoyReference(const LayoutPosition *position, string name)
     35    : IODevice(position->getLayout(), name) {
     36  pimpl_ = new JoyReference_impl(this, position, name);
     37  AddDataToLog(pimpl_->output);
     38  AddDataToLog(pimpl_->ahrsData);
    3739}
    3840
    39 JoyReference::~JoyReference(void) {
    40     delete pimpl_;
     41JoyReference::~JoyReference(void) { delete pimpl_; }
     42
     43AhrsData *JoyReference::GetReferenceOrientation(void) const {
     44  return pimpl_->ahrsData;
    4145}
    4246
    43 AhrsData* JoyReference::GetReferenceOrientation(void) const{
    44     return pimpl_->ahrsData;
     47void JoyReference::SetRollAxis(float value) { pimpl_->SetRollAxis(value); }
     48
     49void JoyReference::SetPitchAxis(float value) { pimpl_->SetPitchAxis(value); }
     50
     51void JoyReference::SetYawAxis(float value) { pimpl_->SetYawAxis(value); }
     52
     53void JoyReference::SetAltitudeAxis(float value) {
     54  pimpl_->SetAltitudeAxis(value);
    4555}
    4656
    47 void JoyReference::SetRollAxis(float value) {
    48     pimpl_->SetRollAxis(value);
    49 }
     57void JoyReference::RollTrimUp(void) { pimpl_->RollTrimUp(); }
    5058
    51 void JoyReference::SetPitchAxis(float value) {
    52     pimpl_->SetPitchAxis(value);
    53 }
     59void JoyReference::RollTrimDown(void) { pimpl_->RollTrimDown(); }
    5460
    55 void JoyReference::SetYawAxis(float value) {
    56     pimpl_->SetYawAxis(value);
    57 }
     61void JoyReference::PitchTrimUp(void) { pimpl_->PitchTrimUp(); }
    5862
    59 void JoyReference::SetAltitudeAxis(float value) {
    60     pimpl_->SetAltitudeAxis(value);
    61 }
     63void JoyReference::PitchTrimDown(void) { pimpl_->PitchTrimDown(); }
    6264
    63 void JoyReference::RollTrimUp(void) {
    64     pimpl_->RollTrimUp();
    65 }
    66 
    67 void JoyReference::RollTrimDown(void) {
    68     pimpl_->RollTrimDown();
    69 }
    70 
    71 void JoyReference::PitchTrimUp(void) {
    72     pimpl_->PitchTrimUp();
    73 }
    74 
    75 void JoyReference::PitchTrimDown(void) {
    76     pimpl_->PitchTrimDown();
    77 }
    78 
    79 void JoyReference::SetYawRef(float value) {
    80     pimpl_->SetYawRef(value);
    81 }
     65void JoyReference::SetYawRef(float value) { pimpl_->SetYawRef(value); }
    8266
    8367void JoyReference::SetYawRef(core::Quaternion const &value) {
    84     Euler euler;
    85     value.ToEuler(euler);
    86     pimpl_->SetYawRef(euler.yaw);
     68  Euler euler;
     69  value.ToEuler(euler);
     70  pimpl_->SetYawRef(euler.yaw);
    8771}
    88 void JoyReference::SetZRef(float value) {
    89     pimpl_->SetZRef(value);
    90 }
     72void JoyReference::SetZRef(float value) { pimpl_->SetZRef(value); }
    9173
    92 float JoyReference::ZRef(void) const {
    93     return pimpl_->ZRef();
    94 }
     74float JoyReference::ZRef(void) const { return pimpl_->ZRef(); }
    9575
    96 float JoyReference::DzRef(void) const {
    97     return pimpl_->dZRef();
    98 }
     76float JoyReference::DzRef(void) const { return pimpl_->dZRef(); }
    9977
    100 float JoyReference::RollTrim(void) const {
    101     return pimpl_->RollTrim();
    102 }
     78float JoyReference::RollTrim(void) const { return pimpl_->RollTrim(); }
    10379
    104 float JoyReference::PitchTrim(void) const {
    105     return pimpl_->PitchTrim();
    106 }
     80float JoyReference::PitchTrim(void) const { return pimpl_->PitchTrim(); }
    10781
    10882void JoyReference::Update(Time time) {
    109     pimpl_->Update(time);
    110     ProcessUpdate(pimpl_->output);
     83  pimpl_->Update(time);
     84  ProcessUpdate(pimpl_->output);
    11185}
    11286
    11387void JoyReference::UpdateFrom(const io_data *data) {
    114     pimpl_->UpdateFrom(data);
    115     ProcessUpdate(pimpl_->output);
     88  pimpl_->UpdateFrom(data);
     89  ProcessUpdate(pimpl_->output);
    11690}
    11791
    11892} // end namespace sensor
    11993} // end namespace flair
    120 
Note: See TracChangeset for help on using the changeset viewer.