2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
23 #include "drivers/display.h"
28 OSD_ELEMENT_TYPE_1
= 0,
34 typedef struct osdElementParms_s
{
40 osdElementType_e type
;
42 displayPort_t
*osdDisplayPort
;
48 typedef void (*osdElementDrawFn
)(osdElementParms_t
*element
);
50 int osdConvertTemperatureToSelectedUnit(int tempInDegreesCelcius
);
51 void osdFormatDistanceString(char *result
, int distance
, char leadingSymbol
);
52 bool osdFormatRtcDateTime(char *buffer
);
53 void osdFormatTime(char * buff
, osd_timer_precision_e precision
, timeUs_t time
);
54 void osdFormatTimer(char *buff
, bool showSymbol
, bool usePrecision
, int timerIndex
);
55 float osdGetMetersToSelectedUnit(int32_t meters
);
56 char osdGetMetersToSelectedUnitSymbol(void);
57 int32_t osdGetSpeedToSelectedUnit(int32_t value
);
58 char osdGetSpeedToSelectedUnitSymbol(void);
59 char osdGetTemperatureSymbolForSelectedUnit(void);
60 void osdAddActiveElements(void);
61 bool osdIsRenderPending(void);
62 uint8_t osdGetActiveElement(void);
63 uint8_t osdGetActiveElementCount(void);
64 bool osdDrawNextActiveElement(displayPort_t
*osdDisplayPort
);
65 bool osdDisplayActiveElement(void);
66 void osdDrawActiveElementsBackground(displayPort_t
*osdDisplayPort
);
67 void osdElementsInit(bool backgroundLayerFlag
);
68 void osdSyncBlink(timeUs_t currentTimeUs
);
69 void osdResetAlarms(void);
70 void osdUpdateAlarms(void);
71 bool osdElementsNeedAccelerometer(void);
72 #ifdef USE_SPEC_PREARM_SCREEN
73 bool osdDrawSpec(displayPort_t
*osdDisplayPort
);
74 #endif // USE_SPEC_PREARM_SCREEN