vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / io / osd / custom_elements.h
bloba55b010f01a29297935e745079f0fe26680838db
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight 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, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #include "config/parameter_group.h"
22 #define OSD_CUSTOM_ELEMENT_TEXT_SIZE 16
23 #define CUSTOM_ELEMENTS_PARTS 3
24 #define MAX_CUSTOM_ELEMENTS 3
26 typedef enum {
27 CUSTOM_ELEMENT_TYPE_NONE = 0,
28 CUSTOM_ELEMENT_TYPE_TEXT = 1,
29 CUSTOM_ELEMENT_TYPE_ICON_STATIC = 2,
30 CUSTOM_ELEMENT_TYPE_ICON_GV = 3,
31 CUSTOM_ELEMENT_TYPE_GV = 4,
32 CUSTOM_ELEMENT_TYPE_GV_FLOAT = 5,
33 CUSTOM_ELEMENT_TYPE_GV_SMALL = 6,
34 CUSTOM_ELEMENT_TYPE_GV_SMALL_FLOAT = 7,
35 } osdCustomElementType_e;
37 typedef enum {
38 CUSTOM_ELEMENT_VISIBILITY_ALWAYS = 0,
39 CUSTOM_ELEMENT_VISIBILITY_GV = 1,
40 CUSTOM_ELEMENT_VISIBILITY_LOGIC_CON = 2,
41 } osdCustomElementTypeVisibility_e;
43 typedef struct {
44 osdCustomElementType_e type;
45 uint16_t value;
46 } osdCustomElementItem_t;
48 typedef struct {
49 osdCustomElementTypeVisibility_e type;
50 uint16_t value;
51 } osdCustomElementVisibility_t;
53 typedef struct {
54 osdCustomElementItem_t part[CUSTOM_ELEMENTS_PARTS];
55 osdCustomElementVisibility_t visibility;
56 char osdCustomElementText[OSD_CUSTOM_ELEMENT_TEXT_SIZE];
57 } osdCustomElement_t;
59 PG_DECLARE_ARRAY(osdCustomElement_t, MAX_CUSTOM_ELEMENTS, osdCustomElements);
61 void customElementDrawElement(char *buff, uint8_t customElementIndex);