added gy80 dcm
Dependencies: mbed DCM_AHRS_GY80 PID MMA8451Q
Fork of quadCommand by
Diff: quadCommand/motor/motor.h
- Revision:
- 56:a550127695b2
- Parent:
- 55:bca9c9e92da6
- Child:
- 59:9dfd9169a5e7
--- a/quadCommand/motor/motor.h Thu Jun 13 01:11:03 2013 +0000 +++ b/quadCommand/motor/motor.h Tue Jul 02 21:03:46 2013 +0000 @@ -21,21 +21,19 @@ #include "mbed.h" -#define TRIM_CONST .5 - class motor { public: motor( PinName ); // motor object constructor. - void setSpeed( float ); // Set the speed for the motor 0-100 + void setSpeed( int ); // Set the speed for the motor 0-100 void setPulseMin( float ); // Set smallest pulse. void setPulseMax( float ); // Set largest pulse. - float getSpeed(); + int getSpeed(); float getPulse( void ); private: - PwmOut _pwm; // Pin used for PWM. - float currentSpeed; // Speed of the motor. + PwmOut *pwmPin; // Pin used for PWM. + int currentSpeed; // Speed of the motor. float pulse; // Current pulse of the motor. float pulseMin; // Shortest value for the pulse float pulseMax; // Largest value for the pulse.