mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-14 06:42:34 +00:00
Plain RAK4631 should not compile EInk and TFT display code (#8811)
* Plain RAK4631 should not compile EInk and TFT display code * Add USE_TFTDISPLAY to variant files. * Derp * Undo the platformio.ini changes to heltec_v4 * Drop unneeded src_filter lines --------- Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz> Co-authored-by: Jason P <applewiz@mac.com>
This commit is contained in:
@@ -36,6 +36,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* Offer chance for variant-specific defines */
|
/* Offer chance for variant-specific defines */
|
||||||
#include "variant.h"
|
#include "variant.h"
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// Display feature overrides
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Allow build environments to opt-in explicitly to the E-Ink UI stack while
|
||||||
|
// keeping headless targets slim by default. Existing variants that already
|
||||||
|
// define USE_EINK continue to work without additional flags.
|
||||||
|
#ifndef MESHTASTIC_USE_EINK_UI
|
||||||
|
#ifdef USE_EINK
|
||||||
|
#define MESHTASTIC_USE_EINK_UI 1
|
||||||
|
#else
|
||||||
|
#define MESHTASTIC_USE_EINK_UI 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if MESHTASTIC_USE_EINK_UI
|
||||||
|
#ifndef USE_EINK
|
||||||
|
#define USE_EINK
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#undef USE_EINK
|
||||||
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Version
|
// Version
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@@ -371,6 +394,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef HAS_BLUETOOTH
|
#ifndef HAS_BLUETOOTH
|
||||||
#define HAS_BLUETOOTH 0
|
#define HAS_BLUETOOTH 0
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef USE_TFTDISPLAY
|
||||||
|
#define USE_TFTDISPLAY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HW_VENDOR
|
#ifndef HW_VENDOR
|
||||||
#error HW_VENDOR must be defined
|
#error HW_VENDOR must be defined
|
||||||
|
|||||||
@@ -69,7 +69,11 @@ using graphics::Emote;
|
|||||||
using graphics::emotes;
|
using graphics::emotes;
|
||||||
using graphics::numEmotes;
|
using graphics::numEmotes;
|
||||||
|
|
||||||
|
#if USE_TFTDISPLAY
|
||||||
extern uint16_t TFT_MESH;
|
extern uint16_t TFT_MESH;
|
||||||
|
#else
|
||||||
|
uint16_t TFT_MESH = COLOR565(0x67, 0xEA, 0x94);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_WIFI && !defined(ARCH_PORTDUINO)
|
#if HAS_WIFI && !defined(ARCH_PORTDUINO)
|
||||||
#include "mesh/wifi/WiFiAPClient.h"
|
#include "mesh/wifi/WiFiAPClient.h"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#if USE_TFTDISPLAY
|
||||||
|
|
||||||
#if ARCH_PORTDUINO
|
#if ARCH_PORTDUINO
|
||||||
#include "platform/portduino/PortduinoGlue.h"
|
#include "platform/portduino/PortduinoGlue.h"
|
||||||
@@ -1138,9 +1139,6 @@ static LGFX *tft = nullptr;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ST7701_CS) || defined(ST7735_CS) || defined(ST7789_CS) || defined(ST7796_CS) || defined(ILI9341_DRIVER) || \
|
|
||||||
defined(ILI9342_DRIVER) || defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST72xx_DE) || \
|
|
||||||
(ARCH_PORTDUINO && HAS_SCREEN != 0) || defined(HACKADAY_COMMUNICATOR)
|
|
||||||
#include "SPILock.h"
|
#include "SPILock.h"
|
||||||
#include "TFTDisplay.h"
|
#include "TFTDisplay.h"
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
@@ -1518,4 +1516,4 @@ bool TFTDisplay::connect()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // USE_TFTDISPLAY
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
|
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
|
||||||
#define DISPLAY_FORCE_SMALL_FONTS
|
#define DISPLAY_FORCE_SMALL_FONTS
|
||||||
#define TFT_BACKLIGHT_ON LOW
|
#define TFT_BACKLIGHT_ON LOW
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
// Battery
|
// Battery
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ build_src_filter =
|
|||||||
build_flags =
|
build_flags =
|
||||||
${esp32_base.build_flags}
|
${esp32_base.build_flags}
|
||||||
-I variants/esp32/m5stack_core
|
-I variants/esp32/m5stack_core
|
||||||
-DILI9341_DRIVER
|
|
||||||
-DM5STACK
|
-DM5STACK
|
||||||
-DUSER_SETUP_LOADED
|
-DUSER_SETUP_LOADED
|
||||||
-DTFT_SDA_READ
|
-DTFT_SDA_READ
|
||||||
|
|||||||
@@ -34,11 +34,13 @@
|
|||||||
#define GPS_RX_PIN 16
|
#define GPS_RX_PIN 16
|
||||||
#define GPS_TX_PIN 17
|
#define GPS_TX_PIN 17
|
||||||
|
|
||||||
|
#define ILI9341_DRIVER
|
||||||
#define TFT_HEIGHT 240
|
#define TFT_HEIGHT 240
|
||||||
#define TFT_WIDTH 320
|
#define TFT_WIDTH 320
|
||||||
#define TFT_OFFSET_X 0
|
#define TFT_OFFSET_X 0
|
||||||
#define TFT_OFFSET_Y 0
|
#define TFT_OFFSET_Y 0
|
||||||
#define TFT_BUSY -1
|
#define TFT_BUSY -1
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
// LCD screens are slow, so slowdown the wipe so it looks better
|
// LCD screens are slow, so slowdown the wipe so it looks better
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 1 // fps
|
#define SCREEN_TRANSITION_FRAMERATE 1 // fps
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#define ST7789_SCK 18
|
#define ST7789_SCK 18
|
||||||
#define ST7789_CS 5
|
#define ST7789_CS 5
|
||||||
#define ST7789_RS 26
|
#define ST7789_RS 26
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
// I don't have a 'wiphone' but this I think should not be defined this way (don't set TFT_BL if we don't have a hw way to control
|
// I don't have a 'wiphone' but this I think should not be defined this way (don't set TFT_BL if we don't have a hw way to control
|
||||||
// it)
|
// it)
|
||||||
// #define ST7789_BL -1 // EXTENDER_PIN(9)
|
// #define ST7789_BL -1 // EXTENDER_PIN(9)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#define HAS_SCREEN 1
|
#define HAS_SCREEN 1
|
||||||
#define TFT_BLACK 0
|
#define TFT_BLACK 0
|
||||||
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define USE_POWERSAVE
|
#define USE_POWERSAVE
|
||||||
#define SLEEP_TIME 120
|
#define SLEEP_TIME 120
|
||||||
|
|||||||
@@ -34,6 +34,9 @@
|
|||||||
#define LORA_PA_EN 2
|
#define LORA_PA_EN 2
|
||||||
#define LORA_PA_TX_EN 46 // enable tx
|
#define LORA_PA_TX_EN 46 // enable tx
|
||||||
|
|
||||||
|
#if HAS_TFT
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* GPS pins
|
* GPS pins
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#define TFT_OFFSET_Y -1
|
#define TFT_OFFSET_Y -1
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||||
#define DISPLAY_FORCE_SMALL_FONTS
|
#define DISPLAY_FORCE_SMALL_FONTS
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
// pin 3 is Vext on v1.1 - HIGH enables LDO for Vext rail which goes to:
|
// pin 3 is Vext on v1.1 - HIGH enables LDO for Vext rail which goes to:
|
||||||
// GPS UC6580: GPS V_DET(8), VDD_IO(7), DCDC_IN(21), pulls up RESETN(17), D_SEL(33) and BOOT_MODE(34) through 10kR
|
// GPS UC6580: GPS V_DET(8), VDD_IO(7), DCDC_IN(21), pulls up RESETN(17), D_SEL(33) and BOOT_MODE(34) through 10kR
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||||
#define DISPLAY_FORCE_SMALL_FONTS
|
#define DISPLAY_FORCE_SMALL_FONTS
|
||||||
#define FORCE_LOW_RES 1
|
#define FORCE_LOW_RES 1
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
|
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
|
||||||
#define VEXT_ON_VALUE LOW
|
#define VEXT_ON_VALUE LOW
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#define TFT_INVERT false
|
#define TFT_INVERT false
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||||
#define DISPLAY_FORCE_SMALL_FONTS
|
#define DISPLAY_FORCE_SMALL_FONTS
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define VEXT_ENABLE 3 // active HIGH - powers the GPS, GPS LNA and OLED
|
#define VEXT_ENABLE 3 // active HIGH - powers the GPS, GPS LNA and OLED
|
||||||
#define VEXT_ON_VALUE HIGH
|
#define VEXT_ON_VALUE HIGH
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#define ST7789_CS 6
|
#define ST7789_CS 6
|
||||||
#define ST7789_RS 1
|
#define ST7789_RS 1
|
||||||
#define ST7789_BL 5
|
#define ST7789_BL 5
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define ST7789_RESET -1
|
#define ST7789_RESET -1
|
||||||
#define ST7789_MISO -1
|
#define ST7789_MISO -1
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#define TFT_BL 45
|
#define TFT_BL 45
|
||||||
#define SCREEN_ROTATE
|
#define SCREEN_ROTATE
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
|
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define HAS_TOUCHSCREEN 1
|
#define HAS_TOUCHSCREEN 1
|
||||||
#define SCREEN_TOUCH_INT (6 | IO_EXPANDER)
|
#define SCREEN_TOUCH_INT (6 | IO_EXPANDER)
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#define SCREEN_ROTATE
|
#define SCREEN_ROTATE
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 5
|
#define SCREEN_TRANSITION_FRAMERATE 5
|
||||||
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define HAS_TOUCHSCREEN 1
|
#define HAS_TOUCHSCREEN 1
|
||||||
#define SCREEN_TOUCH_INT 16
|
#define SCREEN_TOUCH_INT 16
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#define TFT_OFFSET_ROTATION 2
|
#define TFT_OFFSET_ROTATION 2
|
||||||
#define SCREEN_ROTATE
|
#define SCREEN_ROTATE
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
|
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define HAS_TOUCHSCREEN 1
|
#define HAS_TOUCHSCREEN 1
|
||||||
#define SCREEN_TOUCH_INT 16
|
#define SCREEN_TOUCH_INT 16
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#define SCREEN_ROTATE
|
#define SCREEN_ROTATE
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 5
|
#define SCREEN_TRANSITION_FRAMERATE 5
|
||||||
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define I2C_SDA SDA
|
#define I2C_SDA SDA
|
||||||
#define I2C_SCL SCL
|
#define I2C_SCL SCL
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#define TFT_OFFSET_Y -1
|
#define TFT_OFFSET_Y -1
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||||
#define DISPLAY_FORCE_SMALL_FONTS
|
#define DISPLAY_FORCE_SMALL_FONTS
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost
|
#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost
|
||||||
#define VEXT_ON_VALUE HIGH
|
#define VEXT_ON_VALUE HIGH
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#define ST7789_CS 38
|
#define ST7789_CS 38
|
||||||
#define ST7789_RS 40
|
#define ST7789_RS 40
|
||||||
#define ST7789_BL 21
|
#define ST7789_BL 21
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
// P#define TFT_BL 21 /* V1.1 PCB marking */
|
// P#define TFT_BL 21 /* V1.1 PCB marking */
|
||||||
|
|
||||||
#define ST7789_RESET -1
|
#define ST7789_RESET -1
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#define TFT_INVERT false
|
#define TFT_INVERT false
|
||||||
#define SCREEN_ROTATE true
|
#define SCREEN_ROTATE true
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 5
|
#define SCREEN_TRANSITION_FRAMERATE 5
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define HAS_TOUCHSCREEN 1
|
#define HAS_TOUCHSCREEN 1
|
||||||
#define USE_XPT2046 1
|
#define USE_XPT2046 1
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#define HAS_SCREEN 1
|
#define HAS_SCREEN 1
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||||
#define HAS_GPS 1
|
#define HAS_GPS 1
|
||||||
#define MAX_RX_TOPHONE portduino_config.maxtophone
|
#define MAX_RX_TOPHONE portduino_config.maxtophone
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef HAS_SCREEN
|
#ifndef HAS_SCREEN
|
||||||
#define HAS_SCREEN 1
|
#define HAS_SCREEN 1
|
||||||
#endif
|
#endif
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||||
#define HAS_GPS 1
|
#define HAS_GPS 1
|
||||||
#define MAX_RX_TOPHONE portduino_config.maxtophone
|
#define MAX_RX_TOPHONE portduino_config.maxtophone
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ build_type = release
|
|||||||
build_flags = ${nrf52840_base.build_flags}
|
build_flags = ${nrf52840_base.build_flags}
|
||||||
-I variants/nrf52840/rak4631
|
-I variants/nrf52840/rak4631
|
||||||
-D RAK_4631
|
-D RAK_4631
|
||||||
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
-DMESHTASTIC_USE_EINK_UI=0
|
||||||
-DEINK_WIDTH=250
|
|
||||||
-DEINK_HEIGHT=122
|
|
||||||
-DRADIOLIB_EXCLUDE_SX128X=1
|
-DRADIOLIB_EXCLUDE_SX128X=1
|
||||||
-DRADIOLIB_EXCLUDE_SX127X=1
|
-DRADIOLIB_EXCLUDE_SX127X=1
|
||||||
-DRADIOLIB_EXCLUDE_LR11X0=1
|
-DRADIOLIB_EXCLUDE_LR11X0=1
|
||||||
@@ -30,7 +28,10 @@ build_src_filter = ${nrf52_base.build_src_filter} \
|
|||||||
+<../variants/nrf52840/rak4631> \
|
+<../variants/nrf52840/rak4631> \
|
||||||
+<mesh/eth/> \
|
+<mesh/eth/> \
|
||||||
+<mesh/api/> \
|
+<mesh/api/> \
|
||||||
+<mqtt/>
|
+<mqtt/> \
|
||||||
|
-<graphics/EInkDisplay2.cpp> \
|
||||||
|
-<graphics/EInkDynamicDisplay.cpp> \
|
||||||
|
-<graphics/fonts/EinkDisplayFonts.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
${nrf52_networking_base.lib_deps}
|
${nrf52_networking_base.lib_deps}
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
|||||||
#define SPI_FREQUENCY 50000000
|
#define SPI_FREQUENCY 50000000
|
||||||
#define TFT_SPI_PORT SPI1
|
#define TFT_SPI_PORT SPI1
|
||||||
#define ST7789_CS WB_SPI_CS // Adds compatibility with the rest of the checking for a ST7789 TFT.
|
#define ST7789_CS WB_SPI_CS // Adds compatibility with the rest of the checking for a ST7789 TFT.
|
||||||
|
#define USE_TFTDISPLAY 1
|
||||||
|
|
||||||
#define SCREEN_ROTATE
|
#define SCREEN_ROTATE
|
||||||
#define SCREEN_TRANSITION_FRAMERATE 5
|
#define SCREEN_TRANSITION_FRAMERATE 5
|
||||||
|
|||||||
Reference in New Issue
Block a user