- This code combines steering and driving in one ticker - Fault check is in a ticker instead of while loop

Dependencies:   mbed MMA8451Q

Files at this revision

API Documentation at this revision

Comitter:
aalawfi
Date:
Mon Oct 25 17:39:23 2021 +0000
Parent:
8:e4a147850ba4
Commit message:
- fixed some bugs

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Oct 25 17:36:50 2021 +0000
+++ b/main.cpp	Mon Oct 25 17:39:23 2021 +0000
@@ -21,11 +21,11 @@
 Timer t;
 void PID (void) {
     PI();
-    steering_contorl();
+    steering_control();
     };
 int main() { 
     state_update();
-    controlUpdate(&PID, TI);
+    controlUpdate.attach(&PID, TI);
     fault_detector.attach(&fault_check, 0.02);
     //Delcare Onboard LED with blue color
     DigitalOut led_b(LED_BLUE);