AES-2015 / Mbed 2 deprecated Finalrobot

Dependencies:   mbed-rtos mbed

Committer:
BAC
Date:
Mon Dec 14 15:03:32 2015 +0000
Revision:
0:f15aa1706e16
bacon & tum

Who changed what in which revision?

UserRevisionLine numberNew contents of line
BAC 0:f15aa1706e16 1 #include "mbed.h"
BAC 0:f15aa1706e16 2
BAC 0:f15aa1706e16 3 class MotorDriver {
BAC 0:f15aa1706e16 4 private:
BAC 0:f15aa1706e16 5 unsigned int D1,D2,D3;
BAC 0:f15aa1706e16 6 unsigned int du1[500],du2[500],du3[500];
BAC 0:f15aa1706e16 7 public:
BAC 0:f15aa1706e16 8 PwmOut M1;
BAC 0:f15aa1706e16 9 PwmOut M2;
BAC 0:f15aa1706e16 10 PwmOut M3;
BAC 0:f15aa1706e16 11
BAC 0:f15aa1706e16 12 MotorDriver();
BAC 0:f15aa1706e16 13 void Actuate(); // duty = pulsewidth in us
BAC 0:f15aa1706e16 14 void Angle2Duty(float a, float b, float c);
BAC 0:f15aa1706e16 15 void DirectDrive(unsigned int d1, unsigned int d2, unsigned int d3);
BAC 0:f15aa1706e16 16 void DriveTable(unsigned int index);
BAC 0:f15aa1706e16 17
BAC 0:f15aa1706e16 18 unsigned GetD1 (void);
BAC 0:f15aa1706e16 19 unsigned GetD2 (void);
BAC 0:f15aa1706e16 20 unsigned GetD3 (void);
BAC 0:f15aa1706e16 21 unsigned Getdu1 (unsigned int i);
BAC 0:f15aa1706e16 22 unsigned Getdu2 (unsigned int i);
BAC 0:f15aa1706e16 23 unsigned Getdu3 (unsigned int i);
BAC 0:f15aa1706e16 24 };