Move USR_36GP under the new USR scheme.

Fixes #51.

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3239 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 288af435a8d34bc957311352f191cb03593d4fbb
Former-commit-id: bfcc91e5547739af02b81a3df79b90d5f978be41
This commit is contained in:
kmetykog 2011-01-05 00:07:03 +00:00
parent b11abfdceb
commit 2b0f938f40
214 changed files with 62 additions and 10213 deletions

View file

@ -5,10 +5,6 @@ ADD_SUBDIRECTORY(human)
ADD_SUBDIRECTORY(networkhuman) ADD_SUBDIRECTORY(networkhuman)
ADD_SUBDIRECTORY(kilo2008) ADD_SUBDIRECTORY(kilo2008)
ADD_SUBDIRECTORY(simplix) ADD_SUBDIRECTORY(simplix)
#ADD_SUBDIRECTORY(usr_36GP)
#ADD_SUBDIRECTORY(usr_ls1)
#ADD_SUBDIRECTORY(usr_sc)
#ADD_SUBDIRECTORY(usr_trb1)
ADD_SUBDIRECTORY(usr) ADD_SUBDIRECTORY(usr)
# Work-in-progress / unofficial robots. # Work-in-progress / unofficial robots.

View file

@ -7,6 +7,7 @@ SET(ROBOT_INTERFACE LEGACY WELCOME
usr_trb1 usr_trb1
usr_sc usr_sc
usr_ls1 usr_ls1
usr_36GP
) )
SET(ROBOT_SOURCES SET(ROBOT_SOURCES
@ -30,7 +31,7 @@ SET(ROBOT_SOURCES
src/xmldefs.h) src/xmldefs.h)
# Official-only USR instances. # Official-only USR instances.
SET(ROBOT_CLONES usr_trb1 usr_sc usr_ls1) SET(ROBOT_CLONES usr_trb1 usr_sc usr_ls1 usr_36GP)
ROBOT_MODULE(NAME ${ROBOT_NAME} ROBOT_MODULE(NAME ${ROBOT_NAME}
INTERFACE ${ROBOT_INTERFACE} INTERFACE ${ROBOT_INTERFACE}
@ -85,3 +86,16 @@ ROBOT_DATA(NAME usr_ls1 PREFIX usr_ls1
FILES usr_ls1.xml default.xml logo.rgb readme.txt FILES usr_ls1.xml default.xml logo.rgb readme.txt
SUBDIRS ${ROBOT_SUBDIRS} PATTERNS *.xml logo.rgb *.png) SUBDIRS ${ROBOT_SUBDIRS} PATTERNS *.xml logo.rgb *.png)
###################
# USR_36GP
###################
SET(ROBOT_SUBDIRS 1 2 3 4 5 6 7 8 9 10 11 12
36gp-ettore-t59 36gp-milano-12c36 36gp-milano-tipop3
36gp-motorunion-typec 36gp-tridenti-6c34
36gp-tridenti-v8ri
tracks)
ROBOT_DATA(NAME usr_36GP PREFIX usr_36GP
FILES usr_36GP.xml default.xml logo.rgb readme.txt
SUBDIRS ${ROBOT_SUBDIRS} PATTERNS *.xml logo.rgb *.png)

View file

@ -215,6 +215,10 @@ Driver::Driver(int index, const int robot_type) :
case USR_LS1: case USR_LS1:
robot_name = "usr_ls1"; robot_name = "usr_ls1";
break; break;
case USR_36GP:
robot_name = "usr_36GP";
break;
} }
} }

View file

@ -49,7 +49,7 @@ class AbstractStrategy;
enum { TEAM_FRIEND=1, TEAM_FOE }; enum { TEAM_FRIEND=1, TEAM_FOE };
enum { avoidleft=1, avoidright=2, avoidside=4, avoidsideclosing=8, avoidback=16 }; enum { avoidleft=1, avoidright=2, avoidside=4, avoidsideclosing=8, avoidback=16 };
enum { debug_steer=1, debug_overtake=2, debug_brake=4 }; enum { debug_steer=1, debug_overtake=2, debug_brake=4 };
enum { USR_TRB1=1, USR_SC, USR_LS1 }; enum { USR_TRB1=1, USR_SC, USR_LS1, USR_36GP };
class Driver { class Driver {
public: public:

View file

@ -152,6 +152,13 @@ void SetupUSR_ls1() {
}; };
// Schismatic init for usr_36GP
void SetupUSR_36GP() {
// Add usr_36GP specific initialization here
robot_type = USR_36GP;
};
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Carset specific entry points (functions) // Carset specific entry points (functions)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -198,6 +205,20 @@ extern "C" int usr_ls1(tModInfo *ModInfo) {
} }
// Schismatic entry point for usr_36GP
extern "C" int usr_36GP(tModInfo *ModInfo) {
int ret = -1;
setRobotName("usr_36GP");
robot_type = USR_36GP;
void *robot_settings = getFileHandle();
if (robot_settings) {
ret = usr(ModInfo);
}
return ret;
}
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// General entry point (new scheme) // General entry point (new scheme)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -266,6 +287,8 @@ extern "C" int moduleWelcome(const tModWelcomeIn* welcomeIn,
SetupUSR_sc(); SetupUSR_sc();
else if (strncmp(robot_name,"usr_ls1", strlen("usr_ls1")) == 0) else if (strncmp(robot_name,"usr_ls1", strlen("usr_ls1")) == 0)
SetupUSR_ls1(); SetupUSR_ls1();
else if (strncmp(robot_name,"usr_36GP", strlen("usr_36GP")) == 0)
SetupUSR_36GP();
// Set max nb of interfaces to return. // Set max nb of interfaces to return.
welcomeOut->maxNbItf = NBBOTS; welcomeOut->maxNbItf = NBBOTS;

Some files were not shown because too many files have changed in this diff Show more