diff --git a/src/drivers/shadow/CMakeLists.txt b/src/drivers/shadow/CMakeLists.txt index bdc90d6db..749d3cb5f 100644 --- a/src/drivers/shadow/CMakeLists.txt +++ b/src/drivers/shadow/CMakeLists.txt @@ -69,7 +69,7 @@ SET(ROBOT_SOURCES src/Array.h # Official-only shadow instances. SET(ROBOT_CLONES shadow_36GP shadow_sc shadow_srw shadow_trb1 shadow_ls1 shadow_ls2 shadow_mp5 - shadow_mpa1 shadow_mpa11 shadow_lp1 shadow_ref) + shadow_mpa1 shadow_mpa11 shadow_mpa12 shadow_lp1 shadow_ref) # The ubiquitous robot module and its clones. ROBOT_MODULE(NAME ${ROBOT_NAME} VERSION 3.3.0 SOVERSION 1.0.0 diff --git a/src/drivers/shadow/src/Driver.cpp b/src/drivers/shadow/src/Driver.cpp index c016343e0..703f29b08 100644 --- a/src/drivers/shadow/src/Driver.cpp +++ b/src/drivers/shadow/src/Driver.cpp @@ -252,6 +252,11 @@ TDriver::TDriver(int Index, const int robot_type): robot_name = "shadow_mpa11"; Frc = 0.88; break; + + case SHADOW_MPA12: + robot_name = "shadow_mpa12"; + Frc = 0.88; + break; } for( int i = 0; i < 50; i++ ) diff --git a/src/drivers/shadow/src/Driver.h b/src/drivers/shadow/src/Driver.h index ba0cd2603..e0e5ca065 100644 --- a/src/drivers/shadow/src/Driver.h +++ b/src/drivers/shadow/src/Driver.h @@ -113,7 +113,7 @@ static const int MAXNBBOTS = MAX_NBBOTS; // Number of drivers/robots static const int BUFSIZE = 256; enum { SHADOW_TRB1=1, SHADOW_SC, SHADOW_SRW, SHADOW_LS1, SHADOW_LS2, SHADOW_36GP, - SHADOW_RS, SHADOW_LP1, SHADOW_MPA1, SHADOW_MPA11 }; + SHADOW_RS, SHADOW_LP1, SHADOW_MPA1, SHADOW_MPA11, SHADOW_MPA12 }; class TDriver { diff --git a/src/drivers/shadow/src/Shadow.cpp b/src/drivers/shadow/src/Shadow.cpp index 994a20a35..c04da0981 100644 --- a/src/drivers/shadow/src/Shadow.cpp +++ b/src/drivers/shadow/src/Shadow.cpp @@ -205,13 +205,20 @@ void SetupSHADOW_mpa1() robot_type = SHADOW_MPA1; }; -// Schismatic init for shadow_mpa1 +// Schismatic init for shadow_mpa11 void SetupSHADOW_mpa11() { // Add shadow_mpa1 specific initialization here robot_type = SHADOW_MPA11; }; +// Schismatic init for shadow_mpa12 +void SetupSHADOW_mpa12() +{ + // Add shadow_mpa1 specific initialization here + robot_type = SHADOW_MPA12; +}; + //////////////////////////////////////////////////////////// // Carset specific entry points (functions) @@ -323,6 +330,21 @@ extern "C" int shadow_mpa11(tModInfo *ModInfo) return ret; } +// Schismatic entry point for shadow_mpa12 +extern "C" int shadow_mpa12(tModInfo *ModInfo) +{ + int ret = -1; + setRobotName("shadow_mpa12"); + robot_type = SHADOW_MPA12; + void *robot_settings = getFileHandle(); + if (robot_settings) + { + ret = shadow(ModInfo); + } + + return ret; +} + // Schismatic entry point for shadow_36GP extern "C" int shadow_36GP(tModInfo *ModInfo) { @@ -469,6 +491,8 @@ extern "C" int moduleWelcome(const tModWelcomeIn* welcomeIn, SetupSHADOW_mpa1(); else if (strncmp(robot_name,"shadow_mpa11", strlen("shadow_mpa11")) == 0) SetupSHADOW_mpa11(); + else if (strncmp(robot_name,"shadow_mpa12", strlen("shadow_mpa12")) == 0) + SetupSHADOW_mpa12(); // Set max nb of interfaces to return.