3 #define GEAR_RATIO ((double) 1/19.0 * 3.0/5.0) 6 #include "IHardwareInterface.h" 7 #include "messages/IMessage.h" 11 #include "wiringPiInclude.h" 14 #include "messages/EncoderMessage.h" 61 std::list<IMessage*>*
read()
override;
77 int m_ticksPerRevolution;
79 double m_revolutionsPerTick;
81 std::chrono::high_resolution_clock::time_point m_lastTickTime;
83 volatile double m_speed;
86 std::atomic<long> m_count;
EncoderAdapter(int channelA, int channelB, int ticksPerRev, Hardware hardware)
std::list< IMessage * > * read() override
void write(IMessage *message) override
~EncoderAdapter() override