Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
#include "../../../Inc/Sensors/AnalogSensors/SteeringColumn.h"
#include "../../../Inc/Utils/Common.h"
#include <stdio.h>
Go to the source code of this file.
Functions | |
void | initSteeringColumn (SteeringColumn *steeringColumn, int hz, int channel, float zeroOffset) |
Initializes the SteeringColumn sensor with the given frequency, channel, and zero offset. More... | |
float | getSteeringColumnRotationAngle (SteeringColumn *steeringColumn) |
Gets the current rotation angle of the steering column. More... | |
int | updateSteeringColumn (SteeringColumn *steeringColumn) |
Updates the SteeringColumn data. More... | |
float | transferFunctionSteeringColumn (float rawVal) |
Converts raw steering column data to a meaningful rotation angle. More... | |
float getSteeringColumnRotationAngle | ( | SteeringColumn * | steeringColumn | ) |
Gets the current rotation angle of the steering column.
steeringColumn | Pointer to the SteeringColumn structure to query. |
Definition at line 13 of file SteeringColumn.c.
void initSteeringColumn | ( | SteeringColumn * | steeringColumn, |
int | hz, | ||
int | channel, | ||
float | zeroOffset | ||
) |
Initializes the SteeringColumn sensor with the given frequency, channel, and zero offset.
steeringColumn | Pointer to the SteeringColumn structure to initialize. |
hz | The frequency in Hertz at which the sensor operates. |
channel | The analog channel the sensor is connected to. |
zeroOffset | The zero offset value for the steering column. |
Definition at line 6 of file SteeringColumn.c.
float transferFunctionSteeringColumn | ( | float | rawVal | ) |
Converts raw steering column data to a meaningful rotation angle.
rawVal | The raw data from the steering column sensor. |
Definition at line 32 of file SteeringColumn.c.
int updateSteeringColumn | ( | SteeringColumn * | steeringColumn | ) |
Updates the SteeringColumn data.
steeringColumn | Pointer to the SteeringColumn structure to update. |
Definition at line 17 of file SteeringColumn.c.