Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Sensors
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
9
typedef
enum
{
10
s_ANALOG
,
11
s_DIGITAL
,
12
}
SensorType
;
13
14
typedef
struct
{
15
Updateable
updateable
;
16
SensorType
type
;
17
void
*
child
;
// Pointer to the child struct
18
}
Sensor
;
19
29
void
initSensor
(
Sensor
* sensor,
const
char
* name,
int
hz,
SensorType
type,
void
* child);
30
31
#endif
// RENSSELAERMOTORSPORT_SENSOR_H
SensorType
SensorType
Definition:
Sensor.h:9
s_DIGITAL
@ s_DIGITAL
Definition:
Sensor.h:11
s_ANALOG
@ s_ANALOG
Definition:
Sensor.h:10
initSensor
void initSensor(Sensor *sensor, const char *name, int hz, SensorType type, void *child)
Initializes a sensor with the given parameters.
Definition:
Sensor.c:4
Sensor
Definition:
Sensor.h:14
Sensor::child
void * child
Definition:
Sensor.h:17
Sensor::type
SensorType type
Definition:
Sensor.h:16
Sensor::updateable
Updateable updateable
Definition:
Sensor.h:15
Updateable
Definition:
Updateable.h:23
Generated by
1.9.5