Uncommenting of part that allow supercaps to charge up from the batteries

Dependencies:   mbed millis

Committer:
rwcjoliver
Date:
Fri Mar 13 11:48:04 2020 +0000
Revision:
0:4788e1df7b55
Child:
30:a04afea230fb
Uncommented RegenBRaking lines to allow capacitors to charge up from the batteries

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rwcjoliver 0:4788e1df7b55 1 #ifndef DEFINITIONS_H
rwcjoliver 0:4788e1df7b55 2 #define DEFINITIONS_H
rwcjoliver 0:4788e1df7b55 3
rwcjoliver 0:4788e1df7b55 4 #include <mbed.h>
rwcjoliver 0:4788e1df7b55 5
rwcjoliver 0:4788e1df7b55 6 extern Serial pc;
rwcjoliver 0:4788e1df7b55 7
rwcjoliver 0:4788e1df7b55 8 //// INTERRUPTS
rwcjoliver 0:4788e1df7b55 9 extern InterruptIn rtc_output;
rwcjoliver 0:4788e1df7b55 10 extern InterruptIn autoStopTrigger; //interrupt on lineside equipment detection
rwcjoliver 0:4788e1df7b55 11 extern InterruptIn hallSensor; // For Hall Sensor Tachometer
rwcjoliver 0:4788e1df7b55 12 //
rwcjoliver 0:4788e1df7b55 13
rwcjoliver 0:4788e1df7b55 14
rwcjoliver 0:4788e1df7b55 15 // PIN DEFINITIONS
rwcjoliver 0:4788e1df7b55 16
rwcjoliver 0:4788e1df7b55 17 // INNOVATION/ COLLISION DETECTION
rwcjoliver 0:4788e1df7b55 18 extern AnalogIn irSensor_1;
rwcjoliver 0:4788e1df7b55 19 extern AnalogIn irSensor_2;
rwcjoliver 0:4788e1df7b55 20 extern AnalogIn irSensor_3;
rwcjoliver 0:4788e1df7b55 21
rwcjoliver 0:4788e1df7b55 22 //RTC individual inputs//
rwcjoliver 0:4788e1df7b55 23 extern DigitalIn rtc_1;
rwcjoliver 0:4788e1df7b55 24 extern DigitalIn rtc_2;
rwcjoliver 0:4788e1df7b55 25 extern DigitalIn rtc_3;
rwcjoliver 0:4788e1df7b55 26 extern DigitalIn rtc_4;
rwcjoliver 0:4788e1df7b55 27 extern DigitalIn rtc_5;
rwcjoliver 0:4788e1df7b55 28 extern DigitalIn rtc_6;
rwcjoliver 0:4788e1df7b55 29 extern DigitalIn rtc_7;
rwcjoliver 0:4788e1df7b55 30 extern DigitalIn rtc_override;
rwcjoliver 0:4788e1df7b55 31
rwcjoliver 0:4788e1df7b55 32 // RTC Outputs
rwcjoliver 0:4788e1df7b55 33 extern DigitalOut rtc_Trigger;
rwcjoliver 0:4788e1df7b55 34
rwcjoliver 0:4788e1df7b55 35
rwcjoliver 0:4788e1df7b55 36 // Output LEDs
rwcjoliver 0:4788e1df7b55 37 //DigitalOut led_rtcOutput; // No need as RTC has led output
rwcjoliver 0:4788e1df7b55 38 //extern DigitalOut led_emergencyBrake;
rwcjoliver 0:4788e1df7b55 39 extern DigitalOut led_parkMode;
rwcjoliver 0:4788e1df7b55 40
rwcjoliver 0:4788e1df7b55 41
rwcjoliver 0:4788e1df7b55 42 //Motor outputs // ENSURE YOU USE DAC PINS - BOTH MOTORS SHARE PINS
rwcjoliver 0:4788e1df7b55 43 extern AnalogOut motorAccelerator;
rwcjoliver 0:4788e1df7b55 44 extern AnalogOut motorBrake;
rwcjoliver 0:4788e1df7b55 45
rwcjoliver 0:4788e1df7b55 46 //motor 1 settings
rwcjoliver 0:4788e1df7b55 47 extern DigitalOut keySwitchM1;
rwcjoliver 0:4788e1df7b55 48 extern DigitalOut directionFwd;
rwcjoliver 0:4788e1df7b55 49 extern DigitalOut directionRev;
rwcjoliver 0:4788e1df7b55 50 extern DigitalOut footswitchM1;
rwcjoliver 0:4788e1df7b55 51 extern DigitalOut seatM1;
rwcjoliver 0:4788e1df7b55 52 extern DigitalOut inchFwdM1;
rwcjoliver 0:4788e1df7b55 53 extern DigitalOut speedLimit2M1;
rwcjoliver 0:4788e1df7b55 54 extern DigitalOut speedLimit3M1;
rwcjoliver 0:4788e1df7b55 55
rwcjoliver 0:4788e1df7b55 56 //motor 2 settings;
rwcjoliver 0:4788e1df7b55 57 //extern DigitalOut keySwitchM2;
rwcjoliver 0:4788e1df7b55 58 //extern DigitalOut directionM2;
rwcjoliver 0:4788e1df7b55 59 //extern DigitalOut footswitchM2;
rwcjoliver 0:4788e1df7b55 60 //extern DigitalOut seatM2;
rwcjoliver 0:4788e1df7b55 61 //extern DigitalOut inchFwdM2;
rwcjoliver 0:4788e1df7b55 62 //extern DigitalOut speedLimit2M2;
rwcjoliver 0:4788e1df7b55 63 //extern DigitalOut speedLimit3M2;
rwcjoliver 0:4788e1df7b55 64
rwcjoliver 0:4788e1df7b55 65 // Power
rwcjoliver 0:4788e1df7b55 66 extern DigitalIn superCapVoltage;
rwcjoliver 0:4788e1df7b55 67 //extern DigitalIn batteryVoltage;
rwcjoliver 0:4788e1df7b55 68
rwcjoliver 0:4788e1df7b55 69 //Contactors as digital outputs
rwcjoliver 0:4788e1df7b55 70 extern DigitalOut contactBatt;
rwcjoliver 0:4788e1df7b55 71 extern DigitalOut contactCompressor;
rwcjoliver 0:4788e1df7b55 72 extern DigitalOut contactCapCharge;
rwcjoliver 0:4788e1df7b55 73
rwcjoliver 0:4788e1df7b55 74 //mechanical braking and other air components.
rwcjoliver 0:4788e1df7b55 75 extern DigitalOut brakeValve32;
rwcjoliver 0:4788e1df7b55 76 extern DigitalOut brakeValve22;
rwcjoliver 0:4788e1df7b55 77 extern DigitalOut whistleValve32;
rwcjoliver 0:4788e1df7b55 78
rwcjoliver 0:4788e1df7b55 79 extern DigitalIn pressureSwitch1;
rwcjoliver 0:4788e1df7b55 80 extern DigitalIn pressureSwitch2;
rwcjoliver 0:4788e1df7b55 81 extern DigitalIn pressureSwitch3;
rwcjoliver 0:4788e1df7b55 82 //extern DigitalIn brakePressure;
rwcjoliver 0:4788e1df7b55 83 extern DigitalIn mainlinePressure;
rwcjoliver 0:4788e1df7b55 84
rwcjoliver 0:4788e1df7b55 85 #endif