/** * Returns the period of the most recent pulse. * Returns the period of the most recent Encoder pulse in seconds. * This method compenstates for the decoding type. * * @deprecated Use GetEncoderRate() in favor of this method. This returns unscaled periods and GetEncoderRate() scales using value from SetEncoderDistancePerPulse(). * * @return Period in seconds of the most recent pulse. * * @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 */ double GetEncoderPeriod(UINT32 aSlot, UINT32 aChannel, UINT32 bSlot, UINT32 bChannel) { Encoder *encoder = AllocateEncoder(aSlot, aChannel, bSlot, bChannel); if (encoder != NULL) return encoder->GetPeriod(); else return 0.0; }