Railway Challenge / Mbed 2 deprecated challenge-ChaiUpdated-AutostopTest-30Throttle

Dependencies:   mbed millis

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers brakes.h Source File

brakes.h

00001 #include <mbed.h>
00002 #include "motor.h"
00003 #include "rtc.h"
00004 #include "definitions.h"
00005 class Brakes{ // Separate brakes class to implement friction and regen braking
00006     public:
00007     Brakes(); //default constructor
00008     
00009     void ParkMode(Motor motor); //Park Mode Definition
00010     void BrakesOn(); //Turns on Both Mechanical BRakes
00011     void FrontBrakeOn(); //Only turns on Front Mechanical Brake
00012     void RearBrakeOn(); // Only turns on Rear Mechanical Brake
00013     void MechanicalBraking(int brakeRate, Motor motor); //Mechanical Braking Function when train in operation
00014     void RegenControl(int ratecontrol, Motor motor); //Regen Function
00015     void EmergencyStop(Motor motor, RoundTrainCircuit rtc, bool emergencyStopActive);
00016     
00017     };
00018