Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Sensor.c
Go to the documentation of this file.
1#include "../../Inc/Sensors/Sensor.h"
2#include "../../Inc/Utils/Updateable.h"
3
4void initSensor(Sensor* sensor, const char* name, int hz, SensorType type, void* child) {
5 initUpdateable(&sensor->updateable, name, hz, SENSOR, sensor);
6 sensor->type = type;
7 sensor->child = child;
8}
void initSensor(Sensor *sensor, const char *name, int hz, SensorType type, void *child)
Initializes a sensor with the given parameters.
Definition: Sensor.c:4
SensorType
Definition: Sensor.h:9
void initUpdateable(Updateable *updateable, const char *name, int hz, UpdateableType utype, void *child)
Definition: Updateable.c:6
@ SENSOR
Definition: Updateable.h:19
Definition: Sensor.h:14
void * child
Definition: Sensor.h:17
SensorType type
Definition: Sensor.h:16
Updateable updateable
Definition: Sensor.h:15