#include <Arduino.h>#include <PrintStream.h>#include "shares.h"#include "ControlTask.h"#include "Control.h"#include "EncoderDriver.h"#include "MotorDriver.h"#include "EMDriver.h"#include "math.h"Functions | |
| void | task_control (void *p_params) |
| Task which sends data to ControlTask.h. More... | |
This file contains a task for controlling the Zen Gardener's magnet position
Source code available here: https://github.com/chstanto/Zen_Garden/blob/main/src/ControlTask.cpp
This file contains a task for controlling the Zen Gardener's magnet position
Source code available here: https://github.com/chstanto/Zen_Garden/blob/main/src/ControlTask.h
| void task_control | ( | void * | p_params | ) |
Task which sends data to ControlTask.h.
This task sends designs Zen Garden designs to the Control Task. Upon further development, this task would also read from a CSV to obtain that data, retrieve performance data, and print desired data to a CSV.
| p_params | A pointer to function parameters which we don't use. |
Current x position, [in]
Current y position, [in]
Current x velocity, [in/s]
Current y velocity, [in/s]
Previous x position reading, [in]
Previous y position reading, [in]
Reference x position, [in]
Reference y position, [in]
Reference x velocity, [in/s]
Reference y velocity, [in/s]
Desired operating speed, [in/s]
x error, [in]
y error, [in]
Angle of reference velocity vector [rad]
Control system's acceptable error [in]
Clock value [ms]
vTaskDelay value [ms]
triggers flag if x limit switch has been clicked
triggers flag if y limit switch has been clicked
triggers flag if first x position has been reached
triggers flag if first y position has been reached
triggers flag if x position error is sufficiently low
triggers flag if y position error is sufficiently low
triggers flag if last reference value has been received