mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Better initialization, according to #6286
This commit is contained in:
parent
a63beb5239
commit
0b01718869
4 changed files with 10 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -141,6 +141,11 @@ displayPort_t *displayPortHottInit()
|
|||
return &hottDisplayPort;
|
||||
}
|
||||
|
||||
void hottDisplayportRegister()
|
||||
{
|
||||
cmsDisplayPortRegister(displayPortHottInit());
|
||||
}
|
||||
|
||||
void hottCmsOpen()
|
||||
{
|
||||
if (!cmsInMenu) {
|
||||
|
|
|
@ -21,5 +21,6 @@
|
|||
displayPort_t *displayPortHottInit();
|
||||
displayPort_t hottDisplayPort;
|
||||
|
||||
void hottDisplayportRegister();
|
||||
void hottCmsOpen();
|
||||
void hottSetCmsKey(uint8_t hottKey, bool esc);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue