Changeset 333 in flair-src for trunk/demos/SimpleFleet/simulator


Ignore:
Timestamp:
10/02/19 11:07:51 (5 years ago)
Author:
Sanahuja Guillaume
Message:

add x4 to simple fleet

Location:
trunk/demos/SimpleFleet/simulator
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x8.sh

    r302 r333  
    99. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
    1010
    11 $EXEC -n x8 -a 127.0.0.1 -p 9000 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
     11$EXEC -n x8 -a 127.0.0.1 -p 9000 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml -t x8
  • trunk/demos/SimpleFleet/simulator/src/main.cpp

    r291 r333  
    3535string name;
    3636string address;
     37string type;
    3738
    3839void parseOptions(int argc, char** argv)
     
    6263        ValueArg<string> addressArg("a","address","ground station address",true,"127.0.0.1","string");
    6364        cmd.add( addressArg );
     65       
     66        ValueArg<string> typeArg("t", "type", "uav type, x4 or x8", true, "x4", "string");
     67        cmd.add(typeArg);
    6468
    6569        cmd.parse( argc, argv );
     
    7175        opti_time = optiArg.getValue();
    7276        name=nameArg.getValue();
     77        type = typeArg.getValue();
    7378#ifdef GL
    7479        media_path=mediaArg.getValue();
     
    8489
    8590
    86 int main(int argc, char* argv[])
    87 {
     91int main(int argc, char* argv[]) {
    8892  Simulator *simu;
    8993
     
    98102  for(int i=0; i<2;i++) {
    99103    stringstream uavName;
     104    Model *drone;
    100105    uavName << name.c_str() << "_" << i;
    101     Model *drone=new X8(uavName.str(),i);
     106    if(type == "x4") {
     107      drone = new X4(uavName.str(),i);
     108    } else {
     109      drone = new X8(uavName.str(),i);
     110    }
     111   
    102112#ifdef GL
    103113    SimuUsGL *us_gl=new SimuUsGL(drone,"us",i,0);
Note: See TracChangeset for help on using the changeset viewer.