mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-18 11:02:16 +00:00
fix compilation for native + t-deck
This commit is contained in:
parent
cc359aaab9
commit
125ecca85f
@ -23,7 +23,7 @@ lib_deps =
|
|||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
||||||
rweather/Crypto@^0.4.0
|
rweather/Crypto@^0.4.0
|
||||||
lovyan03/LovyanGFX@^1.1.12
|
;lovyan03/LovyanGFX@^1.1.12
|
||||||
|
|
||||||
build_flags =
|
build_flags =
|
||||||
${arduino_base.build_flags}
|
${arduino_base.build_flags}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "MeshService.h"
|
#include "MeshService.h"
|
||||||
#include "PowerFSM.h"
|
#include "PowerFSM.h"
|
||||||
#include "RadioLibInterface.h"
|
#include "RadioLibInterface.h"
|
||||||
|
#include "buzz.h"
|
||||||
#include "graphics/Screen.h"
|
#include "graphics/Screen.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "modules/ExternalNotificationModule.h"
|
#include "modules/ExternalNotificationModule.h"
|
||||||
|
@ -907,7 +907,7 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O
|
|||||||
#elif defined(USE_ST7567)
|
#elif defined(USE_ST7567)
|
||||||
dispdev = new ST7567Wire(address.address, -1, -1, geometry,
|
dispdev = new ST7567Wire(address.address, -1, -1, geometry,
|
||||||
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
||||||
#elif ARCH_PORTDUINO
|
#elif ARCH_PORTDUINO && !HAS_TFT
|
||||||
if (settingsMap[displayPanel] != no_screen) {
|
if (settingsMap[displayPanel] != no_screen) {
|
||||||
LOG_DEBUG("Making TFTDisplay!\n");
|
LOG_DEBUG("Making TFTDisplay!\n");
|
||||||
dispdev = new TFTDisplay(address.address, -1, -1, geometry,
|
dispdev = new TFTDisplay(address.address, -1, -1, geometry,
|
||||||
@ -1056,7 +1056,7 @@ void Screen::setup()
|
|||||||
#endif
|
#endif
|
||||||
serialSinceMsec = millis();
|
serialSinceMsec = millis();
|
||||||
|
|
||||||
#if ARCH_PORTDUINO
|
#if ARCH_PORTDUINO && !HAS_TFT
|
||||||
if (settingsMap[touchscreenModule]) {
|
if (settingsMap[touchscreenModule]) {
|
||||||
touchScreenImpl1 =
|
touchScreenImpl1 =
|
||||||
new TouchScreenImpl1(dispdev->getWidth(), dispdev->getHeight(), static_cast<TFTDisplay *>(dispdev)->getTouch);
|
new TouchScreenImpl1(dispdev->getWidth(), dispdev->getHeight(), static_cast<TFTDisplay *>(dispdev)->getTouch);
|
||||||
|
@ -333,7 +333,7 @@ static LGFX *tft = nullptr;
|
|||||||
#include <TFT_eSPI.h> // Graphics and font library for ILI9341 driver chip
|
#include <TFT_eSPI.h> // Graphics and font library for ILI9341 driver chip
|
||||||
|
|
||||||
static TFT_eSPI *tft = nullptr; // Invoke library, pins defined in User_Setup.h
|
static TFT_eSPI *tft = nullptr; // Invoke library, pins defined in User_Setup.h
|
||||||
#elif ARCH_PORTDUINO
|
#elif ARCH_PORTDUINO && !HAS_TFT
|
||||||
#include <LovyanGFX.hpp> // Graphics and font library for ST7735 driver chip
|
#include <LovyanGFX.hpp> // Graphics and font library for ST7735 driver chip
|
||||||
|
|
||||||
class LGFX : public lgfx::LGFX_Device
|
class LGFX : public lgfx::LGFX_Device
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#if ARCH_PORTDUINO
|
#if ARCH_PORTDUINO
|
||||||
#include "PortduinoGlue.h"
|
#include "PortduinoGlue.h"
|
||||||
#endif
|
#endif
|
||||||
#if HAS_SCREEN
|
#if HAS_SCREEN || HAS_TFT
|
||||||
#include "CannedMessageModule.h"
|
#include "CannedMessageModule.h"
|
||||||
#include "Channels.h"
|
#include "Channels.h"
|
||||||
#include "FSCommon.h"
|
#include "FSCommon.h"
|
||||||
@ -497,6 +497,7 @@ int CannedMessageModule::getPrevIndex()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !HAS_TFT
|
||||||
void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||||
{
|
{
|
||||||
char buffer[50];
|
char buffer[50];
|
||||||
@ -594,6 +595,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ProcessMessage CannedMessageModule::handleReceived(const meshtastic_MeshPacket &mp)
|
ProcessMessage CannedMessageModule::handleReceived(const meshtastic_MeshPacket &mp)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,9 @@ class CannedMessageModule : public SinglePortModule, public Observable<const UIF
|
|||||||
int handleInputEvent(const InputEvent *event);
|
int handleInputEvent(const InputEvent *event);
|
||||||
virtual bool wantUIFrame() override { return this->shouldDraw(); }
|
virtual bool wantUIFrame() override { return this->shouldDraw(); }
|
||||||
virtual Observable<const UIFrameEvent *> *getUIFrameObservable() override { return this; }
|
virtual Observable<const UIFrameEvent *> *getUIFrameObservable() override { return this; }
|
||||||
|
#if !HAS_TFT
|
||||||
virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;
|
virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;
|
||||||
|
#endif
|
||||||
virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp,
|
virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp,
|
||||||
meshtastic_AdminMessage *request,
|
meshtastic_AdminMessage *request,
|
||||||
meshtastic_AdminMessage *response) override;
|
meshtastic_AdminMessage *response) override;
|
||||||
|
@ -1,9 +1,37 @@
|
|||||||
[env:native]
|
[env:native]
|
||||||
|
;extends = portduino_base
|
||||||
|
;build_flags = ${portduino_base.build_flags} -O0
|
||||||
|
; -I variants/portduino
|
||||||
|
;board = cross_platform
|
||||||
|
;lib_deps = ${portduino_base.lib_deps}
|
||||||
|
; lovyan03/LovyanGFX@^1.1.12
|
||||||
|
;build_src_filter = ${portduino_base.build_src_filter}
|
||||||
|
|
||||||
|
;[env:native-x11-320x240]
|
||||||
extends = portduino_base
|
extends = portduino_base
|
||||||
build_flags = ${portduino_base.build_flags} -O0
|
build_flags = ${portduino_base.build_flags} -O0 -lX11
|
||||||
-I variants/portduino
|
-I variants/portduino
|
||||||
-D USE_PACKET_API
|
-D DEBUG_HEAP
|
||||||
-D DEBUG_HEAP
|
-D SIMULATOR=1
|
||||||
|
-D HAS_TFT=1
|
||||||
|
-D HAS_SCREEN=0
|
||||||
|
-D USE_X11=1
|
||||||
|
-D USE_PACKET_API
|
||||||
|
-D VIEW_320x240
|
||||||
|
-D VIEW_CLASS=TFTView_320x240
|
||||||
|
-D VIEW_CLASS_INC=\"TFTView_320x240.h\"
|
||||||
|
-D LV_BUILD_TEST=0
|
||||||
|
-D DISP_HOR_RES=320
|
||||||
|
-D DISP_VER_RES=240
|
||||||
|
-DLV_LVGL_H_INCLUDE_SIMPLE
|
||||||
|
-DLV_CONF_INCLUDE_SIMPLE
|
||||||
|
-DLV_COMP_CONF_INCLUDE_SIMPLE
|
||||||
|
-I lib/device-ui/generated/ui_320x240
|
||||||
board = cross_platform
|
board = cross_platform
|
||||||
lib_deps = ${portduino_base.lib_deps}
|
lib_deps = ${portduino_base.lib_deps}
|
||||||
build_src_filter = ${portduino_base.build_src_filter} +<mesh/sharedMem/>
|
https://github.com/lvgl/lv_drivers.git ; x11 is currently only supported in master branch, not in 8.3.0
|
||||||
|
build_src_filter = ${portduino_base.build_src_filter}
|
||||||
|
-<graphics/TFTDisplay.cpp>
|
||||||
|
+<../lib/device-ui/generated/ui_320x240>
|
||||||
|
+<../lib/device-ui/resources>
|
||||||
|
+<mesh/sharedMem/>
|
||||||
|
Loading…
Reference in New Issue
Block a user