test

Dependencies:   ad5422_arduino mbed LT1446 ADS1248-1 LM35-1 Flash FT813 PGA280_ADS1259

Committer:
nikmaos
Date:
Sat Aug 08 18:32:53 2020 +0000
Revision:
3:d4b106bf3a32
808

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nikmaos 3:d4b106bf3a32 1 #include "display.h"
nikmaos 3:d4b106bf3a32 2
nikmaos 3:d4b106bf3a32 3 /**************************************************************************************************************************
nikmaos 3:d4b106bf3a32 4 ************************** Draw horisontal grid for temperature (-50 .. +125) *********************************************
nikmaos 3:d4b106bf3a32 5 **************************************************************************************************************************/
nikmaos 3:d4b106bf3a32 6 void Display::HorisontalGrid_CurrentTemp()
nikmaos 3:d4b106bf3a32 7 {
nikmaos 3:d4b106bf3a32 8 (*_TFT).DL(COLOR_RGB(20, 20, 20));
nikmaos 3:d4b106bf3a32 9 char gridNumb = 125 + 50;
nikmaos 3:d4b106bf3a32 10 for (int i = 70 * 16; i <= 225 * 16; i += 352) {
nikmaos 3:d4b106bf3a32 11 (*_TFT).DL(BEGIN(LINES));
nikmaos 3:d4b106bf3a32 12 (*_TFT).DL(LINE_WIDTH(8));
nikmaos 3:d4b106bf3a32 13 (*_TFT).DL(VERTEX2F(15 * 16, i));
nikmaos 3:d4b106bf3a32 14 (*_TFT).DL(VERTEX2F(423 * 16, i));
nikmaos 3:d4b106bf3a32 15 if (gridNumb >= 50) {
nikmaos 3:d4b106bf3a32 16 (*_TFT).Number(435, i/16 - 9, 26, 0, gridNumb - 50);
nikmaos 3:d4b106bf3a32 17 } else if (gridNumb == 25) {
nikmaos 3:d4b106bf3a32 18 (*_TFT).Text(435, i/16 - 9, 26, 0, "-25");
nikmaos 3:d4b106bf3a32 19 } else if (gridNumb == 0) {
nikmaos 3:d4b106bf3a32 20 (*_TFT).Text(435, i/16 - 9, 26, 0, "-50");
nikmaos 3:d4b106bf3a32 21 }
nikmaos 3:d4b106bf3a32 22 gridNumb = gridNumb - 25;
nikmaos 3:d4b106bf3a32 23 }
nikmaos 3:d4b106bf3a32 24 }
nikmaos 3:d4b106bf3a32 25
nikmaos 3:d4b106bf3a32 26 /**************************************************************************************************************************
nikmaos 3:d4b106bf3a32 27 ************************** Draw horisontal grid for humidity (0 .. 100) ***************************************************
nikmaos 3:d4b106bf3a32 28 **************************************************************************************************************************/
nikmaos 3:d4b106bf3a32 29 void Display::HorisontalGrid_CurrentHumidity()
nikmaos 3:d4b106bf3a32 30 {
nikmaos 3:d4b106bf3a32 31 (*_TFT).DL(COLOR_RGB(20, 20, 20));
nikmaos 3:d4b106bf3a32 32 char gridNumb = 100;
nikmaos 3:d4b106bf3a32 33 for (int i = 70 * 16; i <= 220 * 16; i += 600) {
nikmaos 3:d4b106bf3a32 34 (*_TFT).DL(BEGIN(LINES));
nikmaos 3:d4b106bf3a32 35 (*_TFT).DL(LINE_WIDTH(8));
nikmaos 3:d4b106bf3a32 36 (*_TFT).DL(VERTEX2F(15 * 16, i));
nikmaos 3:d4b106bf3a32 37 (*_TFT).DL(VERTEX2F(423 * 16, i));
nikmaos 3:d4b106bf3a32 38 (*_TFT).Number(435, i/16 - 9, 26, 0, gridNumb);
nikmaos 3:d4b106bf3a32 39 gridNumb = gridNumb - 25;
nikmaos 3:d4b106bf3a32 40 }
nikmaos 3:d4b106bf3a32 41 }
nikmaos 3:d4b106bf3a32 42