![]() |
Passing a motor as an argument in a function
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 */ |
Re: Passing a motor as an argument in a function
Give this a shot:
Code:
void SpecialControl(SpeedController *Motor); /* prototype */ |
Re: Passing a motor as an argument in a function
I have tried that, and it gives me these errors:
Quote:
|
Re: Passing a motor as an argument in a function
Look carefully at this line, and make sure you didn't leave out anything.
Code:
Victor *InitialMotor; |
Re: Passing a motor as an argument in a function
Ah, finally, that compiles... I will see if it runs on the robot tomorrow. Thanks so much...
|
| All times are GMT -5. The time now is 02:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi