1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +03:00

Better initialization, according to #6286

This commit is contained in:
Andi Kanzler 2018-07-06 15:59:20 +02:00
parent a63beb5239
commit 0b01718869
4 changed files with 10 additions and 5 deletions

View file

@ -112,7 +112,6 @@
#include "io/beeper.h"
#include "io/displayport_max7456.h"
#include "io/displayport_srxl.h"
#include "io/displayport_hott.h"
#include "io/displayport_crsf.h"
#include "io/serial.h"
#include "io/flashfs.h"
@ -608,10 +607,6 @@ void init(void)
cmsDisplayPortRegister(displayPortCrsfInit());
#endif
#if defined (USE_HOTT_TEXTMODE) && defined (USE_CMS)
cmsDisplayPortRegister(displayPortHottInit());
#endif
#ifdef USE_GPS
if (feature(FEATURE_GPS)) {
gpsInit();

View file

@ -141,6 +141,11 @@ displayPort_t *displayPortHottInit()
return &hottDisplayPort;
}
void hottDisplayportRegister()
{
cmsDisplayPortRegister(displayPortHottInit());
}
void hottCmsOpen()
{
if (!cmsInMenu) {

View file

@ -21,5 +21,6 @@
displayPort_t *displayPortHottInit();
displayPort_t hottDisplayPort;
void hottDisplayportRegister();
void hottCmsOpen();
void hottSetCmsKey(uint8_t hottKey, bool esc);

View file

@ -342,6 +342,10 @@ void initHoTTTelemetry(void)
portConfig = findSerialPortConfig(FUNCTION_TELEMETRY_HOTT);
hottPortSharing = determinePortSharing(portConfig, FUNCTION_TELEMETRY_HOTT);
#if defined (USE_HOTT_TEXTMODE) && defined (USE_CMS)
hottDisplayportRegister();
#endif
initialiseMessages();
}