1#ifndef RENSSELAERMOTORSPORT_BRAKE_SYSTEM_CONTROL_H
2#define RENSSELAERMOTORSPORT_BRAKE_SYSTEM_CONTROL_H
4#include "../ControllerSystem.h"
5#include "../../Sensors/AnalogSensors/BrakePressure.h"
6#include "../../Sensors/AnalogSensors/Temperature.h"
void initBrakeSystemControl(BrakeSystemControl *bsc, int hz, int maxTemp, int brakeLightActivationPoint, int heavyBrakingActivationPoint, int fbp_channel, int rbp_channel, int temp_channel)
Initializes the Braking System with initial settings.
void activateBrakeLight(BrakeSystemControl *bsc)
Checks whether the line pressure is higher than the activation point specified by the user.
void setFrontPressure(BrakeSystemControl *bsc, float pressure)
void setTemperature(BrakeSystemControl *bsc, float temperature)
void setRearPressure(BrakeSystemControl *bsc, float pressure)
int brakeSafteyCheck(void *bsc)
Checks the saftey of the braking system.
void inHeavyBreaking(BrakeSystemControl *bsc)
Checks whether the line pressure is higher than the activation point specified by the user.
void setSensorReadings(BrakeSystemControl *bsc, float frontPressure, float rearPressure, float temperaure)
Updates BrakeSystemStatus with current sensor data.
@ TEMPERATURE_SENSOR_ERROR
BrakeSystemStatus checkSensorLimits(BrakeSystemControl *bsc)
Checks if the brake system is within the defined limits and desired ranges.
BrakePressure * rearPressure
Temperature * temperature
BrakePressure * frontPressure
int heavyBrakingActivationPoint
int maxTemperatureAllowed
int brakeLightActivationPoint