Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Functions
ESCIndicator.c File Reference
#include "../../../Inc/Sensors/DigitalSensors/ESCIndicator.h"
Include dependency graph for ESCIndicator.c:

Go to the source code of this file.

Functions

void initECSIndicator (ESCIndicator *esc, int hz, int port)
 
bool getAlive (ESCIndicator *esc)
 Getter for alive var. More...
 

Function Documentation

◆ getAlive()

bool getAlive ( ESCIndicator esc)

Getter for alive var.

Parameters
escA pointer to the ESCIndicator structure.
Returns
If the sensor is alive (on)

Definition at line 8 of file ESCIndicator.c.

8 {
9 return esc->alive;
10}

◆ initECSIndicator()

void initECSIndicator ( ESCIndicator esc,
int  hz,
int  port 
)

Definition at line 3 of file ESCIndicator.c.

3 {
4 initDigitalSensor(&esc->base, "ESC Indicator", hz, port);
5 esc->alive = true;
6}
void initDigitalSensor(DigitalSensor *digitalsensor, const char *name, int hz, int port)
Initializes a digital sensor with the given parameters.
Definition: DigitalSensor.c:3
DigitalSensor base
Definition: ESCIndicator.h:8
Here is the call graph for this function: