Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Functions
Sensor.c File Reference
#include "../../Inc/Sensors/Sensor.h"
#include "../../Inc/Utils/Updateable.h"
Include dependency graph for Sensor.c:

Go to the source code of this file.

Functions

void initSensor (Sensor *sensor, const char *name, int hz, SensorType type)
 Initializes a sensor with the given parameters. More...
 

Function Documentation

◆ initSensor()

void initSensor ( Sensor sensor,
const char *  name,
int  hz,
SensorType  type 
)

Initializes a sensor with the given parameters.

Parameters
sensorPointer to the Sensor structure to initialize.
namePointer to a string containing the name of the sensor.
hzThe frequency in Hertz at which the sensor operates.
typeThe type of the sensor as defined by the SensorType enum.

Definition at line 4 of file Sensor.c.

4 {
5 initUpdateable(&sensor->updateable, name, hz);
6 sensor->type = type;
7}
type
Definition: Updateable.h:17
void initUpdateable(Updateable *updateable, const char *name, int hz)
Definition: Updateable.c:6
SensorType type
Definition: Sensor.h:16
Updateable updateable
Definition: Sensor.h:15
Here is the call graph for this function:
Here is the caller graph for this function: