I’m getting errors for using abs “to few arguments in function call” and that’s only for when abs is in it for example, bool isTurning = (abs(Controller1.Axis1.value()) > turningThreshold);
and i have that in my vex.h
First of all if you are having trouble with abs you can make your own function :
int absInt(int x){
if (x < 0){
return -x
}
return x
}
Also in the offical api .value() is not a memeber of the Controller.Axis1. API : (VEX Help) .So, try .position instead and see if that works better so revised code:
It actually is, it may have been edited out of that (now outdated) help site for simplicity.
position() returns numbers in the range +/- 100 whereas value() returns in the range +/- 127 which much of the legacy (think RobotC) programming environments used to do.
/**
* @brief Gets the value of the joystick axis on a scale from -127 to 127.
* @return Returns an integer that represents the value of the joystick axis.
*/
int32_t value( void ) const;
Oh, my bad I usually when I reply have my computer open looking at the properties to make sure that im correct when responding. Thank you (Also just realized I use .value too).
Now, I think that its something to do with how they use or include abs.