Changeset 314 in flair-src for trunk/demos/CircleFollower


Ignore:
Timestamp:
Mar 21, 2019, 2:04:45 PM (6 years ago)
Author:
Sanahuja Guillaume
Message:

maj joystick

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

Legend:

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

    r311 r314  
    1919#include <DataPlot1D.h>
    2020#include <DataPlot2D.h>
    21 #include <MetaDualShock3.h>
    2221#include <FrameworkManager.h>
    2322#include <VrpnClient.h>
     
    230229void CircleFollower::ExtraCheckJoystick(void) {
    231230    //R1 and Circle
    232     if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {
     231    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {
    233232        StartCircle();
    234233    }
    235234
    236235    //R1 and Cross
    237     if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {
     236    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {
    238237        StopCircle();
    239238    }
    240239   
    241240    //R1 and Square
    242     if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
     241    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
    243242        VrpnPositionHold();
    244243    }
  • trunk/demos/CircleFollower/uav/src/main.cpp

    r291 r314  
    1818#include <tclap/CmdLine.h>
    1919#include <TargetEthController.h>
    20 //#include <VisionFilter.h>
    2120
    2221using namespace TCLAP;
Note: See TracChangeset for help on using the changeset viewer.