[wpilib] Add DutyCycleEncoderSim (#2798)

This commit is contained in:
Tyler Veness
2020-10-23 20:18:49 -07:00
committed by GitHub
parent 4422904a2e
commit 1069019fd2
6 changed files with 158 additions and 0 deletions

View File

@@ -154,6 +154,13 @@ class DutyCycleEncoder : public ErrorBase,
*/
double GetDistance() const;
/**
* Get the channel of the source.
*
* @return the source channel
*/
int GetSourceChannel() const;
void InitSendable(SendableBuilder& builder) override;
private:
@@ -169,6 +176,7 @@ class DutyCycleEncoder : public ErrorBase,
hal::SimDevice m_simDevice;
hal::SimDouble m_simPosition;
hal::SimDouble m_simDistancePerRotation;
hal::SimBoolean m_simIsConnected;
};
} // namespace frc