diff --git a/RMFT2.cpp b/RMFT2.cpp index 97392f8..944bcfe 100644 --- a/RMFT2.cpp +++ b/RMFT2.cpp @@ -85,7 +85,8 @@ byte RMFT2::flags[MAX_FLAGS]; VPIN pin=GET_OPERAND(1); int activeAngle=GET_OPERAND(2); int inactiveAngle=GET_OPERAND(3); - Turnout::createServo(id,pin,activeAngle,inactiveAngle); + int profile=GET_OPERAND(4); + Turnout::createServo(id,pin,activeAngle,inactiveAngle,profile); continue; } diff --git a/RMFTMacros.h b/RMFTMacros.h index ca7acad..e3af537 100644 --- a/RMFTMacros.h +++ b/RMFTMacros.h @@ -96,7 +96,7 @@ #define STOP #undef SIGNAL #define SIGNAL(redpin,amberpin,greenpin) -#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle) +#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile) #define PIN_TURNOUT(id,pin) #define THROW(id) #define TURNOUT(id,addr,subaddr) @@ -227,13 +227,13 @@ const int StringMacroTracker1=__COUNTER__; #define RETURN OPCODE_RETURN,NOP, #define REV(speed) OPCODE_REV,V(speed), #define START(route) OPCODE_START,V(route), -#define SERVO(id,position,profile) OPCODE_SERVO,V(id),OPCODE_PAD,V(position),OPCODE_PAD,V(profile), +#define SERVO(id,position,profile) OPCODE_SERVO,V(id),OPCODE_PAD,V(position),OPCODE_PAD,V(PCA9685::ProfileType::profile), #define SETLOCO(loco) OPCODE_SETLOCO,V(loco), #define SET(sensor_id) OPCODE_SET,V(sensor_id), #define SPEED(speed) OPCODE_SPEED,V(speed), #define STOP OPCODE_SPEED,V(0), #define SIGNAL(redpin,amberpin,greenpin) OPCODE_SIGNAL,V(redpin),OPCODE_PAD,V(amberpin),OPCODE_PAD,V(greenpin), -#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle) OPCODE_SERVOTURNOUT,V(id),OPCODE_PAD,V(pin),OPCODE_PAD,V(activeAngle),OPCODE_PAD,V(inactiveAngle), +#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile) OPCODE_SERVOTURNOUT,V(id),OPCODE_PAD,V(pin),OPCODE_PAD,V(activeAngle),OPCODE_PAD,V(inactiveAngle),OPCODE_PAD,V(PCA9685::ProfileType::profile), #define PIN_TURNOUT(id,pin) OPCODE_PINTURNOUT,V(id),OPCODE_PAD,V(pin), #define THROW(id) OPCODE_THROW,V(id), #define TURNOUT(id,addr,subaddr) OPCODE_TURNOUT,V(id),OPCODE_PAD,V(addr),OPCODE_PAD,V(subaddr),