Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: millis
Diff: brakes.h
- Revision:
- 30:c65bf90e8f47
- Parent:
- 28:1086791972d0
--- a/brakes.h Wed Jun 15 13:38:05 2022 +0000 +++ b/brakes.h Wed Jun 15 15:27:54 2022 +0000 @@ -1,15 +1,18 @@ #include <mbed.h> #include "motor.h" +#include "rtc.h" #include "definitions.h" -class Brakes{ +class Brakes{ // Separate brakes class to implement friction and regen braking public: - Brakes(); + Brakes(); //default constructor - void ParkMode(); - void BrakesOn(); - void FrontBrakeOn(); - void RearBrakeOn(); - void MechanicalBraking(int brakeRate, Motor motor); - void RegenControl(int ratecontrol, Motor motor); + void ParkMode(Motor motor); //Park Mode Definition + void BrakesOn(); //Turns on Both Mechanical BRakes + void FrontBrakeOn(); //Only turns on Front Mechanical Brake + void RearBrakeOn(); // Only turns on Rear Mechanical Brake + void MechanicalBraking(int brakeRate, Motor motor); //Mechanical Braking Function when train in operation + void RegenControl(int ratecontrol, Motor motor); //Regen Function + void EmergencyStop(Motor motor, RoundTrainCircuit rtc, bool emergencyStopActive); + }; \ No newline at end of file