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


Ignore:
Timestamp:
Jun 23, 2016, 10:15:30 AM (8 years ago)
Author:
Bayard Gildas
Message:

Modif. pour ajour manette émulée (EmulatedController)

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

Legend:

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

    r23 r38  
    1313
    1414#include "CircleFollower.h"
     15#include <TargetController.h>
    1516#include <Uav.h>
    1617#include <GridLayout.h>
     
    3334using namespace flair::core;
    3435using namespace flair::gui;
     36using namespace flair::sensor;
    3537using namespace flair::filter;
    3638using namespace flair::meta;
    3739
    38 CircleFollower::CircleFollower(Uav* uav): UavStateMachine(uav), behaviourMode(BehaviourMode_t::Default), vrpnLost(false) {
     40CircleFollower::CircleFollower(Uav* uav,TargetController *controller): UavStateMachine(uav,controller), behaviourMode(BehaviourMode_t::Default), vrpnLost(false) {
    3941    uav->SetupVRPNAutoIP(uav->ObjectName());
    4042
  • trunk/demos/CircleFollower/uav/src/CircleFollower.h

    r23 r38  
    2727        class MetaVrpnObject;
    2828    }
     29    namespace sensor {
     30        class TargetController;
     31    }
    2932}
    3033
    3134class CircleFollower : public flair::meta::UavStateMachine {
    3235    public:
    33         CircleFollower(flair::meta::Uav* uav);
     36        CircleFollower(flair::meta::Uav* uav,flair::sensor::TargetController *controller);
    3437        ~CircleFollower();
    3538
  • trunk/demos/CircleFollower/uav/src/main.cpp

    r23 r38  
    1717#include <stdio.h>
    1818#include <tclap/CmdLine.h>
     19#include <TargetEthController.h>
    1920
    2021using namespace TCLAP;
     
    2223using namespace flair::core;
    2324using namespace flair::meta;
     25using namespace flair::sensor;
    2426
    2527string uav_type;
    2628string log_path;
    2729int port;
     30int ds3port;
    2831string xml_file;
    2932string name;
     
    4346
    4447    Uav* drone=CreateUav(manager,name,uav_type);
    45     CircleFollower* demo=new CircleFollower(drone);
     48    TargetEthController *controller=new TargetEthController(manager,"Dualshock3",ds3port);
     49    CircleFollower* demo=new CircleFollower(drone,controller);
    4650
    4751    demo->Start();
     
    7478        cmd.add( addressArg );
    7579
     80        ValueArg<int> ds3portArg("d","ds3_port","port pour ds3",false,20000,"int");
     81        cmd.add( ds3portArg );
     82
    7683        cmd.parse( argc, argv );
    7784
     
    7986        log_path = logsArg.getValue();
    8087        port=portArg.getValue();
     88        ds3port=ds3portArg.getValue();
    8189        xml_file = xmlArg.getValue();
    8290        name=nameArg.getValue();
Note: See TracChangeset for help on using the changeset viewer.