Testing 1 blue pill
Dependencies: mbed mbed-rtos TextLCD
Diff: Interface/Interface.hpp
- Revision:
- 29:f3b1387c81f1
- Parent:
- 28:3193157ebb0c
- Child:
- 30:a35f0ab97a65
diff -r 3193157ebb0c -r f3b1387c81f1 Interface/Interface.hpp --- a/Interface/Interface.hpp Mon Mar 11 14:19:26 2019 +0000 +++ b/Interface/Interface.hpp Wed Mar 13 11:34:39 2019 +0000 @@ -4,9 +4,6 @@ #include "mbed.h" #include "STEPPER_MOTOR.hpp" //Include this to use the stepper motor -#define Type_of_Rig 2 //Place 2 for coiling place 3 for twisting -#define Default_Coiling_Turns 80 -#define Default_Twisting_Turns 20 //Digital In for the button control to the interface static DigitalIn button_up(D8); //D8//Increment Button @@ -33,7 +30,7 @@ INTERFACE(); //Constructor ~INTERFACE();//Destructor - void Interface_Init();//Set all values to 0 + void Interface_Init(int turns, int type_of_rig);//Set all values to 0 bar the passed in variable void Up();//Up Routine void Down();//Down Routine void Start_Stop();//Start / Stop Routine @@ -58,6 +55,7 @@ void Set_Off_Time(int Off_Time); void Set_Duty_Cycle(int Duty_Cycle); void Set_Power_Time(float Power_Time); + void Set_Direction(bool Direction); //Getters to receive private information int Get_System_Running(); @@ -76,6 +74,7 @@ int Get_Off_Time(); int Get_Duty_Cycle(); int Get_Power_Time(); + bool Get_Direction(); private: //Private member variables to prevent them being accessed externally @@ -101,8 +100,9 @@ int _Off_Time;//IN SECONDS int _Duty_Cycle; int _Power_Time; - - + bool _Direction; + int _Type_of_Rig; + //Mutex Locks Mutex _System_Running_mutex; Mutex _No_Of_Rotations_mutex; @@ -125,5 +125,7 @@ Mutex Led_Select_Left_mutex; Mutex Led_Select_Right_mutex; Mutex Led_Power_mutex; + Mutex _Direction_mutex; + Mutex _Type_of_Rig_mutex; }; #endif//INTERFACE_HPP \ No newline at end of file