Simple radar simulator. Example of 2D graphics on DISCO-F746NG display.
Dependencies: BSP_DISCO_F746NG Graphics mbed TS_DISCO_F746NG
main.cpp@0:d8b9955d2b36, 2016-11-04 (annotated)
- Committer:
- karpent
- Date:
- Fri Nov 04 01:02:37 2016 +0000
- Revision:
- 0:d8b9955d2b36
- Child:
- 1:5e49b46de1b0
Initial revision
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
karpent | 0:d8b9955d2b36 | 1 | /* |
karpent | 0:d8b9955d2b36 | 2 | RadarDemo - Simple radar simulator, example of 2D graphics for STM32F746G-DISCO. |
karpent | 0:d8b9955d2b36 | 3 | |
karpent | 0:d8b9955d2b36 | 4 | Copyright(c) 2016 karpent at gmail.com |
karpent | 0:d8b9955d2b36 | 5 | |
karpent | 0:d8b9955d2b36 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), |
karpent | 0:d8b9955d2b36 | 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, |
karpent | 0:d8b9955d2b36 | 8 | and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions : |
karpent | 0:d8b9955d2b36 | 9 | |
karpent | 0:d8b9955d2b36 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
karpent | 0:d8b9955d2b36 | 11 | |
karpent | 0:d8b9955d2b36 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
karpent | 0:d8b9955d2b36 | 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
karpent | 0:d8b9955d2b36 | 14 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR |
karpent | 0:d8b9955d2b36 | 15 | THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
karpent | 0:d8b9955d2b36 | 16 | */ |
karpent | 0:d8b9955d2b36 | 17 | |
karpent | 0:d8b9955d2b36 | 18 | #include "RK043FN48H.h" |
karpent | 0:d8b9955d2b36 | 19 | #include "RadarDemo.h" |
karpent | 0:d8b9955d2b36 | 20 | |
karpent | 0:d8b9955d2b36 | 21 | RK043FN48H display; |
karpent | 0:d8b9955d2b36 | 22 | |
karpent | 0:d8b9955d2b36 | 23 | int main() |
karpent | 0:d8b9955d2b36 | 24 | { |
karpent | 0:d8b9955d2b36 | 25 | RadarDemo demo(&display); |
karpent | 0:d8b9955d2b36 | 26 | demo.Initialize(); |
karpent | 0:d8b9955d2b36 | 27 | |
karpent | 0:d8b9955d2b36 | 28 | display.SetActiveLayer(Background); |
karpent | 0:d8b9955d2b36 | 29 | display.SetBackgroundColor(0xFF000032); |
karpent | 0:d8b9955d2b36 | 30 | display.SetActiveLayer(Foreground); |
karpent | 0:d8b9955d2b36 | 31 | display.SetBackgroundColor(0x00000032); |
karpent | 0:d8b9955d2b36 | 32 | |
karpent | 0:d8b9955d2b36 | 33 | while(demo.IsRunning()) { |
karpent | 0:d8b9955d2b36 | 34 | demo.Render(); |
karpent | 0:d8b9955d2b36 | 35 | wait(0.04f); |
karpent | 0:d8b9955d2b36 | 36 | } |
karpent | 0:d8b9955d2b36 | 37 | } |