![](/media/cache/profiles/9f0876a200701e5fdece2e58aa965574.jpg.50x50_q85.jpg)
Русифицированная версия программы для измерения температуры и отн. влажности и вывода информации на сенсорный TFT
Dependencies: FT800_2 HYT mbed
display.ImagesAndFonts.cpp
00001 #include "display.h" 00002 00003 /************************************************************************************************************************** 00004 ************************** Decompress images anf fonts from pictures.h and put them to the RAM memeory of FT800 *********** 00005 **************************************************************************************************************************/ 00006 void Display::LoadImagesAndFonts() 00007 { 00008 (*_TFT).WrCmd32(CMD_INFLATE); 00009 (*_TFT).WrCmd32(IMAGE_ADDR_HUMIDITY); 00010 (*_TFT).WrCmdBufFromFlash(hum_icon, sizeof(hum_icon)); 00011 00012 (*_TFT).WrCmd32(CMD_INFLATE); 00013 (*_TFT).WrCmd32(IMAGE_ADDR_TEMPERATURE); 00014 (*_TFT).WrCmdBufFromFlash(temp_icon, sizeof(temp_icon)); 00015 00016 (*_TFT).WrCmd32(CMD_INFLATE); 00017 (*_TFT).WrCmd32(IMAGE_ADDR_SENSOR); 00018 (*_TFT).WrCmdBufFromFlash(HYT_photo, sizeof(HYT_photo)); 00019 00020 (*_TFT).WrCmd32(CMD_INFLATE); 00021 (*_TFT).WrCmd32(FONT_SET_ROBOTO_REGULAR_30); 00022 (*_TFT).WrCmdBufFromFlash(font_RobotoRegular30, sizeof(font_RobotoRegular30)); 00023 00024 (*_TFT).WrCmd32(CMD_INFLATE); 00025 (*_TFT).WrCmd32(FONT_SET_ROBOTO_REGULAR_16); 00026 (*_TFT).WrCmdBufFromFlash(font_RobotoRegular16, sizeof(font_RobotoRegular16)); 00027 } 00028 00029 /************************************************************************************************************************** 00030 ************************** Prepare images and fronts ********************************************************************** 00031 **************************************************************************************************************************/ 00032 void Display::HandleAllBitmaps() 00033 { 00034 // start FT800 display list 00035 StartDL(); 00036 00037 (*_TFT).DL(BITMAP_HANDLE(0)); 00038 (*_TFT).DL(BITMAP_SOURCE(IMAGE_ADDR_HUMIDITY)); 00039 (*_TFT).DL(BITMAP_LAYOUT(ARGB4, 60, 38)); 00040 (*_TFT).DL(BITMAP_SIZE(NEAREST, BORDER, BORDER, 30, 38)); 00041 00042 (*_TFT).DL(BITMAP_HANDLE(1)); 00043 (*_TFT).DL(BITMAP_SOURCE(IMAGE_ADDR_TEMPERATURE)); 00044 (*_TFT).DL(BITMAP_LAYOUT(ARGB4, 42, 42)); 00045 (*_TFT).DL(BITMAP_SIZE(NEAREST, BORDER, BORDER, 21, 42)); 00046 00047 (*_TFT).DL(BITMAP_HANDLE(2)); 00048 (*_TFT).DL(BITMAP_SOURCE(IMAGE_ADDR_SENSOR)); 00049 (*_TFT).DL(BITMAP_LAYOUT(RGB332, 101, 147)); 00050 (*_TFT).DL(BITMAP_SIZE(NEAREST, BORDER, BORDER, 101, 147)); 00051 00052 (*_TFT).DL(BITMAP_HANDLE(3)); 00053 (*_TFT).DL(BITMAP_SOURCE(FONT_ADDR_ROBOTO_REGULAR_30)); 00054 (*_TFT).DL(BITMAP_LAYOUT(L4, 16, 33)); 00055 (*_TFT).DL(BITMAP_SIZE(NEAREST, BORDER, BORDER, 32, 33)); 00056 00057 (*_TFT).DL(BITMAP_HANDLE(4)); 00058 (*_TFT).DL(BITMAP_SOURCE(FONT_ADDR_ROBOTO_REGULAR_16)); 00059 (*_TFT).DL(BITMAP_LAYOUT(L4, 8, 20)); 00060 (*_TFT).DL(BITMAP_SIZE(NEAREST, BORDER, BORDER, 16, 20)); 00061 00062 (*_TFT).SetFont(3, FONT_SET_ROBOTO_REGULAR_30); 00063 (*_TFT).SetFont(4, FONT_SET_ROBOTO_REGULAR_16); 00064 00065 // finish FT800 display list 00066 FinishDL(); 00067 }
Generated on Wed Jul 13 2022 04:41:34 by
![doxygen](doxygen.png)