Quote:
Originally Posted by RaneLafraze
We are also getting the following error:
Code:
Program "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl" not found in PATH
Other posts claim this not to be a concern. However, we haven't had any luck getting our robot to run.
|
It's not a concern. There's actually a way to fix it but I forget the solution atm and it doesn't matter.
Your problem is in RobotMap. More specifically, you are actually getting either zeros or garbage (I don't know the internals of GCC, so I don't know which

) when trying to access your RobotMap values. Print one and you'll see. This is because they aren't initialized.
Now why aren't RobotMap values initialized? Because you never call the constructor where you have the initializations. So you could either call the constructor before you use any RobotMap values, or (the better solution) reorganize RobotMap.
Here's how it might look instead
Code:
// RobotMap.h (get rid of RobotMap.cpp)
#pragma once
class RobotMap
{
public:
static const int DRIVESTICK_JOYSTICK = 0;
static const int SHOOTSTICK_JOYSTICK = 1;
static const int LEFT_FRONT_MOTOR = 0;
static const int LEFT_REAR_MOTOR = 1;
static const int RIGHT_FRONT_MOTOR = 2;
static const int RIGHT_REAR_MOTOR = 3;
// and so on
};
This makes sure the variables are correctly initialized at program start, so you can use the actual values you want without further hassle.