PROJ515-MASTER-No-PWM
Dependencies: mbed mbed-rtos ShiftReg2 TextLCD
FEEDBACK/Feedback.hpp@4:020f93d35f6e, 2019-05-07 (annotated)
- Committer:
- thomasmorris
- Date:
- Tue May 07 21:55:57 2019 +0000
- Revision:
- 4:020f93d35f6e
Added mutex and safey coding needs more. Added board and serial functions that need testing. As well as a more thorough post function.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 4:020f93d35f6e | 1 | #ifndef _FEEDBACK_HPP_ |
thomasmorris | 4:020f93d35f6e | 2 | #define _FEEDBACK_HPP_ |
thomasmorris | 4:020f93d35f6e | 3 | |
thomasmorris | 4:020f93d35f6e | 4 | #include "mbed.h" |
thomasmorris | 4:020f93d35f6e | 5 | #include "rtos.h" |
thomasmorris | 4:020f93d35f6e | 6 | |
thomasmorris | 4:020f93d35f6e | 7 | //Libraries and header file includes |
thomasmorris | 4:020f93d35f6e | 8 | |
thomasmorris | 4:020f93d35f6e | 9 | |
thomasmorris | 4:020f93d35f6e | 10 | class FEEDBACK |
thomasmorris | 4:020f93d35f6e | 11 | { |
thomasmorris | 4:020f93d35f6e | 12 | public://Public member functions and variables |
thomasmorris | 4:020f93d35f6e | 13 | |
thomasmorris | 4:020f93d35f6e | 14 | FEEDBACK(PinName N1, PinName N2, PinName N3, PinName N4, PinName N5, PinName N6, PinName N7, PinName N8, PinName N9, PinName N10); |
thomasmorris | 4:020f93d35f6e | 15 | ~FEEDBACK(); |
thomasmorris | 4:020f93d35f6e | 16 | void Init(); |
thomasmorris | 4:020f93d35f6e | 17 | int Post(); |
thomasmorris | 4:020f93d35f6e | 18 | //Public Functions |
thomasmorris | 4:020f93d35f6e | 19 | |
thomasmorris | 4:020f93d35f6e | 20 | |
thomasmorris | 4:020f93d35f6e | 21 | //Getters |
thomasmorris | 4:020f93d35f6e | 22 | float Get_Battery_Measurement_Value();//Return the batter measurement value |
thomasmorris | 4:020f93d35f6e | 23 | float Get_Temp_1_Value();//Return the temperature value 1 |
thomasmorris | 4:020f93d35f6e | 24 | float Get_Temp_2_Value();//Return the temperature value 2 |
thomasmorris | 4:020f93d35f6e | 25 | float Get_Temp_3_Value();//Return the temperature value 3 |
thomasmorris | 4:020f93d35f6e | 26 | float Get_Feedback_1_Value();//Return the feedback value 1 |
thomasmorris | 4:020f93d35f6e | 27 | float Get_Feedback_2_Value();//Return the feedback value 2 |
thomasmorris | 4:020f93d35f6e | 28 | float Get_Feedback_3_Value();//Return the feedback value 3 |
thomasmorris | 4:020f93d35f6e | 29 | float Get_Feedback_4_Value();//Return the feedback value 4 |
thomasmorris | 4:020f93d35f6e | 30 | float Get_Feedback_5_Value();//Return the feedback value 5 |
thomasmorris | 4:020f93d35f6e | 31 | float Get_Feedback_6_Value();//Return the feedback value 6 |
thomasmorris | 4:020f93d35f6e | 32 | |
thomasmorris | 4:020f93d35f6e | 33 | |
thomasmorris | 4:020f93d35f6e | 34 | private://Private member functions and variables |
thomasmorris | 4:020f93d35f6e | 35 | |
thomasmorris | 4:020f93d35f6e | 36 | //Private Functions |
thomasmorris | 4:020f93d35f6e | 37 | |
thomasmorris | 4:020f93d35f6e | 38 | //Private GPIO connections |
thomasmorris | 4:020f93d35f6e | 39 | //Measurement These set the values |
thomasmorris | 4:020f93d35f6e | 40 | AnalogIn _Battery_Measurement; |
thomasmorris | 4:020f93d35f6e | 41 | AnalogIn _Temperature_Sensor_1; |
thomasmorris | 4:020f93d35f6e | 42 | AnalogIn _Temperature_Sensor_2; |
thomasmorris | 4:020f93d35f6e | 43 | AnalogIn _Temperature_Sensor_3; |
thomasmorris | 4:020f93d35f6e | 44 | AnalogIn _Feedback_Sensor_1; |
thomasmorris | 4:020f93d35f6e | 45 | AnalogIn _Feedback_Sensor_2; |
thomasmorris | 4:020f93d35f6e | 46 | AnalogIn _Feedback_Sensor_3; |
thomasmorris | 4:020f93d35f6e | 47 | AnalogIn _Feedback_Sensor_4; |
thomasmorris | 4:020f93d35f6e | 48 | AnalogIn _Feedback_Sensor_5; |
thomasmorris | 4:020f93d35f6e | 49 | AnalogIn _Feedback_Sensor_6; |
thomasmorris | 4:020f93d35f6e | 50 | //Private member variables |
thomasmorris | 4:020f93d35f6e | 51 | |
thomasmorris | 4:020f93d35f6e | 52 | float _Battery_Measurement_Value;//Value of the battery measurement circuit |
thomasmorris | 4:020f93d35f6e | 53 | float _Temp_1_Value; //Temperature sensor feedback 1 |
thomasmorris | 4:020f93d35f6e | 54 | float _Temp_2_Value; //Temperature sensor feedback 2 |
thomasmorris | 4:020f93d35f6e | 55 | float _Temp_3_Value; //Temperature sensor feedback 3 |
thomasmorris | 4:020f93d35f6e | 56 | float _Feedback_1_Value;//Feedback sensor 1 |
thomasmorris | 4:020f93d35f6e | 57 | float _Feedback_2_Value;//Feedback sensor 2 |
thomasmorris | 4:020f93d35f6e | 58 | float _Feedback_3_Value;//Feedback sensor 3 |
thomasmorris | 4:020f93d35f6e | 59 | float _Feedback_4_Value;//Feedback sensor 4 |
thomasmorris | 4:020f93d35f6e | 60 | float _Feedback_5_Value;//Feedback sensor 5 |
thomasmorris | 4:020f93d35f6e | 61 | float _Feedback_6_Value;//Feedback sensor 6 |
thomasmorris | 4:020f93d35f6e | 62 | |
thomasmorris | 4:020f93d35f6e | 63 | //Mutex Locks |
thomasmorris | 4:020f93d35f6e | 64 | Mutex _Battery_Measurement_Value_Mutex;//Value of the battery measurement circuit mutex lock |
thomasmorris | 4:020f93d35f6e | 65 | Mutex _Temp_1_Value_Mutex; //Temperature sensor feedback 1 mutex lock |
thomasmorris | 4:020f93d35f6e | 66 | Mutex _Temp_2_Value_Mutex; //Temperature sensor feedback 2 mutex lock |
thomasmorris | 4:020f93d35f6e | 67 | Mutex _Temp_3_Value_Mutex; //Temperature sensor feedback 3 mutex lock |
thomasmorris | 4:020f93d35f6e | 68 | Mutex _Feedback_1_Value_Mutex;//Feedback sensor 1 mutex lock |
thomasmorris | 4:020f93d35f6e | 69 | Mutex _Feedback_2_Value_Mutex;//Feedback sensor 2 mutex lock |
thomasmorris | 4:020f93d35f6e | 70 | Mutex _Feedback_3_Value_Mutex;//Feedback sensor 3 mutex lock |
thomasmorris | 4:020f93d35f6e | 71 | Mutex _Feedback_4_Value_Mutex;//Feedback sensor 4 mutex lock |
thomasmorris | 4:020f93d35f6e | 72 | Mutex _Feedback_5_Value_Mutex;//Feedback sensor 5 mutex lock |
thomasmorris | 4:020f93d35f6e | 73 | Mutex _Feedback_6_Value_Mutex;//Feedback sensor 6 mutex lock |
thomasmorris | 4:020f93d35f6e | 74 | }; |
thomasmorris | 4:020f93d35f6e | 75 | #endif //_FEEDBACK_ |