Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
#include "../AnalogSensor.h"
Go to the source code of this file.
Classes | |
struct | BrakePressure |
Functions | |
void | initBrakePressure (BrakePressure *bp, int hz, int channel) |
Initializes the BrakePressure sensor with the given frequency and channel. More... | |
float | getBrakePressure (BrakePressure *bp) |
Gets the current brake pressure. More... | |
void | updateBrakePressure (void *bp) |
Updates the brake pressure data. More... | |
float | transferFunctionBrakePressure (float rawVal) |
Converts raw brake pressure data to a meaningful pressure value. More... | |
float getBrakePressure | ( | BrakePressure * | bp | ) |
Gets the current brake pressure.
bp | Pointer to the BrakePressure structure to query. |
Definition at line 17 of file BrakePressure.c.
void initBrakePressure | ( | BrakePressure * | bp, |
int | hz, | ||
int | channel | ||
) |
Initializes the BrakePressure sensor with the given frequency and channel.
bp | Pointer to the BrakePressure structure to initialize. |
hz | The frequency in Hertz at which the sensor operates. |
channel | The analog channel the sensor is connected to. |
Definition at line 11 of file BrakePressure.c.
float transferFunctionBrakePressure | ( | float | rawVal | ) |
Converts raw brake pressure data to a meaningful pressure value.
rawVal | The raw data from the brake pressure sensor. |
Definition at line 28 of file BrakePressure.c.
void updateBrakePressure | ( | void * | bp | ) |
Updates the brake pressure data.
bp | Pointer to the BrakePressure structure to update. |
Definition at line 21 of file BrakePressure.c.