Optimaze with new mbed os for study
Dependencies: TS_DISCO_F746NG BSP_DISCO_F746NG Graphics
Diff: RadarDemo/RadarDemo.h
- Revision:
- 2:8db224cc1fcb
- Parent:
- 1:5e49b46de1b0
- Child:
- 3:732f7144ec81
--- a/RadarDemo/RadarDemo.h Fri Nov 04 17:10:50 2016 +0000 +++ b/RadarDemo/RadarDemo.h Fri Nov 04 23:07:04 2016 +0000 @@ -28,7 +28,7 @@ { RadarDemo demo(&display); demo.Initialize(); - + while(demo.IsRunning()) { demo.Render(); wait(0.04f); @@ -39,6 +39,7 @@ #pragma once +#include "TS_DISCO_F746NG.h" #include "Radar.h" /// <summary> @@ -56,7 +57,7 @@ /// <summary> /// Duration time of the demo in milisecons. /// Set <c>demoTime</c> to 0 if you do not need the time limit. - /// Set for 0 + /// Set for 0 /// </summary> uint32_t demoTime; @@ -88,13 +89,14 @@ /// <c>true</c> if this instance is running; otherwise, <c>false</c>. /// </returns> bool IsRunning(); - + /// <summary> /// Check if background needs redraw while range or center location changes. /// </summary> bool NeedsRedraw(); - + /// <summary> + /// @brief Force background redraw. /// Sets the display state for NEEDS REDRAW. /// </summary> void UnvalidateBackground(); @@ -104,7 +106,14 @@ /// </summary> /// <param name="count">The number of targets to create.</param> void AddSampleTargets(int count); - + + /// <summary> + /// Detect a touch on the screen in given area. + /// Returns true if the touch has been detected. + /// </summary> + /// <param name="screen">The screen window coordinates.</param> + bool DetectTouch(Window screen); + #ifndef _SDL_timer_h Timer t; #endif @@ -114,7 +123,9 @@ uint32_t runningTime; float currentBeamAngle; float lastBeamAngle; - + bool _needsRedraw; + + TS_DISCO_F746NG ts; };