I have a function that prints out the temperature of a motor:
void printTemp(int lineNum, std::string motorName, motor motorObject) {
Brain.Screen.setCursor(lineNum, 1);
Brain.Screen.print(motorName);
Brain.Screen.print("%f", motorObject.temperature(celsius));
}
I call it using printTemp(1, "Right Motor 1: ", rightMotorA);
I always seem to be getting an error:
/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include/vex_brain.h:256:28: error: cannot convert ‘std::basic_string’ to ‘int’ without a conversion operator
print( “%d”, (int)value );
^~~~~~~~~~
src/main.cpp:95:16: note: in instantiation of function template specialization ‘vex::lcd::print<std::basic_string >’ requested here
Brain.Screen.print(motorName);
^
1 error generated.
make: *** [build/src/main.o] Error 1
[error]: make process closed with exit code : 2