|
Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
#include "../../../Inc/Sensors/DigitalSensors/WheelSpeed.h"#include "../../../Inc/Utils/Conversions.h"#include "../../../Inc/Utils/TimeUtils.h"#include "../../../Inc/Utils/Common.h"#include <stdio.h>#include <math.h>
Go to the source code of this file.
Macros | |
| #define | M_PI 3.14159265358979323846 |
Functions | |
| void | initWheelSpeed (WheelSpeed *ws, int hz, int port, float radius, int numTeeth, WHEEL_LOCATION location) |
| Initialization function for a wheel speed sensor. More... | |
| float | calculateSpeed (WheelSpeed *ws) |
| Translates data to speed in mph. More... | |
| int | updateWheelSpeed (Updateable *updateable) |
| Updated the speed var in this sensor. More... | |
| void | setTimeInterval (WheelSpeed *ws, float interval) |
| Set time interval. More... | |
| void | addPulse (WheelSpeed *ws, int num) |
| Add pulses to sensor;. More... | |
| #define M_PI 3.14159265358979323846 |
Definition at line 10 of file WheelSpeed.c.
| void addPulse | ( | WheelSpeed * | wf, |
| int | num | ||
| ) |
Add pulses to sensor;.
| ws | A pointer to the WheelSpeed structure. |
| num | Number of pulses to add. |
Definition at line 76 of file WheelSpeed.c.

| float calculateSpeed | ( | WheelSpeed * | ws | ) |
Translates data to speed in mph.
| ws | A pointer to the WheelSpeed structure. |
Definition at line 25 of file WheelSpeed.c.


| void initWheelSpeed | ( | WheelSpeed * | ws, |
| int | hz, | ||
| int | port, | ||
| float | radius, | ||
| int | numTeeth, | ||
| WHEEL_LOCATION | location | ||
| ) |
Initialization function for a wheel speed sensor.
| ws | A pointer to the WheelSpeed structure. @pram hz Rate at which the sensor is called (in hz). @pram port Location of sensor. @pram radius Radius of wheel (in mm). @pram numTeeth Number of teeth on reluctor wheel. @pram location Location of sensor on car. |
Definition at line 13 of file WheelSpeed.c.


| void setTimeInterval | ( | WheelSpeed * | ws, |
| float | interval | ||
| ) |
Set time interval.
| ws | A pointer to the WheelSpeed structure. |
| interval | Time interval to set. |
Definition at line 72 of file WheelSpeed.c.


| int updateWheelSpeed | ( | Updateable * | updateable | ) |
Updated the speed var in this sensor.
| updateable | A pointer to the updateable structure. |
Definition at line 58 of file WheelSpeed.c.

