STM32F302R8 with Konrad's inverter boards for senior design.
Fork of Blue_Board_Ticker by
Diff: main.cpp
- Revision:
- 13:08c700d71324
- Parent:
- 12:d34b96d7f997
- Child:
- 14:0f50e85bd463
--- a/main.cpp Wed Apr 13 17:59:31 2016 +0000 +++ b/main.cpp Wed Apr 13 18:34:26 2016 +0000 @@ -104,27 +104,33 @@ //check where we start if(h1 == 0 && h2 == 1 && h3 == 1) //state1 { - Brise(); +// Brise(); + Afall(); } else if(h1 == 0 && h2 == 0 && h3 == 1) //state2 { - Afall(); +// Afall(); + Crise(); } else if(h1 == 1 && h2 == 0 && h3 == 1) //state3 { - Crise(); +// Crise(); + Bfall(); } else if(h1 == 1 && h2 == 0 && h3 == 0) //state4 { - Bfall(); +// Bfall(); + Arise(); } else if(h1 == 1 && h2 == 1 && h3 == 0) //state5 { - Arise(); +// Arise(); + Cfall(); } else //(h1 == 0 && h2 == 1 && h3 == 0)state6 { - Cfall(); +// Cfall(); + Brise(); } } @@ -192,7 +198,7 @@ // hallC.fall(&Cfall); // hallC.rise(&Crise); - spinTicker.attach_us(&jumpStart, 100); + spinTicker.attach_us(&jumpStart, 50); float ADCSum = 0;; int ADCCount = 0; while(1) {