Pacemaker code Implementation for SFWRENG 3K04

Dependencies:   mbed Queue mbed-rtos FXOS8700Q

Fork of Pacemaker by Eric dollar

SWFRENG 3K04 Project to design, develop, and document a functional pacemaker.

The project uses the Freescale K64F Microcontroller and C++ mbed library.

Revision:
34:701503855d52
Parent:
33:686a1a0c690f
Child:
36:b6431cd8ecd6
diff -r 686a1a0c690f -r 701503855d52 pulse.cpp
--- a/pulse.cpp	Mon Dec 12 03:31:55 2016 +0000
+++ b/pulse.cpp	Tue Dec 13 03:46:34 2016 +0000
@@ -113,7 +113,7 @@
     wait_ms(10);
     
     /* Stage 4: Ground OFF */
-    atr_grnd_ctrl .write(0);
+    atr_grnd_ctrl.write(0);
     vent_grnd_ctrl.write(0);
 }
 
@@ -156,7 +156,7 @@
     vent_pace_ctrl.write(1);
     
     // Pace Duration
-    Thread::wait(pulse_width_us);
+    wait(pulse_width_us);
     
     // Shut off Pace
     vent_pace_ctrl.write(0);
@@ -168,10 +168,10 @@
     atr_pace_prime();
 
     // Begin Pace Event Output
-    atr_pace_ctrl.write(myChamber->getPaceAmp());
+    atr_pace_ctrl.write(1);
     
     // Pace Duration
-    Thread::wait(pulse_width_us);
+    wait(pulse_width_us);
     
     // Shut off Pace
     atr_pace_ctrl.write(0);
@@ -184,7 +184,7 @@
     pulse::pace_charge_shutdown();
     char a = myChamber->getChamberType();
     if(a == 'a'){
-        pulse::pace_vent(myChamber->getPaceWidth());
+        pulse::pace_atr(myChamber->getPaceWidth());
     }
     else{
         pulse::pace_vent(myChamber->getPaceWidth());