1#include "../../../Inc/Sensors/AnalogSensors/App.h"
2#include "../../../Inc/Utils/MessageFormat.h"
6void initApp(
App* app,
int hz,
int channel,
char* name) {
31 "APP reading below sensor minimum (%.3f V)", rawData);
34 "APP reading above sensor maximum (%.3f V)", rawData);
46 else if (rawVal > 4.5) {
49 return (rawVal - 0.5)/4.0;
float getAnalogSensorData(AnalogSensor *sensor)
Retrieves analog sensor data for a specific channel.
void initAnalogSensor(AnalogSensor *analogSensor, const char *name, int hz, int channel, void *child)
Initializes an analog sensor and configures the corresponding GPIO pin.
float getAppPosition(App *app)
Gets the current position of the APP.
void updateApp(App *app)
Updates the APP data.
float transferFunctionApp(float rawVal)
Converts raw APP data to a meaningful position value.
void initApp(App *app, int hz, int channel, char *name)
Initializes the APP with the given frequency and channel.
void sendTelemetryValue(TelemetrySignal *signal, float value)
TelemetrySignal * registerTelemetrySignal(const char *name, TelemetryType type, UnitId unit_id, uint32_t expected_rate_ms, float custom_min, float custom_max)
TelemetrySignal * telem_raw
TelemetrySignal * telem_position
int(* update)(struct Updateable *self)
char name[MAX_NAME_LENGTH]