Hello, I am trying to pass a speed controller (victor) as an BYREF argument in a function and set its value, however, the motor wont turn on and I get no errors. Here is what it looks like:
Code:
void SpecialControl(SpeedController &Motor); /* prototype */
class Robot : public SimpleRobot
{
Victor InitialMotor;
public:
Robot(void): // these must be initialized in the same order
InitialMotor(1)
{
GetWatchdog().SetExpiration(0.1);
}
void OperatorControl(void)
{
GetWatchdog().SetEnabled(true);
SpecialControl(InitialMotor);
}
};
void SpecialControl(SpeedController &Motor)
{
Motor.Set(1);
}
Thanks in advance.