Merge pull request #1269 from pkendall64/crsf-max-output
[ExpressLRS.git] / src / lib / SCREEN / TFT / tftscreen.h
blobb506e5fa9011154ddb6e531c74b75056f526fa24
1 /*
2 * This file is part of the ExpressLRS distribution (https://github.com/ExpressLRS/ExpressLRS).
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, version 3.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #pragma once
19 #include "targets.h"
20 #include "logos.h"
21 #include "TFT_eSPI_User_Setup.h"
22 #include <SPI.h>
24 #include "screen.h"
26 class TFTScreen: public Screen
28 private:
29 void doRateValueSelect(int action);
30 void doPowerValueSelect(int action);
31 void doRatioValueSelect(int action);
32 void doPowerSavingValueSelect(int action);
33 void doSmartFanValueSelect(int action);
35 void updateMainMenuPage();
36 void updateSubFunctionPage();
37 void updateSubWIFIModePage();
38 void updateSubBindConfirmPage();
39 void updateSubBindingPage();
41 void displayFontCenter(uint32_t font_start_x, uint32_t font_end_x, uint32_t font_start_y,
42 int font_size, int font_type, String font_string,
43 uint16_t fgColor, uint16_t bgColor);
45 void displayFontCenterWithCelsius(uint32_t font_start_x, uint32_t font_end_x, uint32_t font_start_y,
46 int font_size, int font_type, String font_string,
47 uint16_t fgColor, uint16_t bgColor);
49 public:
51 void init(bool reboot);
52 void idleScreen();
53 void doParamUpdate(uint8_t rate_index, uint8_t power_index, uint8_t ratio_index, uint8_t motion_index, uint8_t fan_index);
54 void doTemperatureUpdate(uint8_t temperature);
55 void doScreenBackLight(int state);