1#include "../../../Inc/Sensors/AnalogSensors/App.h"
25 printf(
"App::transfer_function rawValue is too low\n");
28 else if (rawVal > 4.5) {
29 printf(
"App::transfer_function rawValue is too high\n");
32 return (22.5 * rawVal) - 56.25;
void initAnalogSensor(AnalogSensor *analogSensor, const char *name, int hz, int channel)
Initializes an analog sensor and configures the corresponding GPIO pin.
float getAppPosition(App *app)
Gets the current position of the APP.
void initApp(App *app, int hz, int channel)
Initializes the APP with the given frequency and channel.
void setAppPos(App *app, float pos)
Sets pedal position in app sensor.
float transferFunctionApp(float rawVal)
Converts raw APP data to a meaningful position value.
void updateApp(void *app)
Updates the APP data.
void(* update)(void *self)