mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-22 04:54:47 +00:00
fix TFT initialization
This commit is contained in:
parent
1997b3df9c
commit
ce39c5133a
16
src/main.cpp
16
src/main.cpp
@ -89,14 +89,12 @@ NRF52Bluetooth *nrf52Bluetooth;
|
||||
AudioThread *audioThread;
|
||||
#endif
|
||||
|
||||
#ifdef USE_PACKET_API
|
||||
#ifdef HAS_TFT
|
||||
#include "DeviceScreen.h"
|
||||
#include "sharedMem/MeshPacketServer.h"
|
||||
#include "sharedMem/PacketClient.h"
|
||||
#endif
|
||||
|
||||
#ifdef LGFX_TDECK
|
||||
#include "DeviceScreen.h"
|
||||
DeviceScreen *screen = nullptr;
|
||||
DeviceScreen *deviceScreen = nullptr;
|
||||
#endif
|
||||
|
||||
using namespace concurrency;
|
||||
@ -364,10 +362,10 @@ void setup()
|
||||
// There needs to be a delay after power on, give LILYGO-KEYBOARD some startup time
|
||||
// otherwise keyboard and touch screen will not work
|
||||
delay(200);
|
||||
#ifdef LGFX_TDECK
|
||||
screen = &DeviceScreen::create();
|
||||
screen->init();
|
||||
#endif
|
||||
#ifdef HAS_TFT
|
||||
deviceScreen = &DeviceScreen::create();
|
||||
deviceScreen->init();
|
||||
#endif
|
||||
|
||||
// Currently only the tbeam has a PMU
|
||||
@ -874,7 +872,7 @@ void setup()
|
||||
initApiServer(TCPPort);
|
||||
#endif
|
||||
|
||||
#ifdef USE_PACKET_API
|
||||
#ifdef HAS_TFT
|
||||
MeshPacketServer::init();
|
||||
PacketClient::init();
|
||||
#endif
|
||||
|
@ -16,7 +16,6 @@ build_flags = ${portduino_base.build_flags} -O0 -lX11
|
||||
-D USE_X11=1
|
||||
-D HAS_TFT=1
|
||||
-D HAS_SCREEN=0
|
||||
-D USE_PACKET_API
|
||||
-D VIEW_320x240
|
||||
-D VIEW_CLASS=TFTView_320x240
|
||||
-D VIEW_CLASS_INC=\"TFTView_320x240.h\"
|
||||
|
@ -19,7 +19,6 @@ build_flags = ${esp32_base.build_flags}
|
||||
-D VIEW_CLASS=TFTView_320x240
|
||||
-D VIEW_CLASS_INC=\"TFTView_320x240.h\"
|
||||
-D USE_DOUBLE_BUFFER
|
||||
-D USE_PACKET_API
|
||||
-I lib/device-ui/generated/ui_320x240
|
||||
-I variants/t-deck
|
||||
build_src_filter = ${esp32_base.build_src_filter} +<mesh/sharedMem/>
|
||||
|
Loading…
Reference in New Issue
Block a user