/** * Determine if the encoder is stopped. * Using the MaxPeriod value, a boolean is returned that is true if the encoder is considered * stopped and false if it is still moving. A stopped encoder is one where the most recent pulse * width exceeds the MaxPeriod. * * @param aSlot The digital module slot for the A Channel on the encoder * @param aChannel The channel on the digital module for the A Channel of the encoder * @param bSlot The digital module slot for the B Channel on the encoder * @param bChannel The channel on the digital module for the B Channel of the encoder * @return True if the encoder is considered stopped. */ bool GetEncoderStopped(UINT32 aSlot, UINT32 aChannel, UINT32 bSlot, UINT32 bChannel) { Encoder *encoder = AllocateEncoder(aSlot, aChannel, bSlot, bChannel); if (encoder != NULL) return encoder->GetStopped(); else return false; }