Mods to make encoder work again, and a possible 2nd iteration of encoder config
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define MYENCODER
|
||||
#include "Stm32F4_Encoder.h"
|
||||
#include <CircularBuffer.hpp>
|
||||
#define RINGBUFFERLEN 101
|
||||
#define RINGBUFFERLEN 11
|
||||
|
||||
class MyEncoder
|
||||
{
|
||||
@@ -30,6 +30,7 @@ private:
|
||||
CircularBuffer<double_t, RINGBUFFERLEN> Pos;
|
||||
CircularBuffer<uint32_t, RINGBUFFERLEN> TDelta;
|
||||
double curPos;
|
||||
double oldFrequency;
|
||||
|
||||
TIM_TypeDef *tim_base;
|
||||
};
|
||||
|
||||
@@ -641,7 +641,8 @@ public:
|
||||
uint16_t GetCount();
|
||||
};
|
||||
|
||||
void rcc_config();
|
||||
void encoder_config();
|
||||
void encoder2_config(); // Experimental
|
||||
void GpioConfigPortA(GPIO_TypeDef *GPIOx);
|
||||
void GpioConfigPortC(GPIO_TypeDef *GPIOx);
|
||||
void GpioConfigPortD(GPIO_TypeDef *GPIOx);
|
||||
|
||||
Reference in New Issue
Block a user