Thomas Giraud-Sauveur
/
Gimbal_ENSEA
pour simone
mycontroller.h@2:146ff0747375, 2016-06-03 (annotated)
- Committer:
- ThomasGS
- Date:
- Fri Jun 03 14:50:37 2016 +0000
- Revision:
- 2:146ff0747375
- Parent:
- 0:63c6db89607f
version avec moteur parametre
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ThomasGS | 0:63c6db89607f | 1 | #ifndef MYCONTROLLER_H |
ThomasGS | 0:63c6db89607f | 2 | #define MYCONTROLLER_H |
ThomasGS | 0:63c6db89607f | 3 | |
ThomasGS | 0:63c6db89607f | 4 | #include "mbed.h" |
ThomasGS | 0:63c6db89607f | 5 | |
ThomasGS | 0:63c6db89607f | 6 | class brushlessservo |
ThomasGS | 0:63c6db89607f | 7 | { |
ThomasGS | 0:63c6db89607f | 8 | public: |
ThomasGS | 2:146ff0747375 | 9 | brushlessservo(PwmOut &p_pwm1,PwmOut &p_pwm2,PwmOut &p_pwm3,DigitalOut &p_enableA,DigitalOut &p_enableB); |
ThomasGS | 2:146ff0747375 | 10 | //brushlessservo(); |
ThomasGS | 0:63c6db89607f | 11 | void gotothetha(int theta); |
ThomasGS | 0:63c6db89607f | 12 | void updatepwm(); |
ThomasGS | 0:63c6db89607f | 13 | void test(); |
ThomasGS | 0:63c6db89607f | 14 | |
ThomasGS | 0:63c6db89607f | 15 | private: |
ThomasGS | 2:146ff0747375 | 16 | DigitalOut &enableA,&enableB; |
ThomasGS | 2:146ff0747375 | 17 | PwmOut pwm[3]; |
ThomasGS | 2:146ff0747375 | 18 | PwmOut &pwm1, &pwm2, &pwm3; |
ThomasGS | 0:63c6db89607f | 19 | int32_t realtheta; |
ThomasGS | 0:63c6db89607f | 20 | int32_t targettheta; |
ThomasGS | 0:63c6db89607f | 21 | int32_t phase[3]; |
ThomasGS | 0:63c6db89607f | 22 | bool direction; |
ThomasGS | 0:63c6db89607f | 23 | int sineArraySize; |
ThomasGS | 0:63c6db89607f | 24 | |
ThomasGS | 0:63c6db89607f | 25 | }; |
ThomasGS | 0:63c6db89607f | 26 | |
ThomasGS | 0:63c6db89607f | 27 | |
ThomasGS | 0:63c6db89607f | 28 | #endif |