DCS_TEAM / Mbed 2 deprecated Chemical_Sensor_DMA

Dependencies:   mbed

Dependents:   DCS_FINAL_CODE

Fork of Chemical_Sensor_DMA by Jared Baxter

Revision:
6:63de50ac29be
Parent:
5:1b2dc43e8947
Child:
7:af255a90505e
--- a/MotorControl.cpp	Fri Nov 06 19:28:49 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-#include "MotorControl.h"
-#include "mbed.h"
-
-// constructor 
-MotorControl::MotorControl(PinName cw, PinName ccw, int period, int safetyPeriod) :  
-        _cw(cw),
-        _ccw(ccw) {
-    
-    // turn motor off
-    _cw = 0;
-    _ccw = 0;
-    
-    _cw.period_us(period);
-    _ccw.period_us(period);
-    
-    _period = period;
-    _safetyPeriod = safetyPeriod;
-}
-
-void MotorControl::off() {
-    _cw = 0;
-    _ccw = 0;    
-    pause_us(_safetyPeriod);
-}
-
-void MotorControl::clockwise(float dutyCycle) {
-    _cw = dutyCycle;
-}
-
-void MotorControl::releaseMallet() {
-    // make sure motor is off
-    off();
-    
-    // pulse clockwise to release mallet
-    _cw = 1;
-    pause_ms(10);
-    _cw = 0;
-    pause_ms(75);
-    
-    // pulse counter-clockwise to stop snail cam
-    _ccw = 0.7;
-    pause_ms(8);
-    _ccw = 0;
-    
-    // make sure motor is off
-    off();
-}
-
-void MotorControl::reset() {
-    
-}
-
-void MotorControl::hardReset(int duration) {
-    // make sure motor is off
-    off();
-    
-    // long pulse clockwise to reset mallet
-    _cw = 1;
-    pause_ms(200);
-    _cw = 0;
-    
-    // short pulse counter-clockwise to stop snail cam
-    _ccw = 1;
-    pause_ms(10);
-    _ccw = 0;
-    
-    
-    wait_ms(duration);
-    // short pulse counter-clockwise to set snail cam in groove on mallet
-    _ccw = 1;
-    pause_ms(3);
-    _ccw = 0;
-    
-    // make sure motor is off
-    off();
-}
\ No newline at end of file