ManualControl

Dependencies:   TPixy-Interface

Fork of MbedOS_Robot by ECE4333 - 2018 - Ahmed & Brandon

Revision:
8:a0890fa79084
Parent:
7:73fd05fe556a
Child:
9:fe56b888985c
--- a/PiControlThread.cpp	Thu Feb 15 01:15:26 2018 +0000
+++ b/PiControlThread.cpp	Mon Feb 19 17:42:33 2018 +0000
@@ -1,3 +1,18 @@
+/******************************************************************************/
+// ECE4333
+// LAB Partner 1: Ahmed Sobhy - ID: 3594449
+// LAB Partner 2: Brandon Kingman - ID: 3470444
+// Project: Autonomous Robot Design
+// Instructor: Prof. Chris Diduch
+/******************************************************************************/
+// filename: PiControlThread.cpp
+// file content description:
+//      * Function to Create the PiControl Thread
+//      * PiControl Thread
+//      * PiControl ISR
+//      * Variables related to the functionality of the thread
+/******************************************************************************/
+
 #include "mbed.h"
 #include "ui.h"
 #include "Drivers/motor_driver.h"
@@ -12,6 +27,8 @@
 int vel;
 int32_t U;
 
+int time_passed = 0;
+
 void PiControlThread(void const *);
 void PeriodicInterruptISR(void);
 
@@ -70,6 +87,8 @@
     {
         osSignalWait(0x01, osWaitForever); // Go to sleep until signal, SignalPi, is received.
         
+        time_passed++;
+        
         // get incremental position and time from QEI
         DE0_read(&ID, &dPosition, &dTime);
         SaturateValue(dPosition, 560);