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
ANALOG
,
11
DIGITAL
,
12
}
SensorType
;
13
14
typedef
struct
{
15
Updateable
updateable
;
16
SensorType
type
;
17
}
Sensor
;
18
27
void
initSensor
(
Sensor
* sensor,
const
char
* name,
int
hz,
SensorType
type
);
28
29
#endif
// RENSSELAERMOTORSPORT_SENSOR_H
SensorType
SensorType
Definition:
Sensor.h:9
DIGITAL
@ DIGITAL
Definition:
Sensor.h:11
ANALOG
@ ANALOG
Definition:
Sensor.h:10
initSensor
void initSensor(Sensor *sensor, const char *name, int hz, SensorType type)
Initializes a sensor with the given parameters.
Definition:
Sensor.c:4
type
type
Definition:
Updateable.h:17
Sensor
Definition:
Sensor.h:14
Sensor::type
SensorType type
Definition:
Sensor.h:16
Sensor::updateable
Updateable updateable
Definition:
Sensor.h:15
Updateable
Definition:
Updateable.h:22
Generated by
1.9.5