Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Sensor.h
Go to the documentation of this file.
1#ifndef RENSSELAERMOTORSPORT_SENSOR_H
2#define RENSSELAERMOTORSPORT_SENSOR_H
3
4#include <stdio.h>
5#include <stdlib.h>
6
7#include "../Utils/Updateable.h"
8
9typedef enum {
13
14typedef struct {
17 void* child; // Pointer to the child struct
18} Sensor;
19
29void initSensor(Sensor* sensor, const char* name, int hz, SensorType type, void* child);
30
31#endif // RENSSELAERMOTORSPORT_SENSOR_H
SensorType
Definition: Sensor.h:9
@ s_DIGITAL
Definition: Sensor.h:11
@ s_ANALOG
Definition: Sensor.h:10
void initSensor(Sensor *sensor, const char *name, int hz, SensorType type, void *child)
Initializes a sensor with the given parameters.
Definition: Sensor.c:4
Definition: Sensor.h:14
void * child
Definition: Sensor.h:17
SensorType type
Definition: Sensor.h:16
Updateable updateable
Definition: Sensor.h:15