New version of quadcopter software written to OO principles

Dependencies:   mbed MODSERIAL filter mbed-rtos ConfigFile PID PPM FreeIMU_external_magnetometer TinyGPS

Committer:
joe4465
Date:
Wed Mar 04 18:50:37 2015 +0000
Revision:
0:c6a85bb2a827
Child:
2:969dfa4f2436
New version of quadcopter software, written following OO principles

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joe4465 0:c6a85bb2a827 1 #include "mbed.h"
joe4465 0:c6a85bb2a827 2 #include "Global.h"
joe4465 0:c6a85bb2a827 3 #include "rtos.h"
joe4465 0:c6a85bb2a827 4 #include "Status.h"
joe4465 0:c6a85bb2a827 5 #include "MotorMixer.h"
joe4465 0:c6a85bb2a827 6 #include "PidWrapper.h"
joe4465 0:c6a85bb2a827 7 #include "RateController.h"
joe4465 0:c6a85bb2a827 8 #include "StabController.h"
joe4465 0:c6a85bb2a827 9
joe4465 0:c6a85bb2a827 10 #ifndef FlightController_H
joe4465 0:c6a85bb2a827 11 #define FlightController_H
joe4465 0:c6a85bb2a827 12
joe4465 0:c6a85bb2a827 13 class FlightController
joe4465 0:c6a85bb2a827 14 {
joe4465 0:c6a85bb2a827 15 public:
joe4465 0:c6a85bb2a827 16 FlightController();
joe4465 0:c6a85bb2a827 17 ~FlightController();
joe4465 0:c6a85bb2a827 18
joe4465 0:c6a85bb2a827 19 bool initialise(Status& status, Sensors& sensors, NavigationController& navigationController, PinName motor1, PinName motor2, PinName motor3, PinName motor4);
joe4465 0:c6a85bb2a827 20 PidWrapper::PidValues getyawRatePID();
joe4465 0:c6a85bb2a827 21 PidWrapper::PidValues getPitchRatePID();
joe4465 0:c6a85bb2a827 22 PidWrapper::PidValues getRollRatePID();
joe4465 0:c6a85bb2a827 23 PidWrapper::PidValues getyawStabPID();
joe4465 0:c6a85bb2a827 24 PidWrapper::PidValues getPitchStabPID();
joe4465 0:c6a85bb2a827 25 PidWrapper::PidValues getRollStabPID();
joe4465 0:c6a85bb2a827 26 MotorMixer::MotorPower getMotorPower();
joe4465 0:c6a85bb2a827 27
joe4465 0:c6a85bb2a827 28 private:
joe4465 0:c6a85bb2a827 29 static void threadStarter(void const *p);
joe4465 0:c6a85bb2a827 30 void threadWorker();
joe4465 0:c6a85bb2a827 31 RtosTimer* _rtosTimer;
joe4465 0:c6a85bb2a827 32 Status _status;
joe4465 0:c6a85bb2a827 33 MotorMixer _motorMixer;
joe4465 0:c6a85bb2a827 34 RateController _rateController;
joe4465 0:c6a85bb2a827 35 StabController _stabController;
joe4465 0:c6a85bb2a827 36 };
joe4465 0:c6a85bb2a827 37
joe4465 0:c6a85bb2a827 38 #endif