PROS setting gearing

So when setting the gearing in my globals file for motors, an error comes up claiming that the " E_MOTOR_GEARSET_18" was not defined at this scope while this is what it says to use in the documentation. Any advice would be appreciated.

#include “main.h”

#define RIGHTB_PORT 17
#define RIGHTF_PORT 9
#define LEFTB_PORT 11
#define LEFTF_PORT 2



pros::Motor rightBChassis(RIGHTB_PORT, E_MOTOR_GEARSET_18);
pros::Motor rightFChassis(RIGHTF_PORT, E_MOTOR_GEARSET_18);
pros::Motor leftBChassis(LEFTB_PORT, E_MOTOR_GEARSET_18);
pros::Motor leftFChassis(LEFTF_PORT, E_MOTOR_GEARSET_18);

The E_Motor_Gearset types are defined in the pros namespace. Change your “E_MOTOR_GEARSET_18” to “pros::E_MOTOR_GEARSET_18”.

Hope that helps!
1069B - Argonauts

3 Likes

Or you could remove the comment here in main.himage

This allows you to not write pros:: in front of everything.

3 Likes

*or use namespace PROS

1 Like