Quote:
Originally Posted by bob.wolff68
If you want to use your CANTalon object, you should pass it as a pointer .
Code:
CANTalon *pMySpeedController
...
pMySpeedController->Set(x);
...
|
This is weird, but whenever I try deploying the code Eclipse tells me there's nothing to build for any project after I added the pointer. Here's the information from the console:
Code:
Info: Nothing to build for Encoder
Info: Nothing to build for Intermediate Vision
Info: Nothing to build for Mecanum Drive
Info: Nothing to build for Motor Control With Encoder
Info: Nothing to build for PDP CAN Monitoring
Info: Nothing to build for Simple Vision
Info: Nothing to build for Solenoids
Info: Nothing to build for [FRC2015_MAINCODE]
Info: Nothing to build for cases code
Info: Nothing to build for example
The project I'm trying to build is [FRC2015_MAINCODE]. Here's the portion of the code which I've changed:
Main program
Code:
...
CANTalon *fan_motor_SRX;
...
motorAutomationEncoder(e_encoder_dist, 300, -100, fan_motor_SRX, 1.0);
...
START_ROBOT_CLASS(Robot);
Header file (function):
Code:
int motorAutomationEncoder(double encoderDist,
double encoderDistThresholdMax,
double encoderDistThresholdMin,
CANTalon *motor,
double motorSpeed)
{
if(encoderDist > encoderDistThresholdMax) {
motor->Set(0.0);
}
else if(encoderDist <= encoderDistThresholdMax && encoderDist >= encoderDistThresholdMin) {
motor->Set(motorSpeed);
}
else if(encoderDist < encoderDistThresholdMin) {
motor->Set(0.0);
}
}
All other projects work when I try to deploy them. What could be wrong here?...