Ignore:
Timestamp:
04/08/16 15:40:57 (8 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

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

    r10 r15  
    2626using namespace flair::gui;
    2727
    28 namespace flair { namespace filter {
     28namespace flair {
     29namespace filter {
    2930
    30 TrajectoryGenerator1D::TrajectoryGenerator1D(const LayoutPosition* position,string name,string unit) : IODevice(position->getLayout(),name) {
    31     pimpl_=new TrajectoryGenerator1D_impl(this,position,name,unit);
    32     AddDataToLog(pimpl_->output);
     31TrajectoryGenerator1D::TrajectoryGenerator1D(const LayoutPosition *position,
     32                                             string name, string unit)
     33    : IODevice(position->getLayout(), name) {
     34  pimpl_ = new TrajectoryGenerator1D_impl(this, position, name, unit);
     35  AddDataToLog(pimpl_->output);
    3336}
    3437
    35 TrajectoryGenerator1D::~TrajectoryGenerator1D() {
    36     delete pimpl_;
     38TrajectoryGenerator1D::~TrajectoryGenerator1D() { delete pimpl_; }
     39
     40cvmatrix *TrajectoryGenerator1D::Matrix(void) const { return pimpl_->output; }
     41
     42void TrajectoryGenerator1D::StartTraj(float start_pos, float end_pos) {
     43  pimpl_->StartTraj(start_pos, end_pos);
    3744}
    3845
    39 cvmatrix *TrajectoryGenerator1D::Matrix(void) const {
    40     return pimpl_->output;
    41 }
    42 
    43 void TrajectoryGenerator1D::StartTraj(float start_pos,float end_pos) {
    44     pimpl_->StartTraj(start_pos,end_pos);
    45 }
    46 
    47 //revoir l'interet du stop?
    48 void TrajectoryGenerator1D::StopTraj(void) {
    49     pimpl_->StopTraj();
    50 }
     46// revoir l'interet du stop?
     47void TrajectoryGenerator1D::StopTraj(void) { pimpl_->StopTraj(); }
    5148
    5249bool TrajectoryGenerator1D::IsRunning(void) const {
    53     if(pimpl_->is_started==true) {
    54         if(pimpl_->is_finished==true) {
    55             return false;
    56         } else {
    57             return true;
    58         }
     50  if (pimpl_->is_started == true) {
     51    if (pimpl_->is_finished == true) {
     52      return false;
    5953    } else {
    60         return false;
     54      return true;
    6155    }
     56  } else {
     57    return false;
     58  }
    6259}
    6360
    6461float TrajectoryGenerator1D::Position(void) const {
    65     return pimpl_->output->Value(0,0);
     62  return pimpl_->output->Value(0, 0);
    6663}
    6764
    6865void TrajectoryGenerator1D::Reset(void) {
    69     if(IsRunning()==false) {
    70         pimpl_->Reset();
    71     } else {
    72         Err("impossible while running\n");
    73     }
     66  if (IsRunning() == false) {
     67    pimpl_->Reset();
     68  } else {
     69    Err("impossible while running\n");
     70  }
    7471}
    7572
    7673void TrajectoryGenerator1D::SetPositionOffset(float value) {
    77     pimpl_->pos_off=value;
     74  pimpl_->pos_off = value;
    7875}
    7976
    8077float TrajectoryGenerator1D::Speed(void) const {
    81     return pimpl_->output->Value(1,0);
     78  return pimpl_->output->Value(1, 0);
    8279}
    8380
    8481void TrajectoryGenerator1D::SetSpeedOffset(float value) {
    85     pimpl_->vel_off=value;
     82  pimpl_->vel_off = value;
    8683}
    8784
    8885void TrajectoryGenerator1D::Update(Time time) {
    89     pimpl_->Update(time);
    90     ProcessUpdate(pimpl_->output);
     86  pimpl_->Update(time);
     87  ProcessUpdate(pimpl_->output);
    9188}
    9289
Note: See TracChangeset for help on using the changeset viewer.