![]() |
Unable to invert motor
Hi all!
I have the following code in my main robot class, and it is giving me a number of exceptions which I can't conquer: Code:
MainDrive.setInvertedMotor(Talon.kRearLeft, true); First line: - Syntax error on tokens, delete these tokens - Syntax error on token "(", < expected Second line: - Syntax error on tokens, TypeArgument1 expected instead - Syntax error on token "(", , expected Any and all help is appreciated! Thanks, Chris |
Re: Unable to invert motor
The errors themselves make no sense but theres some issues
There may be other syntax errors in the code as well.. post the entire file |
Re: Unable to invert motor
robotDrive.setInvertedMotor(RobotDrive.MotorType.k FrontRight, true);
|
Re: Unable to invert motor
Here's the rest of the code. I've tried the fixes mentioned above, but they haven't seemed to help.
Code:
package org.usfirst.frc.team854.robot; |
Re: Unable to invert motor
you put it inside of the class declaration.
Move those calls to robotInit() You can only declare functions and variables in that space you put the two calls, you can't do anything else like call functions |
Re: Unable to invert motor
Quote:
|
Re: Unable to invert motor
Thanks guys!
I managed to work it out through trial and error, but thanks for clearing up why it works. Chris |
Re: Unable to invert motor
For future reference, I believe there is a method to invert your speed controller.
In the class SpeedController: Code:
SpeedController.setInverted(); |
Re: Unable to invert motor
Quote:
|
| All times are GMT -5. The time now is 10:17. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi