ok, so that didn’t take long.
The visual studio code extension contains an updated version of the V5 SDK (and also EXP and IQ generation 2 SDKs). We have removed some of the old obsolete motor APIs. Ideally we would have deprecated them, but it seems that warnings create just as many questions as errors do, so it was time to pull the band aid off and break some code. The good news is that it’s pretty easy to update to use the preferred “spin” variant of the functions that have existed in parallel with the “rotate” version since the days of VCS.
The following have been removed from motor and motorgroup classes.
- bool rotateTo( double rotation, rotationUnits units, double velocity, velocityUnits units_v, bool waitForCompletion=true );
- bool rotateTo( double rotation, rotationUnits units, bool waitForCompletion=true );
- bool rotateFor( double rotation, rotationUnits units, double velocity, velocityUnits units_v, bool waitForCompletion=true );
- bool rotateFor( directionType dir, double rotation, rotationUnits units, double velocity, velocityUnits units_v, bool waitForCompletion=true );
- bool rotateFor( double rotation, rotationUnits units, bool waitForCompletion=true );
- bool rotateFor( directionType dir, double rotation, rotationUnits units, bool waitForCompletion=true );
- bool rotateFor( double time, timeUnits units, double velocity, velocityUnits units_v );
- void rotateFor( directionType dir, double time, timeUnits units, double velocity, velocityUnits units_v );
- void rotateFor( double time, timeUnits units );
- void rotateFor( directionType dir, double time, timeUnits units );
- void resetRotation( void );
- void setRotation( double value, rotationUnits units );
- double rotation( rotationUnits units );
- void startRotateTo( double rotation, rotationUnits units, double velocity, velocityUnits units_v );
- void startSpinTo( double rotation, rotationUnits units, double velocity, velocityUnits units_v );
- void startRotateTo( double rotation, rotationUnits units );
- void startSpinTo( double rotation, rotationUnits units );
- void startRotateFor( double rotation, rotationUnits units, double velocity, velocityUnits units_v );
- void startSpinFor( double rotation, rotationUnits units, double velocity, velocityUnits units_v );
- void startRotateFor( directionType dir, double rotation, rotationUnits units, double velocity, velocityUnits units_v );
- void startSpinFor( directionType dir, double rotation, rotationUnits units, double velocity, velocityUnits units_v );
- void startRotateFor( double rotation, rotationUnits units );
- void startSpinFor( double rotation, rotationUnits units );
- void startRotateFor( directionType dir, double rotation, rotationUnits units );
- void startSpinFor( directionType dir, double rotation, rotationUnits units );
any rotateTo or rotateFor can be replaced by equivalent spinTo or spinFor versions.
rotation is replaced by position.
startRotate… or startSpin should not be used, spinFor and spinTo should be used with the optional waitForCompletion parameter set to false.
I should add that this change to the SDK will also impact future versions of VEXcode.
It will not affect any block code or block code that has been converted to C++, it will also not impact Python as the “rotate” variant of the API has never been available in Python.