Simple radar simulator. Example of 2D graphics on DISCO-F746NG display.
Dependencies: BSP_DISCO_F746NG Graphics mbed TS_DISCO_F746NG
Diff: main.cpp
- Revision:
- 1:5e49b46de1b0
- Parent:
- 0:d8b9955d2b36
--- a/main.cpp Fri Nov 04 01:02:37 2016 +0000 +++ b/main.cpp Fri Nov 04 17:10:50 2016 +0000 @@ -1,7 +1,7 @@ /* RadarDemo - Simple radar simulator, example of 2D graphics for STM32F746G-DISCO. - Copyright(c) 2016 karpent at gmail.com + Copyright(c) 2016 karpent at gmail.com, MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, @@ -25,13 +25,17 @@ RadarDemo demo(&display); demo.Initialize(); + // Set background color for non-transparent dark blue display.SetActiveLayer(Background); display.SetBackgroundColor(0xFF000032); display.SetActiveLayer(Foreground); - display.SetBackgroundColor(0x00000032); while(demo.IsRunning()) { + + // Render single frame demo.Render(); - wait(0.04f); + + // Wait a short time to see rendered frame + wait(0.02f); } }