Changeset 25 in flair-dev for trunk/include


Ignore:
Timestamp:
Jun 23, 2016, 10:18:10 AM (9 years ago)
Author:
Bayard Gildas
Message:

Plop

Location:
trunk/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/FlairCore/ConnectedSocket.h

    r14 r25  
    100100
    101101  //!! See Socket.h for a more generic implementation of network/host endianness
    102   //conversion
     102  // conversion
    103103  virtual uint16_t NetworkToHost16(uint16_t data) = 0;
    104104  virtual uint16_t HostToNetwork16(uint16_t data) = 0;
  • trunk/include/FlairCore/IODevice.h

    r13 r25  
    114114  virtual DataType const &GetOutputDataType() const;
    115115
    116 protected:
    117   /*!
    118   * \brief Process the childs of type IODevice, and log if needed
    119   *
    120   * This method must be called after computing datas;
    121   * generally at the end of the reimplemented UpdateFrom or after acquiring
    122   *datas in case of a sensor. \n
    123   * It will call UpdateFrom methods of each child of type IODevice,
    124   * and log all datas (this IODevice and its childs)
    125   * if logging is enabled (see SetDataToLog(), AddDeviceToLog(),
    126   * FrameworkManager::StartLog and FrameworkManager::AddDeviceToLog). \n
    127   * If a thread is waiting on this IODevice (see Thread::WaitUpdate), it will be
    128   *resumed.
    129   *
    130   * \param data data to process
    131   */
    132   void ProcessUpdate(io_data *data);
     116            Time lastUpdate;
     117        protected:
     118            /*!
     119            * \brief Process the childs of type IODevice, and log if needed
     120            *
     121            * This method must be called after computing datas;
     122            * generally at the end of the reimplemented UpdateFrom or after acquiring datas in case of a sensor. \n
     123            * It will call UpdateFrom methods of each child of type IODevice,
     124            * and log all datas (this IODevice and its childs)
     125            * if logging is enabled (see SetDataToLog(), AddDeviceToLog(),
     126            * FrameworkManager::StartLog and FrameworkManager::AddDeviceToLog). \n
     127            * If a thread is waiting on this IODevice (see Thread::WaitUpdate), it will be resumed.
     128            *
     129            * \param data data to process
     130            */
     131            void ProcessUpdate(io_data* data);
    133132
    134133private:
  • trunk/include/FlairMeta/MetaDualShock3.h

    r13 r25  
    1414#define METADUALSHOCK3_H
    1515
    16 #include <TargetEthController.h>
     16#include <TargetController.h>
     17#include <IODevice.h>
    1718
    1819namespace flair {
     
    3536* \brief Classe intégrant la manette MetaDualShock3
    3637*/
    37 class MetaDualShock3 : public sensor::TargetEthController {
     38class MetaDualShock3 : public core::IODevice {
    3839  friend class ::MetaDualShock3_impl;
    3940
    4041public:
    4142  MetaDualShock3(core::FrameworkManager *parent, std::string name,
    42                  uint16_t port, uint8_t priority);
     43                 sensor::TargetController *controller);
    4344  ~MetaDualShock3();
    4445  core::AhrsData *GetReferenceOrientation(void) const;
     
    6667  void FlashLed(unsigned int ledId, uint8_t on_timeout, uint8_t off_timeout);
    6768
    68 private:
    69   class MetaDualShock3_impl *pimpl_;
    70 };
     69        private:
     70            class MetaDualShock3_impl* pimpl_;
     71            void UpdateFrom(const flair::core::io_data *data);
     72            sensor::TargetController *controller;
     73    };
    7174} // end namespace meta
    7275} // end namespace flair
  • trunk/include/FlairMeta/UavStateMachine.h

    r13 r25  
    101101  };
    102102
    103   UavStateMachine(meta::Uav *uav, uint16_t ds3Port = 20000);
    104   ~UavStateMachine();
     103        UavStateMachine(meta::Uav* uav, sensor::TargetController* controller);
     104        ~UavStateMachine();
    105105
    106106  const core::Quaternion &GetCurrentQuaternion(void) const;
     
    110110  const meta::Uav *GetUav(void) const;
    111111
    112   void Land(void);
    113   void TakeOff(void);
    114   void EmergencyStop(void);
    115   //! Used to signal an event
    116   /*!
    117       \param event the event which occured
    118   */
    119   virtual void SignalEvent(Event_t event);
     112        void Land(void);
     113        void EmergencyLand(void);
     114        void TakeOff(void);
     115        void EmergencyStop(void);
     116        //! Used to signal an event
     117        /*!
     118            \param event the event which occured
     119        */
     120        virtual void SignalEvent(Event_t event);
    120121
    121122  virtual const core::AhrsData *GetOrientation(void) const;
     
    262263
    263264  meta::Uav *uav;
     265  sensor::TargetController *controller;
    264266
    265267  core::Quaternion currentQuaternion;
     
    289291  bool flagBatteryLow;
    290292  bool flagConnectionLost;
     293  bool flagCriticalSensorLost;
    291294  bool flagZTrajectoryFinished;
     295  bool safeToFly;
    292296  filter::NestedSat *uRoll, *uPitch;
    293297  filter::Pid *uYaw;
  • trunk/include/FlairSensorActuator/TargetEthController.h

    r13 r25  
    6262
    6363  bool IsDataFrameReady();
    64   void AcquireAxisData(core::cvmatrix &axis); // responsible for getting the
    65                                               // axis data from the hardware
     64  void AcquireAxisData(core::cvmatrix &axis);     // responsible for getting the
     65                                                  // axis data from the hardware
    6666  void AcquireButtonData(core::cvmatrix &button); // responsible for getting the
    6767                                                  // button data from the
Note: See TracChangeset for help on using the changeset viewer.