Miroslaw K. / Mbed 2 deprecated RadarDemo

Dependencies:   BSP_DISCO_F746NG Graphics mbed TS_DISCO_F746NG

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /*
00002     RadarDemo - Simple radar simulator, example of 2D graphics for STM32F746G-DISCO.
00003 
00004     Copyright(c) 2016 karpent at gmail.com, MIT License
00005 
00006     Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"),
00007     to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008     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 :
00009 
00010     The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
00011 
00012     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00013     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00014     OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
00015     THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00016 */
00017 
00018 #include "RK043FN48H.h"
00019 #include "RadarDemo.h"
00020 
00021 RK043FN48H display;
00022 
00023 int main()
00024 {
00025     RadarDemo demo(&display);
00026     demo.Initialize();
00027 
00028     // Set background color for non-transparent dark blue
00029     display.SetActiveLayer(Background);
00030     display.SetBackgroundColor(0xFF000032);  
00031     display.SetActiveLayer(Foreground);
00032     
00033     while(demo.IsRunning()) {
00034         
00035         // Render single frame
00036         demo.Render();
00037         
00038         // Wait a short time to see rendered frame
00039         wait(0.02f);
00040     }
00041 }