Init

Dependencies:   Break Motor Communication Steering mbed Controller

Committer:
skrickl
Date:
Thu Jul 13 13:45:55 2017 +0000
Revision:
1:2538cbbea1f8
bla

Who changed what in which revision?

UserRevisionLine numberNew contents of line
skrickl 1:2538cbbea1f8 1 /create instances
skrickl 1:2538cbbea1f8 2 //Controller controller;
skrickl 1:2538cbbea1f8 3 //controller_timer.attach(&timer_interrupt_controller, 0.1);
skrickl 1:2538cbbea1f8 4 //MbedToPC test(p9, p10, 115200);
skrickl 1:2538cbbea1f8 5 //MotorController test1(p28, p27, 115200);
skrickl 1:2538cbbea1f8 6 //test.enableInterrupt();
skrickl 1:2538cbbea1f8 7 //test.writeLine("Hello World");
skrickl 1:2538cbbea1f8 8
skrickl 1:2538cbbea1f8 9 //test1.writeLine("help");
skrickl 1:2538cbbea1f8 10 //initMotorController();
skrickl 1:2538cbbea1f8 11
skrickl 1:2538cbbea1f8 12 //test.writeLine("hallo welt");
skrickl 1:2538cbbea1f8 13 //test1.writeWord("status_start\r\n");
skrickl 1:2538cbbea1f8 14
skrickl 1:2538cbbea1f8 15 /*SerialController com(p9, p10, p28, p27, 115200);
skrickl 1:2538cbbea1f8 16
skrickl 1:2538cbbea1f8 17
skrickl 1:2538cbbea1f8 18 led3 = 1;
skrickl 1:2538cbbea1f8 19 com.getMotorControllerReady();
skrickl 1:2538cbbea1f8 20 led3 = 0;
skrickl 1:2538cbbea1f8 21
skrickl 1:2538cbbea1f8 22 com.enableInterrupt();
skrickl 1:2538cbbea1f8 23 com.startStatus();
skrickl 1:2538cbbea1f8 24
skrickl 1:2538cbbea1f8 25 //com.init();
skrickl 1:2538cbbea1f8 26
skrickl 1:2538cbbea1f8 27 string line;
skrickl 1:2538cbbea1f8 28
skrickl 1:2538cbbea1f8 29
skrickl 1:2538cbbea1f8 30 led1 = 1;
skrickl 1:2538cbbea1f8 31 led2 = 1;
skrickl 1:2538cbbea1f8 32
skrickl 1:2538cbbea1f8 33 wait(1);
skrickl 1:2538cbbea1f8 34 //led2 = 0;
skrickl 1:2538cbbea1f8 35
skrickl 1:2538cbbea1f8 36 while (1)
skrickl 1:2538cbbea1f8 37 {
skrickl 1:2538cbbea1f8 38
skrickl 1:2538cbbea1f8 39
skrickl 1:2538cbbea1f8 40 /*led3 = 1;
skrickl 1:2538cbbea1f8 41 line = test1.readLine();
skrickl 1:2538cbbea1f8 42
skrickl 1:2538cbbea1f8 43 wait(0.5);
skrickl 1:2538cbbea1f8 44 led3 = 0;
skrickl 1:2538cbbea1f8 45 led2 = 1;
skrickl 1:2538cbbea1f8 46 test.writeLine(line);*/
skrickl 1:2538cbbea1f8 47
skrickl 1:2538cbbea1f8 48
skrickl 1:2538cbbea1f8 49
skrickl 1:2538cbbea1f8 50
skrickl 1:2538cbbea1f8 51 //string line = test1.readLine();
skrickl 1:2538cbbea1f8 52
skrickl 1:2538cbbea1f8 53 //test.writeLine(line);
skrickl 1:2538cbbea1f8 54 /*Test.writeLine("Test read char");
skrickl 1:2538cbbea1f8 55 char word[1];
skrickl 1:2538cbbea1f8 56 word[0] = Test.readChar();
skrickl 1:2538cbbea1f8 57 Test.writeLine(word);*/
skrickl 1:2538cbbea1f8 58 /*Test.writeLine("Test read line");
skrickl 1:2538cbbea1f8 59 string line = Test.readLine();*/
skrickl 1:2538cbbea1f8 60 /*std::size_t found = myLine.find("stop");
skrickl 1:2538cbbea1f8 61 if (found!=std::string::npos)
skrickl 1:2538cbbea1f8 62 {
skrickl 1:2538cbbea1f8 63 Test.disableInterrupt();
skrickl 1:2538cbbea1f8 64 myLine = "ended!!";
skrickl 1:2538cbbea1f8 65 }
skrickl 1:2538cbbea1f8 66 Test.writeLine(myLine);*/
skrickl 1:2538cbbea1f8 67
skrickl 1:2538cbbea1f8 68
skrickl 1:2538cbbea1f8 69 //led1 = !led1;
skrickl 1:2538cbbea1f8 70 //led2 = !led2;
skrickl 1:2538cbbea1f8 71
skrickl 1:2538cbbea1f8 72
skrickl 1:2538cbbea1f8 73 /* wait(1);
skrickl 1:2538cbbea1f8 74 led1 = !led1;
skrickl 1:2538cbbea1f8 75 led2 = !led2;
skrickl 1:2538cbbea1f8 76 }*/