12 #include "stm32f4xx_hal.h" 77 void log(
float omega,
float new_omega) {
~Wheel()
Definition: wheel.h:60
Wheel()
Definition: wheel.h:54
TIM_HandleTypeDef * htim
Definition: wheel.h:39
void set_PIDController(PID *pid)
Definition: wheel.h:72
void set_Config(Wheel_Config *wheel)
Definition: wheel.h:62
#define START_BYTE
Definition: defines.h:13
Wheel(Wheel_Config *wheel)
Definition: wheel.h:55
TIM_HandleTypeDef * henc
Definition: wheel.h:42
Wheel & operator=(Wheel &&)=default
uint16_t in1_pin
Definition: wheel.h:35
uint32_t channel
Definition: wheel.h:40
Direction
Definition: wheel.h:22
float radius
Definition: wheel.h:32
void clear()
Definition: wheel.h:97
void update() const
Definition: wheel.cpp:110
Queue< uint8_t, LOG_BUFFER_SIZE > gLogging_Buffer
Definition: logger.cpp:13
float max_omega
Definition: wheel.h:45
uint8_t id
Definition: wheel.h:31
void set_Direction(enum Direction d)
Definition: wheel.h:63
#define MOTOR_PACKET_ID
Definition: defines.h:16
PID * pid_controller
Definition: wheel.h:48
uint16_t in2_pin
Definition: wheel.h:37
Wheel_Config * wheel_
Definition: wheel.h:102
PID * get_PIDController()
Definition: wheel.h:73
void clear()
Definition: pid.h:32
void start_Periphs()
Function that starts timer base, pwm and encoder of the wheel.
Definition: wheel.cpp:71
float get_MaxOmega() const
Definition: wheel.h:68
float omega_
Definition: wheel.h:104
float tolerance
Definition: wheel.h:44
GPIO_TypeDef * in1_port
Definition: wheel.h:34
enum Direction dir_
Definition: wheel.h:103
void set_Omega(float omega)
Function that sets the angular velocity of the wheel.
Definition: wheel.cpp:95
void log(float omega, float new_omega)
Definition: wheel.h:77
GPIO_TypeDef * in2_port
Definition: wheel.h:36
uint32_t enc_ppr
Definition: wheel.h:46
float get_Omega(uint32_t dt_millis)
Definition: wheel.cpp:125