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

maj joystick

File:
1 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    }
Note: See TracChangeset for help on using the changeset viewer.