1#include "../../../Inc/Sensors/AnalogSensors/BrakePressure.h"
2#include "../../../Inc/Utils/MessageFormat.h"
3#include "../../../Inc/Utils/Telemetry.h"
37 "Brake pressure reading below sensor minimum (%.3f V)", rawData);
38 }
else if (brakePressure->
pressure == 2001) {
40 "Brake pressure reading above sensor maximum (%.3f V)", rawData);
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 transferFunctionBrakePressure(float rawVal)
Converts raw brake pressure data to a meaningful pressure value.
static const float kLowOutputSaturation
static const float kHighOutputSaturation
float getBrakePressure(BrakePressure *bp)
Gets the current brake pressure.
static const float kVoltsPerPSIA
void updateBrakePressure(void *bp)
Updates the brake pressure data.
void initBrakePressure(BrakePressure *bp, int hz, int channel, char *name)
Initializes the BrakePressure sensor with the given frequency and channel.
static const float kOffsetVoltage
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_psi
int(* update)(struct Updateable *self)
char name[MAX_NAME_LENGTH]