![]() |
Can Opener - ME 507
|
#include <Arduino.h>#include <STM32FreeRTOS.h>#include <PrintStream.h>#include "../../lib/sensorLib/encoder_counter.h"#include "../shares.h"#include "../pins.h"#include "taskEncoder.h"Functions | |
| void | taskEncoder (void *p_params) |
| Task: Read encoder values. More... | |
| int64_t | fixDelta (int64_t delta, uint32_t period) |
| Function: Fix delta. More... | |
Variables | |
| const uint32_t | tim4period = 65535 |
| The period of Timer 4. | |
| const uint32_t | tim5period = UINT32_MAX |
| The period of Timer 5. | |
Task to read the DC motor encoder values Uses Dr. Ridgely's encoder_counter codd
| int64_t fixDelta | ( | int64_t | delta, |
| uint32_t | period | ||
| ) |
Function: Fix delta.
Prevent overflow values from interfering wiht parameter calculations
| delta | (int64_t) difference between current and previous encoder value |
| period | (uint32_t) number of encoder values before overflow |
| void taskEncoder | ( | void * | p_params | ) |
Task: Read encoder values.
Period: 10ms, Priority: 2/4 Read the values of the DC motor encoders and put them into thier respecive shares
| p_params | task parameters |