Simple motor controller library, using DIR, PWM, nSLP pin like pololu.

Branch:
use_base
Revision:
9:a5d6835f7168
Parent:
8:ad953e0e3c0f
Child:
10:4413d4830297
--- a/MotorControler.cpp	Sat Feb 20 08:05:15 2021 +0000
+++ b/MotorControler.cpp	Sun Feb 21 09:23:01 2021 +0000
@@ -1,17 +1,13 @@
 #include "MotorControler.h"
 
-MotorControler::MotorControler(PinName DIR, PinName PWM, PinName nSLP, DriverType md_type, ControlType control_type) : DIR_(DIR), PWM_(PWM), nSLP_(nSLP)
+
+
+MotorControler::MotorControler(PinName DIR, PinName PWM, PinName nSLP, ControlType control_type) : DIR_(DIR), PWM_(PWM), nSLP_(nSLP)
 {
     disableDriver();
     reverse_direction_ = 0;
     current_speed_ = 0;
-    md_type_ = md_type;
     control_type_ = control_type;
-    
-    if(md_type_ == TEXNITIS)
-    {
-        nSLP_ = 0;
-    }
 }
 
 float MotorControler::operator = (float speed) {
@@ -55,25 +51,6 @@
     return current_speed_;
 }
 
-void MotorControler::enableDriver()
-{
-    if(md_type_ == POLOLU)
-    {
-        nSLP_ = 1;
-    }
-    else if(md_type_ == TEXNITIS)
-    {
-        // do nothing;
-    }
-}
-
-void MotorControler::disableDriver()
-{
-    if(md_type_ == POLOLU)
-        nSLP_ = 0;
-    else if(md_type_ == TEXNITIS)
-        PWM_ = 0;
-}
 
 void MotorControler::setSpeed(float speed)
 {