1#include "../../../Inc/Sensors/AnalogSensors/BrakePressure.h"
26 printf(
"BrakePressure::update rawVal: %f\r\n", rawData);
35 printf(
"BrakePressure::transfer_function rawVal is too low\r\n");
43 printf(
"BrakePressure::transfer_function rawVal is too high\r\n");
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 initBrakePressure(BrakePressure *bp, int hz, int channel)
Initializes the BrakePressure sensor with the given frequency and channel.
void updateBrakePressure(void *bp)
Updates the brake pressure data.
static const float kOffsetVoltage
int(* update)(struct Updateable *self)