Encoder(std::function<double(rotationUnits)> getPosition, std::function<void()> resetPosition)
Makes an encoder with the given functions. I don’t know when this would be useful, but it’s here.
Parameters
getPosition- The function to get the position of the encoderresetPosition- The function to reset the position of the encoder
Example
rotation rot = rotation(PORT1);
Encoder enc = ([&rot](){return rot.rotation(rotationUnits::deg);}, [&rot](){rot.resetRotation();});