Changeset 171 in flair-src for trunk/demos/CircleFollower/uav


Ignore:
Timestamp:
Apr 24, 2017, 3:26:56 PM (7 years ago)
Author:
Sanahuja Guillaume
Message:

add vrpn hold

Location:
trunk/demos/CircleFollower/uav/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/CircleFollower/uav/src/CircleFollower.cpp

    r168 r171  
    4949    startCircle=new PushButton(GetButtonsLayout()->NewRow(),"start_circle");
    5050    stopCircle=new PushButton(GetButtonsLayout()->LastRowLastCol(),"stop_circle");
     51    positionHold=new PushButton(GetButtonsLayout()->LastRowLastCol(),"position hold");
    5152
    5253    if(vrpnclient->UseXbee()==true) {
     
    216217        StopCircle();
    217218    }
     219    if(positionHold->Clicked() && (behaviourMode==BehaviourMode_t::Default)) {
     220        VrpnPositionHold();
     221    }
    218222}
    219223
     
    227231    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {
    228232        StopCircle();
     233    }
     234   
     235    //R1 and Square
     236    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
     237        VrpnPositionHold();
    229238    }
    230239}
  • trunk/demos/CircleFollower/uav/src/CircleFollower.h

    r167 r171  
    6464        float yawHold;
    6565
    66         flair::gui::PushButton *startCircle,*stopCircle;
     66        flair::gui::PushButton *startCircle,*stopCircle,*positionHold;
    6767        flair::meta::MetaVrpnObject *targetVrpn,*uavVrpn;
    6868        flair::filter::TrajectoryGenerator2DCircle *circle;
Note: See TracChangeset for help on using the changeset viewer.