Optimaze with new mbed os for study

Dependencies:   TS_DISCO_F746NG BSP_DISCO_F746NG Graphics

RadarDemo/RadarTimer.h

Committer:
karpent
Date:
2016-11-05
Revision:
3:732f7144ec81
Child:
4:66f13188c26b

File content as of revision 3:732f7144ec81:

#include "mbed.h"


/**
  * @brief Radar time subsystem
  */
class RadarTimer : public Timer
{
public:
    RadarTimer();

    /**
      * @brief Sets scan period in seconds
      */    
    RadarTimer(uint32_t scanPeriod);

    /**
      * @brief Sets scan period in seconds
      */    
    void SetScanPeriod(uint32_t scanPeriod);
 
     /**
      * @brief Starts the timer
      */    
    void Start();
 
    void RegisterScan();
       
    /**
      * @brief Get current time in miliseconds
      */
    uint32_t GetRunningTime();

    /**
      * @brief Get current beam angle in radians
      */
    float GetBeamAngle();
    
private:
    /// <summary>
    /// The radar scan period in milisecons.
    /// </summary>
    uint32_t _scanPeriod;
    
    uint32_t _lastScanTime;
    
    uint32_t _runningTime;
};