test
Dependencies: ad5422_arduino mbed LT1446 ADS1248-1 LM35-1 Flash FT813 PGA280_ADS1259
Diff: display.h
- Revision:
- 5:21240fa1ee4c
- Parent:
- 4:d53895f65eb7
- Child:
- 6:cfe7cb0bdb1a
diff -r d53895f65eb7 -r 21240fa1ee4c display.h --- a/display.h Tue Aug 11 19:13:43 2020 +0000 +++ b/display.h Thu Aug 13 14:37:39 2020 +0000 @@ -5,6 +5,17 @@ #ifndef DISPLAY_H_ #define DISPLAY_H_ +#ifndef _PID_T +#define _PID_T //запасное определение типа данных для обеспечения работы ПИДа с дисплем (второй раз в main.h) +typedef struct{ + float kP,kI,kD,sampleTime; + uint32_t chkd; + uint8_t + enabled:1, + :7; + }PID_t; +#endif + /************************************************************************************************************************** ************************** Defines using for drawing ********************************************************************** **************************************************************************************************************************/ @@ -21,10 +32,6 @@ CHROM_SET_SENSGAIN_PRESS, //установить коэффициент усиления PGA CHROM_ANALIZ_PRESS, //анализ CHROM_PROBA_PRESS, //пробоотбор -} pressValues; - -typedef enum {//для клавиатуры цифр - NONE_PRESS, NUMB_0, NUMB_1, NUMB_2, @@ -36,18 +43,29 @@ NUMB_8, NUMB_9, SYM_DOT, -}pressCipher; + BACK_PRESS, + CANCEL_PRESS, + APPLY_PRESS, + + SEL_P1, + SEL_I1, + SEL_D1, + SEL_P2, + SEL_I2, + SEL_D2, +} pressValues; //выбранная ячейка для редактирования typedef enum{ - EDIT_P1, - EDIT_I1, - EDIT_D1, + EDIT_P1=SEL_P1, + EDIT_I1=SEL_I1, + EDIT_D1=SEL_D1, - EDIT_P2, - EDIT_I2, - EDIT_D2, -}selectedEditor; + EDIT_P2=SEL_P2, + EDIT_I2=SEL_I2, + EDIT_D2=SEL_D2, + EDIT_NONE, +}selectedEditor_t; // all existing screens typedef enum { @@ -73,6 +91,7 @@ // functions describing all available screens (screens-functions) void ChromTest(float temp,float ras,int temp_u,float ras_u); //тестовый экран + void PidScreen(/*костыль костылей*/float (*btf)(unsigned char*),float temp, float ras,uint16_t power1,uint16_t power2,PID_t* PID1,PID_t* PID2); void MainMenu(float humidity, float temperature); // [display.Draw_MainMenu.cpp] void CurrentHumidity(float humidity); // [display.Draw_CurrentValuesGraphs.cpp] void CurrentTemperature(float temperature); // [display.Draw_CurrentValuesGraphs.cpp] @@ -86,6 +105,14 @@ // variables using for navigation between screens char pressedButton; char activeScreen; + + selectedEditor_t selectedEditor; + unsigned char str_edit[12]; + uint8_t cursor; + //доп. функции + void myWdget_Edit(uint16_t x,uint16_t y,uint16_t w,uint16_t h,uint8_t selected,const char * text); + void Display::myWdget_NumPad(uint16_t x,uint16_t y); + void Display::myWdget_Edit_change(char * text); private: FT813 *_TFT;