Changeset 15 in flair-src for trunk/lib/FlairSensorActuator/src/Srf08.h


Ignore:
Timestamp:
04/08/16 15:40:57 (8 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/Srf08.h

    r3 r15  
    1717#include <UsRangeFinder.h>
    1818
    19 namespace flair
    20 {
    21     namespace core
    22     {
    23         class FrameworkManager;
    24         class I2cPort;
    25     }
    26     namespace gui
    27     {
    28         class SpinBox;;
    29     }
     19namespace flair {
     20namespace core {
     21class FrameworkManager;
     22class I2cPort;
     23}
     24namespace gui {
     25class SpinBox;
     26;
     27}
    3028}
    3129
    32 namespace flair
    33 {
    34 namespace sensor
    35 {
    36     /*! \class Srf08
    37     *
    38     * \brief Class for ultra sonic SRF08
    39     */
    40     class Srf08 : public core::Thread, public UsRangeFinder
    41     {
     30namespace flair {
     31namespace sensor {
     32/*! \class Srf08
     33*
     34* \brief Class for ultra sonic SRF08
     35*/
     36class Srf08 : public core::Thread, public UsRangeFinder {
    4237
    43         public:
    44             /*!
    45             * \brief Constructor
    46             *
    47             * Construct a SimuUs. Control part.
    48             *
    49             * \param parent parent
    50             * \param name name
    51             * \param i2cport i2c port
    52             * \param address i2c slave address
    53             * \param priority priority of the Thread
    54             */
    55             Srf08(const core::FrameworkManager* parent,std::string name,core::I2cPort* i2cport,uint16_t address,uint8_t priority);
     38public:
     39  /*!
     40  * \brief Constructor
     41  *
     42  * Construct a SimuUs. Control part.
     43  *
     44  * \param parent parent
     45  * \param name name
     46  * \param i2cport i2c port
     47  * \param address i2c slave address
     48  * \param priority priority of the Thread
     49  */
     50  Srf08(const core::FrameworkManager *parent, std::string name,
     51        core::I2cPort *i2cport, uint16_t address, uint8_t priority);
    5652
    57             /*!
    58             * \brief Destructor
    59             *
    60             */
    61             ~Srf08();
     53  /*!
     54  * \brief Destructor
     55  *
     56  */
     57  ~Srf08();
    6258
    63             /*!
    64             * \brief Set Range
    65             *
    66             * check datasheet for values
    67             */
    68             void SetRange(void);
     59  /*!
     60  * \brief Set Range
     61  *
     62  * check datasheet for values
     63  */
     64  void SetRange(void);
    6965
    70             /*!
    71             * \brief Set Max Gain
    72             *
    73             * check datasheet for values
    74             */
    75             void SetMaxGain(void);
     66  /*!
     67  * \brief Set Max Gain
     68  *
     69  * check datasheet for values
     70  */
     71  void SetMaxGain(void);
    7672
    77         private:
    78             /*!
    79             * \brief Update using provided datas
    80             *
    81             * Reimplemented from IODevice.
    82             *
    83             * \param data data from the parent to process
    84             */
    85             void UpdateFrom(const core::io_data *data){};
     73private:
     74  /*!
     75  * \brief Update using provided datas
     76  *
     77  * Reimplemented from IODevice.
     78  *
     79  * \param data data from the parent to process
     80  */
     81  void UpdateFrom(const core::io_data *data){};
    8682
    87             /*!
    88             * \brief Run function
    89             *
    90             * Reimplemented from Thread.
    91             *
    92             */
    93             void Run(void);
     83  /*!
     84  * \brief Run function
     85  *
     86  * Reimplemented from Thread.
     87  *
     88  */
     89  void Run(void);
    9490
    95             void SendEcho(void);
    96             void GetEcho(void);
     91  void SendEcho(void);
     92  void GetEcho(void);
    9793
    98             bool is_init;
    99             core::Time echo_time;
    100             float z_1,z_2;
    101             gui::SpinBox *gain,*range;
    102             uint16_t address;
    103             core::I2cPort* i2cport;
    104     };
     94  bool is_init;
     95  core::Time echo_time;
     96  float z_1, z_2;
     97  gui::SpinBox *gain, *range;
     98  uint16_t address;
     99  core::I2cPort *i2cport;
     100};
    105101} // end namespace sensor
    106102} // end namespace flair
Note: See TracChangeset for help on using the changeset viewer.