|
CodeUC HRI2
v2.0
Microcontroller firmware of the board used during the HRI labs.
|
#include "controller.h"#include "communication.h"#include "drivers/adc.h"#include "drivers/dac.h"#include "drivers/debug_gpio.h"#include "drivers/incr_encoder.h"#include "drivers/hall.h"#include "drivers/h_bridge.h"#include "drivers/callback_timers.h"#include "lib/basic_filter.h"#include "lib/pid.h"#include "lib/utils.h"Functions | |
| void | ctrl_RegulateCurrent () |
| Current regulation "loop" function. More... | |
| void | ctrl_RegulatePosition () |
| Position regulation "loop" function. More... | |
| void | ctrl_Init (void) |
| Initialize the position and current controllers. More... | |
| void | ctrl_StartCurrentLoop (void) |
| Start the current regulation. More... | |
Variables | |
| uint32_t | statusReg |
| volatile uint32_t | ctrl_timestamp |
| volatile float32_t | ctrl_hallVoltage |
| volatile float32_t | ctrl_motorPosCod |
| volatile float32_t | ctrl_motorTorque_Nm_c |
| volatile pid_Pid | ctrl_currentPid |
| bool | ctrl_regulateCurrent |
| void ctrl_RegulateCurrent | ( | void | ) |
Current regulation "loop" function.
| void ctrl_RegulatePosition | ( | ) |
Position regulation "loop" function.
| volatile pid_Pid ctrl_currentPid |
| volatile float32_t ctrl_hallVoltage |
| volatile float32_t ctrl_motorPosCod |
| volatile float32_t ctrl_motorTorque_Nm_c |
| bool ctrl_regulateCurrent |
| volatile uint32_t ctrl_timestamp |
| uint32_t statusReg |
1.8.11