Kaarel Adamson / motor

Fork of motor by Karl Oskar Lember

Files at this revision

API Documentation at this revision

Comitter:
adamsonk
Date:
Tue Nov 15 14:08:11 2016 +0000
Parent:
0:910b46b1e4ae
Commit message:
15.11 t??tav variant

Changed in this revision

motor.cpp Show annotated file Show diff for this revision Revisions of this file
motor.h Show annotated file Show diff for this revision Revisions of this file
--- a/motor.cpp	Thu Oct 13 15:24:37 2016 +0000
+++ b/motor.cpp	Tue Nov 15 14:08:11 2016 +0000
@@ -210,7 +210,7 @@
     pwm_min = 25;
     intgrl = 0;
     //count = 0;
-    speed = 0;
+    speed = 50;
     err = 0;
 }
 
--- a/motor.h	Thu Oct 13 15:24:37 2016 +0000
+++ b/motor.h	Tue Nov 15 14:08:11 2016 +0000
@@ -27,7 +27,7 @@
     void forward(float pwm);
     void backward(float pwm);
 private:
-    static const unsigned int PWM_PERIOD_US = 1000;
+    static const unsigned int PWM_PERIOD_US = 20000;
 
     USBSerial *_pc;
     PwmOut *_pwm;