Changeset 38 in flair-src for trunk/demos/CircleFollower/uav/src
- Timestamp:
- Jun 23, 2016, 10:15:30 AM (9 years ago)
- Location:
- trunk/demos/CircleFollower/uav/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
r23 r38 13 13 14 14 #include "CircleFollower.h" 15 #include <TargetController.h> 15 16 #include <Uav.h> 16 17 #include <GridLayout.h> … … 33 34 using namespace flair::core; 34 35 using namespace flair::gui; 36 using namespace flair::sensor; 35 37 using namespace flair::filter; 36 38 using namespace flair::meta; 37 39 38 CircleFollower::CircleFollower(Uav* uav ): UavStateMachine(uav), behaviourMode(BehaviourMode_t::Default), vrpnLost(false) {40 CircleFollower::CircleFollower(Uav* uav,TargetController *controller): UavStateMachine(uav,controller), behaviourMode(BehaviourMode_t::Default), vrpnLost(false) { 39 41 uav->SetupVRPNAutoIP(uav->ObjectName()); 40 42 -
trunk/demos/CircleFollower/uav/src/CircleFollower.h
r23 r38 27 27 class MetaVrpnObject; 28 28 } 29 namespace sensor { 30 class TargetController; 31 } 29 32 } 30 33 31 34 class CircleFollower : public flair::meta::UavStateMachine { 32 35 public: 33 CircleFollower(flair::meta::Uav* uav );36 CircleFollower(flair::meta::Uav* uav,flair::sensor::TargetController *controller); 34 37 ~CircleFollower(); 35 38 -
trunk/demos/CircleFollower/uav/src/main.cpp
r23 r38 17 17 #include <stdio.h> 18 18 #include <tclap/CmdLine.h> 19 #include <TargetEthController.h> 19 20 20 21 using namespace TCLAP; … … 22 23 using namespace flair::core; 23 24 using namespace flair::meta; 25 using namespace flair::sensor; 24 26 25 27 string uav_type; 26 28 string log_path; 27 29 int port; 30 int ds3port; 28 31 string xml_file; 29 32 string name; … … 43 46 44 47 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); 46 50 47 51 demo->Start(); … … 74 78 cmd.add( addressArg ); 75 79 80 ValueArg<int> ds3portArg("d","ds3_port","port pour ds3",false,20000,"int"); 81 cmd.add( ds3portArg ); 82 76 83 cmd.parse( argc, argv ); 77 84 … … 79 86 log_path = logsArg.getValue(); 80 87 port=portArg.getValue(); 88 ds3port=ds3portArg.getValue(); 81 89 xml_file = xmlArg.getValue(); 82 90 name=nameArg.getValue();
Note:
See TracChangeset
for help on using the changeset viewer.