Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Esc.h
Go to the documentation of this file.
1#ifndef RENNSSELAERMOTORSPORT_ESC_H
2#define RENNSSELAERMOTORSPORT_ESC_H
3
4#include "../ExternalSystem.h"
5
6typedef struct {
7 // CANSensor base;
8 float temp;
10} Esc;
11
18void initEsc(Esc* esc, int hz);
19
26float getEscTemp(const Esc* esc);
27
34float getEscMotorRevolutions(const Esc* esc);
35
41void updateEsc(void* esc);
42
49char* toStringEsc(const Esc* esc);
50
51#endif // RENNSSELAERMOTORSPORT_ESC_H
void updateEsc(void *esc)
Updates the ESC data.
Definition: Esc.c:27
float getEscMotorRevolutions(const Esc *esc)
Gets the motor revolutions of the ESC.
Definition: Esc.c:23
void initEsc(Esc *esc, int hz)
Initializes the ESC with the given frequency.
Definition: Esc.c:5
float getEscTemp(const Esc *esc)
Gets the temperature of the ESC.
Definition: Esc.c:19
char * toStringEsc(const Esc *esc)
Converts the Esc structure to a string.
Definition: Esc.c:44
Definition: Esc.h:6
float temp
Definition: Esc.h:8
float motor_revolutions
Definition: Esc.h:9