unit test for brushless motors using a potentiometer and a castle creations esc with 0.5 center duty cycle
Fork of brushlessmotor by
Diff: MainController.h
- Revision:
- 3:605f216167f6
- Parent:
- 2:040b8c8f4f92
--- a/MainController.h Thu Jul 30 20:36:00 2015 +0000 +++ b/MainController.h Fri Feb 26 14:35:02 2016 +0000 @@ -2,7 +2,6 @@ #define MBED_MAINCONTROLLER_H #include "mbed.h" -#include "PwmIn.h" #include "esc.h" #define MATH_PI 3.14159265359 @@ -20,12 +19,7 @@ */ void start(); float getDutyCycle(); - float getFrequency(); float getAmplitude(); - float getYaw(); - float getPitch(); - float getTimeAdd(); - float getAdj(); /** Stop the main controller * @returns @@ -34,41 +28,23 @@ protected: void control(); - float calculateFrequency(); - float calculateAmplitude(); - float calculateYaw(); - float calculatePitch(); //float calculateAdj(); float signum(float input); float saturate(float input); private: - PwmIn ch1; //yaw - PwmIn ch2; //pitch - PwmIn ch3; //amp - PwmIn ch6; //freq ESC esc1; - //Servo leftservo; - //Servo rightservo; Timer timer1; Ticker ticker1; float amp; - float ampNew; - float frq; float dutyCycle; float curTime; float frqMin; - float frqMax; - float yaw; - float pitch; - float alPi; - //float adj; - bool fullCycle; - float frqCmd; - float raiser; + float frqMax; + PwmOut myled; + AnalogIn mypotentiometer; - float throttle_var; }; #endif \ No newline at end of file