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/>.
21 #include "common/time.h"
22 #include "config/parameter_group.h"
24 #define VISIBLE_FLAG 0x0800
25 #define VISIBLE(x) (x & VISIBLE_FLAG)
26 #define OSD_POS_MAX 0x3FF
27 #define OSD_POSCFG_MAX (VISIBLE_FLAG|0x3FF) // For CLI values
31 OSD_MAIN_BATT_VOLTAGE
,
33 OSD_ARTIFICIAL_HORIZON
,
51 OSD_MAIN_BATT_WARNING
,
55 OSD_ITEM_COUNT
// MUST BE LAST
63 typedef struct osdConfig_s
{
64 uint16_t item_pos
[OSD_ITEM_COUNT
];
75 extern uint32_t resumeRefreshAt
;
77 PG_DECLARE(osdConfig_t
, osdConfig
);
80 void osdInit(struct displayPort_s
*osdDisplayPort
);
81 void osdResetConfig(osdConfig_t
*osdProfile
);
82 void osdResetAlarms(void);
83 void osdUpdate(timeUs_t currentTimeUs
);