mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Made displayPort a parameter to osdInit
This commit is contained in:
parent
c97e71e995
commit
3cf46ff16c
3 changed files with 7 additions and 5 deletions
|
@ -46,7 +46,6 @@
|
||||||
#include "cms/cms_menu_osd.h"
|
#include "cms/cms_menu_osd.h"
|
||||||
|
|
||||||
#include "io/flashfs.h"
|
#include "io/flashfs.h"
|
||||||
#include "io/displayport_max7456.h"
|
|
||||||
#include "io/osd.h"
|
#include "io/osd.h"
|
||||||
|
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
|
@ -411,9 +410,9 @@ void osdResetConfig(osd_profile_t *osdProfile)
|
||||||
osdProfile->alt_alarm = 100; // meters or feet depend on configuration
|
osdProfile->alt_alarm = 100; // meters or feet depend on configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
void osdInit(void)
|
void osdInit(displayPort_t *osdDisplayPortToUse)
|
||||||
{
|
{
|
||||||
osdDisplayPort = max7456DisplayPortInit(masterConfig.osdProfile.video_system);
|
osdDisplayPort = osdDisplayPortToUse;
|
||||||
#ifdef CMS
|
#ifdef CMS
|
||||||
cmsDisplayPortRegister(osdDisplayPort);
|
cmsDisplayPortRegister(osdDisplayPort);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -60,7 +60,8 @@ typedef struct osd_profile_s {
|
||||||
osd_unit_e units;
|
osd_unit_e units;
|
||||||
} osd_profile_t;
|
} osd_profile_t;
|
||||||
|
|
||||||
void osdInit(void);
|
struct displayPort_s;
|
||||||
|
void osdInit(struct displayPort_s *osdDisplayPort);
|
||||||
void osdResetConfig(osd_profile_t *osdProfile);
|
void osdResetConfig(osd_profile_t *osdProfile);
|
||||||
void osdResetAlarms(void);
|
void osdResetAlarms(void);
|
||||||
void osdUpdate(uint32_t currentTime);
|
void osdUpdate(uint32_t currentTime);
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
#include "rx/spektrum.h"
|
#include "rx/spektrum.h"
|
||||||
|
|
||||||
#include "io/beeper.h"
|
#include "io/beeper.h"
|
||||||
|
#include "io/displayport_max7456.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
#include "io/flashfs.h"
|
#include "io/flashfs.h"
|
||||||
#include "io/gps.h"
|
#include "io/gps.h"
|
||||||
|
@ -406,7 +407,8 @@ void init(void)
|
||||||
|
|
||||||
#ifdef OSD
|
#ifdef OSD
|
||||||
if (feature(FEATURE_OSD)) {
|
if (feature(FEATURE_OSD)) {
|
||||||
osdInit();
|
displayPort_t *osdDisplayPort = max7456DisplayPortInit(masterConfig.osdProfile.video_system);
|
||||||
|
osdInit(osdDisplayPort);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue