New version of quadcopter software written to OO principles

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

BaseStation/BaseStation.h

Committer:
joe4465
Date:
2015-04-01
Revision:
2:969dfa4f2436
Parent:
0:c6a85bb2a827

File content as of revision 2:969dfa4f2436:

#include "mbed.h"
#include "Global.h"
#include "rtos.h"
#include "MODSERIAL.h"
#include "Rc.h"
#include "Sensors.h"
#include "Status.h"
#include "NavigationController.h"
#include "FlightController.h"

#ifndef BaseStation_H
#define BaseStation_H

class BaseStation                
{
  public:             
    BaseStation(Status& status, Rc& rc, Sensors& sensors, NavigationController& navigationController, FlightController& flightController, ConfigFileWrapper& configFileWrapper, PinName wirelessPinTx, PinName wirelessPinRx);   
    ~BaseStation();   
    
  private:
    static void threadStarter(void const *p);
    void threadWorker();
    void checkCommand();
    
    Thread* _thread;
    MODSERIAL* _wireless;
    Status& _status;
    Rc& _rc;
    Sensors& _sensors;
    NavigationController& _navigationController;
    FlightController& _flightController;
    ConfigFileWrapper& _configFileWrapper;
    char _wirelessSerialBuffer[255];
    int _wirelessSerialRxPos;
};

#endif