Proj 324 Final

Fork of ELEC351_Group_T by Plymouth ELEC351 Group T

Committer:
thomasmorris
Date:
Wed Aug 15 21:34:59 2018 +0000
Revision:
57:aba1296e51b1
Parent:
Moves.cpp@56:bc5345bc6650
Final Version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thomasmorris 56:bc5345bc6650 1 //This is where the algorithms movements will be defined
thomasmorris 57:aba1296e51b1 2 #include "MOVES.hpp"
thomasmorris 56:bc5345bc6650 3
thomasmorris 56:bc5345bc6650 4 int side = 0; //Sides
thomasmorris 57:aba1296e51b1 5 void List_Execution()
thomasmorris 57:aba1296e51b1 6 {
thomasmorris 57:aba1296e51b1 7 pc.printf("Move point value is : %d\n",Move_list_pointer);
thomasmorris 57:aba1296e51b1 8 for(int i = 0; i<= Move_list_pointer; i += 1)
thomasmorris 57:aba1296e51b1 9 {
thomasmorris 57:aba1296e51b1 10 if(Move_list[i] == 0){pc.printf("Move List Finished\n");}
thomasmorris 57:aba1296e51b1 11 else if (Move_list[i] == 1){STEPPER_MOTOR_1.Rotate_Steps(50 ,1);}
thomasmorris 57:aba1296e51b1 12 else if (Move_list[i] == 2){STEPPER_MOTOR_1.Rotate_Steps(50 ,0);}
thomasmorris 57:aba1296e51b1 13 else if (Move_list[i] == 3){STEPPER_MOTOR_2.Rotate_Steps(50 ,1);}
thomasmorris 57:aba1296e51b1 14 else if (Move_list[i] == 4){STEPPER_MOTOR_2.Rotate_Steps(50 ,0);}
thomasmorris 57:aba1296e51b1 15 else if (Move_list[i] == 5){STEPPER_MOTOR_3.Rotate_Steps(50 ,1);}
thomasmorris 57:aba1296e51b1 16 else if (Move_list[i] == 6){STEPPER_MOTOR_3.Rotate_Steps(50 ,0);}
thomasmorris 57:aba1296e51b1 17 else if (Move_list[i] == 7){STEPPER_MOTOR_4.Rotate_Steps(50 ,1);}
thomasmorris 57:aba1296e51b1 18 else if (Move_list[i] == 8){STEPPER_MOTOR_4.Rotate_Steps(50 ,0);}
thomasmorris 57:aba1296e51b1 19 else if (Move_list[i] == 9){STEPPER_MOTOR_5.Rotate_Steps(50 ,1);}
thomasmorris 57:aba1296e51b1 20 else if (Move_list[i] == 10){STEPPER_MOTOR_5.Rotate_Steps(50 ,0);}
thomasmorris 57:aba1296e51b1 21 else if (Move_list[i] == 11){STEPPER_MOTOR_6.Rotate_Steps(50 ,1);}
thomasmorris 57:aba1296e51b1 22 else if (Move_list[i] == 12){STEPPER_MOTOR_6.Rotate_Steps(50 ,0);}
thomasmorris 57:aba1296e51b1 23 else pc.printf("Finished\n");
thomasmorris 57:aba1296e51b1 24 }
thomasmorris 57:aba1296e51b1 25 pc.printf("List Run sucessful\n");
thomasmorris 57:aba1296e51b1 26 }
thomasmorris 56:bc5345bc6650 27 void White_Cross()
thomasmorris 56:bc5345bc6650 28 {
thomasmorris 56:bc5345bc6650 29
thomasmorris 56:bc5345bc6650 30 }
thomasmorris 56:bc5345bc6650 31
thomasmorris 56:bc5345bc6650 32
thomasmorris 56:bc5345bc6650 33 void White_Cross_Position()
thomasmorris 56:bc5345bc6650 34 {
thomasmorris 56:bc5345bc6650 35 if(CubeMap[1][0][1] == White )//Top middle
thomasmorris 56:bc5345bc6650 36 {
thomasmorris 56:bc5345bc6650 37 //rotate 180
thomasmorris 56:bc5345bc6650 38 }
thomasmorris 56:bc5345bc6650 39 if(CubeMap[1][1][0] == White )//Middle Left
thomasmorris 56:bc5345bc6650 40 {
thomasmorris 56:bc5345bc6650 41 //rotate 90
thomasmorris 56:bc5345bc6650 42 }
thomasmorris 56:bc5345bc6650 43 if(CubeMap[1][1][2] == White )//Middle Right
thomasmorris 56:bc5345bc6650 44 {
thomasmorris 56:bc5345bc6650 45 //rotate 0
thomasmorris 56:bc5345bc6650 46 }
thomasmorris 56:bc5345bc6650 47 if(CubeMap[1][2][1] == White )//Bottom Middle
thomasmorris 56:bc5345bc6650 48 {
thomasmorris 56:bc5345bc6650 49 //rotate 270
thomasmorris 56:bc5345bc6650 50 }
thomasmorris 56:bc5345bc6650 51 }
thomasmorris 56:bc5345bc6650 52 void White_Cross_Orientate()
thomasmorris 56:bc5345bc6650 53 {
thomasmorris 56:bc5345bc6650 54
thomasmorris 56:bc5345bc6650 55 }
thomasmorris 56:bc5345bc6650 56 void White_Centre_Swap()
thomasmorris 56:bc5345bc6650 57 {
thomasmorris 56:bc5345bc6650 58
thomasmorris 56:bc5345bc6650 59 }
thomasmorris 56:bc5345bc6650 60
thomasmorris 56:bc5345bc6650 61 void White_Corners()
thomasmorris 56:bc5345bc6650 62 {
thomasmorris 56:bc5345bc6650 63
thomasmorris 56:bc5345bc6650 64 }
thomasmorris 56:bc5345bc6650 65 void Middle_Layer()
thomasmorris 56:bc5345bc6650 66 {
thomasmorris 56:bc5345bc6650 67
thomasmorris 56:bc5345bc6650 68 }
thomasmorris 56:bc5345bc6650 69 void Top_Cross()
thomasmorris 56:bc5345bc6650 70 {
thomasmorris 56:bc5345bc6650 71
thomasmorris 56:bc5345bc6650 72 }
thomasmorris 56:bc5345bc6650 73 void Top_Layer()
thomasmorris 56:bc5345bc6650 74 {
thomasmorris 56:bc5345bc6650 75
thomasmorris 56:bc5345bc6650 76 }
thomasmorris 56:bc5345bc6650 77 void Corner_Positioning()
thomasmorris 56:bc5345bc6650 78 {
thomasmorris 56:bc5345bc6650 79
thomasmorris 56:bc5345bc6650 80 }
thomasmorris 56:bc5345bc6650 81 void Edge_Orientation()
thomasmorris 56:bc5345bc6650 82 {
thomasmorris 56:bc5345bc6650 83
thomasmorris 56:bc5345bc6650 84 }