Wiring and Port Issues

Hello all,
My team has been having a nightmare with our wiring recently. We were recently dealing with a cortex reboot problem that we have now fixed. However, now we are dealing with a very strange glitch. Whenever I open my program, I get an error that says that “driveRight” already exists (driveRight is the name of the port that splits for our right side of drivetrain motors. I have the drive sides feature in RobotC disabled, and we haven’t had this error this show up anytime before. In addition, when we use the joystick to power up the drivetrain, the left drive moves correctly, but the right doesn’t move at all. However, the port under the left drive also fires up. He ran some basic moving programs to ensure that the cortex and the motors are fine, which they are. My team and I are deeply confused, and any help would be useful.

It sounds like you perhaps turned Natural language on, driveRight is a reserved word but only gets used when Natural Language is enabled. This is its definition.

typedef enum TMotorDriveSide
} TMotorDriveSide;

So change driveRight to something else.

I do believe the compiler is offering you some insight into the problem, and that at least one problem is that “driveRight” actually already exists.

Actually, it’s not, and that’s what the compiler is trying to tell you.

What did you do to “disable” the drive sides feature. I can look shortly, but I assume a robotC include file somewhere has a line that looks like

#define driveRight 1

or something similar.

Instead of insisting on using the driveRight identifier for something else, you should do what’s within your control, and rename your port.

[Edit: The much more knowledgeable @jpearman quickly produced the enum containing driveRight. So, it’s an enum, not a #define. Still, the identifier is taken.]

Thats whats it references to. But only on the first compile. I’ll change it anyway. Any idea to why it powers up the other port aswell?

I’ll change it.