Mercurial > public > ostc4
annotate Discovery/Inc/tInfo.h @ 1028:3d9552e4997c GasConsumption
Code improvment: line <=> menu id function:
In generell the structure of the menus is defined by the tStructure.h using global state defines. In some implementation hardcoded line numbers are used. Risk: In case the order of menu items change the update of other code sections could be forgotten (in the case the update of the top menu) causing unintended behavior. To avoid this the hard coded lines have been replaced by a function connecting the intended function to the menu item defined in the tstructure.h.
| author | Ideenmodellierer |
|---|---|
| date | Sun, 07 Sep 2025 19:08:43 +0200 |
| parents | 65d35e66efb9 |
| children | 5b913cdaa9dc |
| rev | line source |
|---|---|
| 38 | 1 /////////////////////////////////////////////////////////////////////////////// |
| 2 /// -*- coding: UTF-8 -*- | |
| 3 /// | |
| 4 /// \file Discovery/Inc/tInfo.h | |
| 5 /// \brief Header file of Info Pages on left side | |
| 6 /// \author heinrichs weikamp gmbh | |
| 7 /// \date 11-Aug-2014 | |
| 8 /// | |
| 9 /// $Id$ | |
| 10 /////////////////////////////////////////////////////////////////////////////// | |
| 11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
| 12 /// | |
| 13 /// This program is free software: you can redistribute it and/or modify | |
| 14 /// it under the terms of the GNU General Public License as published by | |
| 15 /// the Free Software Foundation, either version 3 of the License, or | |
| 16 /// (at your option) any later version. | |
| 17 /// | |
| 18 /// This program is distributed in the hope that it will be useful, | |
| 19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 /// GNU General Public License for more details. | |
| 22 /// | |
| 23 /// You should have received a copy of the GNU General Public License | |
| 24 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 25 ////////////////////////////////////////////////////////////////////////////// | |
| 26 | |
| 27 /* Define to prevent recursive inclusion -------------------------------------*/ | |
| 28 #ifndef TINFO_H | |
| 29 #define TINFO_H | |
| 30 | |
| 31 /* Includes ------------------------------------------------------------------*/ | |
| 32 #include <stdio.h> | |
| 33 #include "stm32f4xx_hal.h" | |
| 34 #include "base.h" | |
| 35 #include "gfx.h" | |
| 36 #include "gfx_colors.h" | |
| 37 #include "gfx_engine.h" | |
| 38 #include "text_multilanguage.h" | |
| 39 #include "tInfoLog.h" | |
| 40 #include "data_central.h" | |
| 41 | |
| 42 /* Exported functions --------------------------------------------------------*/ | |
| 43 | |
| 44 void tI_init(void); | |
| 45 void openInfo(uint32_t modeToStart); | |
| 46 void tInfo_refresh(void); | |
| 47 | |
| 48 void sendActionToInfo(uint8_t sendAction); | |
| 49 | |
| 50 void tInfo_write_content_simple(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t color); | |
| 51 | |
| 52 void tInfo_write_label_fix(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char textId); | |
| 53 void tInfo_write_label_var(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text); | |
| 54 | |
| 55 void tInfo_write_field_button(uint32_t editID, uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text); | |
| 56 void tInfo_write_field_symbol(uint32_t editID, uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t int1); | |
| 57 void tInfo_write_field_toggle(uint32_t editID, uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t int1, uint8_t int2); | |
| 58 void tInfo_write_field_on_off(uint32_t editID, uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t int1); | |
| 59 | |
| 60 void tInfo_write_buttonTextline(GFX_DrawCfgScreen *screenPtr, uint8_t left2ByteCode, char middle2ByteCode, char right2ByteCode); | |
| 845 | 61 void tInfo_write_buttonTextline_simple(uint8_t left2ByteCode, char middle2ByteCode, char right2ByteCode); |
| 38 | 62 |
| 1007 | 63 void tInfo_drawPixel(int16_t x, int16_t y, uint8_t color); |
| 64 void tInfo_draw_colorline(point_t start, point_t stop, uint8_t color); | |
| 65 void t_Info_draw_circle(point_t center, uint8_t radius, int8_t color); | |
| 66 | |
| 38 | 67 void tInfo_setEvent(uint32_t inputEventID, uint32_t inputFunctionCall); |
| 68 | |
| 699 | 69 void tInfo_set_on_off(uint32_t editID, uint8_t int1); |
| 38 | 70 void exitInfo(void); |
|
718
b9f699d2e3d0
Updated menu structure to support new sensor information page:
Ideenmodellierer
parents:
699
diff
changeset
|
71 void exitInfoToBack(void); |
| 38 | 72 |
| 73 #endif /* TINFO_H */ |
