Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.
Dependencies: Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed
Diff: PWM.cpp
- Revision:
- 21:a54bcab078ed
- Parent:
- 16:e65c192b7ecf
--- a/PWM.cpp Mon Aug 19 08:10:58 2013 +0000 +++ b/PWM.cpp Wed Sep 04 03:59:40 2013 +0000 @@ -1,4 +1,5 @@ #include "PWM.h" +#include "HomePosition.h" //static menber variable volatile uint8_t PWM::SRV_Idx = 0; @@ -7,7 +8,7 @@ PWM::PWM() { for (int i = 0; i < SRV_CH_NUM; i++) { - SetDuty(i, HOMEPOS[i]); + setDuty(i, HOMEPOS[i]); } InitPWM(); } @@ -39,7 +40,7 @@ NVIC_EnableIRQ(PWM1_IRQn);//enable } -void PWM::SetDuty(uint8_t ch, uint32_t duty) +void PWM::setDuty(uint8_t ch, uint32_t duty) { if (ch >= SRV_CH_NUM) { return;