Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
display.Draw_Grids.cpp
00001 #include "display.h" 00002 00003 /************************************************************************************************************************** 00004 ************************** Draw horisontal grid for temperature (-50 .. +125) ********************************************* 00005 **************************************************************************************************************************/ 00006 void Display::HorisontalGrid_CurrentTemp() 00007 { 00008 (*_TFT).DL(COLOR_RGB(20, 20, 20)); 00009 char gridNumb = 125 + 50; 00010 for (int i = 70 * 16; i <= 225 * 16; i += 352) { 00011 (*_TFT).DL(BEGIN(LINES)); 00012 (*_TFT).DL(LINE_WIDTH(8)); 00013 (*_TFT).DL(VERTEX2F(15 * 16, i)); 00014 (*_TFT).DL(VERTEX2F(423 * 16, i)); 00015 if (gridNumb >= 50) { 00016 (*_TFT).Number(435, i/16 - 9, 26, 0, gridNumb - 50); 00017 } else if (gridNumb == 25) { 00018 (*_TFT).Text(435, i/16 - 9, 26, 0, "-25"); 00019 } else if (gridNumb == 0) { 00020 (*_TFT).Text(435, i/16 - 9, 26, 0, "-50"); 00021 } 00022 gridNumb = gridNumb - 25; 00023 } 00024 } 00025 00026 /************************************************************************************************************************** 00027 ************************** Draw horisontal grid for humidity (0 .. 100) *************************************************** 00028 **************************************************************************************************************************/ 00029 void Display::HorisontalGrid_CurrentHumidity() 00030 { 00031 (*_TFT).DL(COLOR_RGB(20, 20, 20)); 00032 char gridNumb = 100; 00033 for (int i = 70 * 16; i <= 220 * 16; i += 600) { 00034 (*_TFT).DL(BEGIN(LINES)); 00035 (*_TFT).DL(LINE_WIDTH(8)); 00036 (*_TFT).DL(VERTEX2F(15 * 16, i)); 00037 (*_TFT).DL(VERTEX2F(423 * 16, i)); 00038 (*_TFT).Number(435, i/16 - 9, 26, 0, gridNumb); 00039 gridNumb = gridNumb - 25; 00040 } 00041 } 00042
Generated on Tue Jul 12 2022 18:31:54 by
1.7.2