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.h
00001 #include "mbed.h" 00002 #include "FT_Platform.h" 00003 #include <string> 00004 00005 #ifndef DISPLAY_H_ 00006 #define DISPLAY_H_ 00007 00008 /************************************************************************************************************************** 00009 ************************** Defines using for drawing ********************************************************************** 00010 **************************************************************************************************************************/ 00011 00012 // all tracking touch screen areas 00013 typedef enum { 00014 NONE_PRESS, 00015 CURR_TEMP_PRESS, 00016 CURR_HUM_PRESS, 00017 MENU_PRESS, 00018 } pressValues; 00019 00020 // all existing screens 00021 typedef enum { 00022 MENU_SCREEN, 00023 CURR_HUM_SCREEN, 00024 CURR_TEMP_SCREEN, 00025 } screenValues; 00026 00027 00028 /************************************************************************************************************************** 00029 ************************** User class for drawing at FT800 **************************************************************** 00030 **************************************************************************************************************************/ 00031 00032 class Display 00033 { 00034 public: 00035 // in Display class we use FT800 TFT (definition is available in main.cpp) 00036 Display(FT813 *TFT) { 00037 _TFT = TFT; 00038 } 00039 00040 // functions describing all available screens (screens-functions) 00041 void MainMenu(float humidity, float temperature); // [display.Draw_MainMenu.cpp] 00042 void CurrentHumidity(float humidity); // [display.Draw_CurrentValuesGraphs.cpp] 00043 void CurrentTemperature(float temperature); // [display.Draw_CurrentValuesGraphs.cpp] 00044 00045 // functions using to prepare FT800 00046 void Calibration(void); // [display.Calibration.cpp] 00047 00048 // functions for touch screen tracking 00049 char GetTouch(void); // [display.GetTouch.cpp] 00050 00051 // variables using for navigation between screens 00052 char pressedButton; 00053 char activeScreen; 00054 00055 private: 00056 FT813 *_TFT; 00057 00058 void StartDL(void); // [display.DisplayListFunctions.cpp] 00059 void FinishDL(void); // [display.DisplayListFunctions.cpp] 00060 void MainMenuReference(void); // [display.Draw_MainMenuReference.cpp] 00061 void HorisontalGrid_CurrentTemp(void); // [display.Draw_Grids.cpp] 00062 void HorisontalGrid_CurrentHumidity(void); // [display.Draw_Grids.cpp] 00063 00064 void CreateStringTempHum(char *str, float number, bool isTemp); // [display.StringsTransforming.cpp] 00065 00066 char humidityStr[8], temperatureStr[8]; 00067 char currentHumidity_X, currentTemperature_X; 00068 char currentHumidity_Y[68], currentTemperature_Y[68]; 00069 }; 00070 00071 #endif /* SCREENS_H_ */
Generated on Fri Aug 12 2022 17:51:29 by
1.7.2