Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
BrakePressure.h
Go to the documentation of this file.
1#ifndef RENSSELAERMOTORSPORT_BRAKEPRESSURE_H
2#define RENSSELAERMOTORSPORT_BRAKEPRESSURE_H
3
4#include "../AnalogSensor.h"
5
6typedef struct {
8 float pressure;
10
18void initBrakePressure(BrakePressure* bp, int hz, int channel);
19
27
33void updateBrakePressure(void* bp);
34
35
42float transferFunctionBrakePressure(float rawVal);
43
44#endif // RENSSELAERMOTORSPORT_BRAKEPRESSURE_H
float transferFunctionBrakePressure(float rawVal)
Converts raw brake pressure data to a meaningful pressure value.
Definition: BrakePressure.c:28
float getBrakePressure(BrakePressure *bp)
Gets the current brake pressure.
Definition: BrakePressure.c:17
void initBrakePressure(BrakePressure *bp, int hz, int channel)
Initializes the BrakePressure sensor with the given frequency and channel.
Definition: BrakePressure.c:11
void updateBrakePressure(void *bp)
Updates the brake pressure data.
Definition: BrakePressure.c:21
AnalogSensor base
Definition: BrakePressure.h:7