José Claudio
/
QuadCopter-Sensor-Serial
Quadcopter working with accelerômeter and accelerometer, and bluetooth radio for communication
Hardware/Motor.h
- Committer:
- jose_claudiojr
- Date:
- 2013-05-21
- Revision:
- 0:56b8c86181b1
File content as of revision 0:56b8c86181b1:
#ifndef _MOTOR_H_ #define _MOTOR_H_ #include "mbed.h" #include "Util.h" //#define PWM_MIN 0.001 #define PWM_MIN 0.1 #define PWM_DT 0.001 class Motor : public PwmOut { public: Motor(PinName pwm, float _period/*, float* linCoef, float lowerSat, float upperSat*/); //Motor(PinName pwm, float periodms); void setPower(float power); void setPowerLin(float power); void arm(int pwm_ms); void accumulatePower(float accPower); float getPower(); private: float currentPower; //float* linCoef; //float lowerSat, upperSat; }; #endif