My final year project
Dependencies: BSP_DISCO_F746NG F746_GUI LCD_DISCO_F746NG SDFileSystem TS_DISCO_F746NG ResistiveTouchController Map CYS8218Controller MedianFilter
Diff: main.cpp
- Revision:
- 17:3b6d66253c97
- Parent:
- 15:bc63b55a426d
- Child:
- 18:1b9579ac9f41
--- a/main.cpp Sun Oct 02 10:17:55 2016 +0000 +++ b/main.cpp Sun Oct 02 10:43:13 2016 +0000 @@ -16,22 +16,24 @@ float zeroAlpha = 0; float alpha = 0; -float xSP = 0; +float xSP = -20; float x = 0; float zeroBeta = 0; float beta = 0; -float ySP = 0; +float ySP = 50; float y = 0; int Ts = 0; -bool started = false; +bool started = true; -int ballOnPlate = 0; +int ballOnPlate = 1; bool saved = false; +// TODO Delete these variables +float t = 0; Serial pc(USBTX,USBRX); int main() @@ -84,13 +86,13 @@ } activeScreen->Draw(); + Thread::wait(200); currentScreen = nextScreen; - Thread::wait(200); } activeScreen->Process(); - Thread::wait(20); + Thread::wait(10); } } @@ -125,6 +127,8 @@ void Automatic() { //TODO Add automatic control mode logic - - + x = 160*sin(20*3.14*t); + y = 130*cos(20*3.14*t++); + Ts++; + Thread::wait(4); }