Merge branch 'master' into nomad-gemini

This commit is contained in:
Thomas Göttgens
2025-03-02 12:01:43 +01:00
committed by GitHub
240 changed files with 14401 additions and 2127 deletions

View File

@@ -10,5 +10,5 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/Dongle_nRF52840-pca10059-v
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/Dongle_nRF52840-pca10059-v1>
lib_deps =
${nrf52840_base.lib_deps}
zinggjm/GxEPD2@^1.4.9
debug_tool = jlink
zinggjm/GxEPD2@^1.6.2
debug_tool = jlink

View File

@@ -13,7 +13,7 @@ board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/ME25LS01-4Y10TD_e-ink>
lib_deps =
${nrf52840_base.lib_deps}
zinggjm/GxEPD2@^1.5.8
zinggjm/GxEPD2@^1.6.2
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
upload_protocol = nrfutil
upload_port = /dev/ttyACM1
upload_port = /dev/ttyACM1

View File

@@ -5,13 +5,13 @@ board = nordic_pca10059
build_flags = ${nrf52840_base.build_flags} -Ivariants/MakePython_nRF52840_eink -D PRIVATE_HW
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-D PIN_EINK_EN
-DEINK_DISPLAY_MODEL=GxEPD2_290_T5D
-DEINK_WIDTH=296
-DEINK_HEIGHT=128
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MakePython_nRF52840_eink>
lib_deps =
${nrf52840_base.lib_deps}
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
zinggjm/GxEPD2@^1.4.9
-DEINK_DISPLAY_MODEL=GxEPD2_290_T5D
-DEINK_WIDTH=296
-DEINK_HEIGHT=128
zinggjm/GxEPD2@^1.6.2
debug_tool = jlink
;upload_port = /dev/ttyACM4
;upload_port = /dev/ttyACM4

View File

@@ -6,5 +6,5 @@ build_flags = ${nrf52840_base.build_flags} -I variants/TWC_mesh_v4 -D TWC_mesh_v
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/TWC_mesh_v4>
lib_deps =
${nrf52840_base.lib_deps}
zinggjm/GxEPD2@^1.4.9
debug_tool = jlink
zinggjm/GxEPD2@^1.6.2
debug_tool = jlink

View File

@@ -21,5 +21,5 @@ build_flags = ${esp32s3_base.build_flags}
-DEINK_HEIGHT=128
lib_deps = ${esp32s3_base.lib_deps}
zinggjm/GxEPD2@^1.5.3
zinggjm/GxEPD2@^1.6.2
adafruit/Adafruit NeoPixel @ ^1.12.0

View File

@@ -0,0 +1,115 @@
#pragma once
#include "configuration.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
// InkHUD-specific components
// ---------------------------
#include "graphics/niche/InkHUD/WindowManager.h"
// Applets
#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h"
#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h"
#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h"
#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h"
#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h"
#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h"
// #include "graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.h"
// #include "graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.h"
// Shared NicheGraphics components
// --------------------------------
#include "graphics/niche/Drivers/EInk/LCMEN2R13EFC1.h"
#include "graphics/niche/Inputs/TwoButton.h"
#include "graphics/niche/Fonts/FreeSans6pt7b.h"
#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h"
#include <Fonts/FreeSans9pt7b.h>
void setupNicheGraphics()
{
using namespace NicheGraphics;
// SPI
// -----------------------------
// Display is connected to HSPI
SPIClass *hspi = new SPIClass(HSPI);
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);
// E-Ink Driver
// -----------------------------
// Use E-Ink driver
Drivers::EInk *driver = new Drivers::LCMEN213EFC1;
driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);
// InkHUD
// ----------------------------
InkHUD::WindowManager *windowManager = InkHUD::WindowManager::getInstance();
// Set the driver
windowManager->setDriver(driver);
// Set how many FAST updates per FULL update
// Set how unhealthy additional FAST updates beyond this number are
windowManager->setDisplayResilience(10, 1.5);
// Prepare fonts
InkHUD::AppletFont largeFont(FreeSans9pt7b);
InkHUD::AppletFont smallFont(FreeSans6pt7b);
/*
// Font localization demo: Cyrillic
InkHUD::AppletFont smallFont(FreeSans6pt8bCyrillic);
smallFont.addSubstitutionsWin1251();
*/
InkHUD::Applet::setDefaultFonts(largeFont, smallFont);
// Init settings, and customize defaults
InkHUD::settings.userTiles.maxCount = 2; // How many tiles can the display handle?
InkHUD::settings.rotation = 3; // 270 degrees clockwise
InkHUD::settings.userTiles.count = 1; // One tile only by default, keep things simple for new users
InkHUD::settings.optionalMenuItems.nextTile = false; // Behavior handled by aux button instead
// Pick applets
// Note: order of applets determines priority of "auto-show" feature
// Optional arguments for defaults:
// - is activated?
// - is autoshown?
// - is foreground on a specific tile (index)?
windowManager->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown
windowManager->addApplet("DMs", new InkHUD::DMApplet);
windowManager->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0));
windowManager->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1));
windowManager->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated
windowManager->addApplet("Recents List", new InkHUD::RecentsListApplet);
windowManager->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0
// windowManager->addApplet("Basic", new InkHUD::BasicExampleApplet);
// windowManager->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet);
// Start running window manager
windowManager->begin();
// Buttons
// --------------------------
Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component
constexpr uint8_t MAIN_BUTTON = 0;
constexpr uint8_t AUX_BUTTON = 1;
// Setup the main user button
buttons->setWiring(MAIN_BUTTON, BUTTON_PIN);
buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::WindowManager::getInstance()->handleButtonShort(); });
buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::WindowManager::getInstance()->handleButtonLong(); });
// Setup the aux button
// Bonus feature of VME213
buttons->setWiring(AUX_BUTTON, BUTTON_PIN_SECONDARY);
buttons->setHandlerShortPress(AUX_BUTTON, []() { InkHUD::WindowManager::getInstance()->nextTile(); });
buttons->start();
}
#endif

View File

@@ -5,6 +5,7 @@ build_flags =
${esp32s3_base.build_flags}
-Ivariants/heltec_vision_master_e213
-DHELTEC_VISION_MASTER_E213
-DUSE_EINK
-DEINK_DISPLAY_MODEL=GxEPD2_213_FC1
-DEINK_WIDTH=250
-DEINK_HEIGHT=122
@@ -16,4 +17,24 @@ lib_deps =
${esp32s3_base.lib_deps}
https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d
lewisxhe/PCF8563_Library@^1.0.1
upload_speed = 115200
; Using experimental InkHUD UI (work in progress)
[platformio]
extra_configs = src/graphics/niche/InkHUD/PlatformioConfig.ini
[env:heltec-vision-master-e213-inkhud]
extends = esp32s3_base, inkhud
board = heltec_vision_master_e213
build_src_filter =
${esp32_base.build_src_filter}
${inkhud.build_src_filter}
build_flags =
${esp32s3_base.build_flags}
${inkhud.build_flags}
-I variants/heltec_vision_master_e213
-D HELTEC_VISION_MASTER_E213
-D MAX_THREADS=40
lib_deps =
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot intead of AdafruitGFX
${esp32s3_base.lib_deps}
upload_speed = 115200

View File

@@ -8,7 +8,6 @@
#define I2C_SCL SCL
// Display (E-Ink)
#define USE_EINK
#define PIN_EINK_CS 5
#define PIN_EINK_BUSY 1
#define PIN_EINK_DC 2

View File

@@ -0,0 +1,129 @@
/*
Most of the Meshtastic firmware uses preprocessor macros throughout the code to support different hardware variants.
NicheGraphics attempts a different approach:
Per-device config takes place in this setupNicheGraphics() method
(And a small amount in platformio.ini)
This file sets up InkHUD for Heltec VM-E290.
Different NicheGraphics UIs and different hardware variants will each have their own setup procedure.
*/
#pragma once
#include "configuration.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
// InkHUD-specific components
// ---------------------------
#include "graphics/niche/InkHUD/WindowManager.h"
// Applets
#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h"
#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h"
#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h"
#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h"
#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h"
#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h"
// #include "graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.h"
// #include "graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.h"
// Shared NicheGraphics components
// --------------------------------
#include "graphics/niche/Drivers/EInk/DEPG0290BNS800.h"
#include "graphics/niche/Inputs/TwoButton.h"
#include "graphics/niche/Fonts/FreeSans6pt7b.h"
#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h"
#include <Fonts/FreeSans9pt7b.h>
void setupNicheGraphics()
{
using namespace NicheGraphics;
// SPI
// -----------------------------
// Display is connected to HSPI
SPIClass *hspi = new SPIClass(HSPI);
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);
// E-Ink Driver
// -----------------------------
// Use E-Ink driver
Drivers::EInk *driver = new Drivers::DEPG0290BNS800;
driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY);
// InkHUD
// ----------------------------
InkHUD::WindowManager *windowManager = InkHUD::WindowManager::getInstance();
// Set the driver
windowManager->setDriver(driver);
// Set how many FAST updates per FULL update
// Set how unhealthy additional FAST updates beyond this number are
windowManager->setDisplayResilience(7, 1.5);
// Prepare fonts
InkHUD::AppletFont largeFont(FreeSans9pt7b);
InkHUD::AppletFont smallFont(FreeSans6pt7b);
/*
// Font localization demo: Cyrillic
InkHUD::AppletFont smallFont(FreeSans6pt8bCyrillic);
smallFont.addSubstitutionsWin1251();
*/
InkHUD::Applet::setDefaultFonts(largeFont, smallFont);
// Init settings, and customize defaults
InkHUD::settings.userTiles.maxCount = 2; // How many tiles can the display handle?
InkHUD::settings.rotation = 1; // 90 degrees clockwise
InkHUD::settings.userTiles.count = 1; // One tile only by default, keep things simple for new users
InkHUD::settings.optionalMenuItems.nextTile = false; // Behavior handled by aux button instead
// Pick applets
// Note: order of applets determines priority of "auto-show" feature
// Optional arguments for defaults:
// - is activated?
// - is autoshown?
// - is foreground on a specific tile (index)?
windowManager->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown
windowManager->addApplet("DMs", new InkHUD::DMApplet);
windowManager->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0));
windowManager->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1));
windowManager->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated
windowManager->addApplet("Recents List", new InkHUD::RecentsListApplet);
windowManager->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0
// windowManager->addApplet("Basic", new InkHUD::BasicExampleApplet);
// windowManager->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet);
// Start running window manager
windowManager->begin();
// Buttons
// --------------------------
Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component
constexpr uint8_t MAIN_BUTTON = 0;
constexpr uint8_t AUX_BUTTON = 1;
// Setup the main user button
buttons->setWiring(MAIN_BUTTON, BUTTON_PIN);
buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::WindowManager::getInstance()->handleButtonShort(); });
buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::WindowManager::getInstance()->handleButtonLong(); });
// Setup the aux button
// Bonus feature of VME290
buttons->setWiring(AUX_BUTTON, BUTTON_PIN_SECONDARY);
buttons->setHandlerShortPress(AUX_BUTTON, []() { InkHUD::WindowManager::getInstance()->nextTile(); });
buttons->start();
}
#endif

View File

@@ -1,14 +1,17 @@
; Using the original screen class
[env:heltec-vision-master-e290]
extends = esp32s3_base
board = heltec_vision_master_e290
build_flags =
${esp32s3_base.build_flags}
-I variants/heltec_vision_master_e290
-D DISPLAY_FLIP_SCREEN ; Orient so the LoRa antenna faces up
-D HELTEC_VISION_MASTER_E290
-D BUTTON_CLICK_MS=200
-D EINK_DISPLAY_MODEL=GxEPD2_290_BN8
-D EINK_WIDTH=296
-D EINK_HEIGHT=128
-D USE_EINK
-D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
-D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
-D EINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
@@ -18,4 +21,24 @@ lib_deps =
${esp32s3_base.lib_deps}
https://github.com/meshtastic/GxEPD2#448c8538129fde3d02a7cb5e6fc81971ad92547f
lewisxhe/PCF8563_Library@^1.0.1
upload_speed = 115200
; Using experimental InkHUD UI (work in progress)
[platformio]
extra_configs = src/graphics/niche/InkHUD/PlatformioConfig.ini
[env:heltec-vision-master-e290-inkhud]
extends = esp32s3_base, inkhud
board = heltec_vision_master_e290
build_src_filter =
${esp32_base.build_src_filter}
${inkhud.build_src_filter}
build_flags =
${esp32s3_base.build_flags}
${inkhud.build_flags}
-I variants/heltec_vision_master_e290
-D HELTEC_VISION_MASTER_E290
-D MAX_THREADS=40
lib_deps =
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot intead of AdafruitGFX
${esp32s3_base.lib_deps}
upload_speed = 115200

View File

@@ -8,7 +8,6 @@
#define I2C_SCL SCL
// Display (E-Ink)
#define USE_EINK
#define PIN_EINK_CS 3
#define PIN_EINK_BUSY 6
#define PIN_EINK_DC 4

View File

@@ -0,0 +1,111 @@
#pragma once
#include "configuration.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
// InkHUD-specific components
// ---------------------------
#include "graphics/niche/InkHUD/WindowManager.h"
// Applets
#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h"
#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h"
#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h"
#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h"
#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h"
#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h"
// #include "graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.h"
// #include "graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.h"
// Shared NicheGraphics components
// --------------------------------
#include "graphics/niche/Drivers/EInk/LCMEN2R13EFC1.h"
#include "graphics/niche/Inputs/TwoButton.h"
#include "graphics/niche/Fonts/FreeSans6pt7b.h"
#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h"
#include <Fonts/FreeSans9pt7b.h>
void setupNicheGraphics()
{
using namespace NicheGraphics;
// SPI
// -----------------------------
// Display is connected to HSPI
SPIClass *hspi = new SPIClass(HSPI);
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);
// E-Ink Driver
// -----------------------------
// Use E-Ink driver
Drivers::EInk *driver = new Drivers::LCMEN213EFC1;
driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);
// InkHUD
// ----------------------------
InkHUD::WindowManager *windowManager = InkHUD::WindowManager::getInstance();
// Set the driver
windowManager->setDriver(driver);
// Set how many FAST updates per FULL update
// Set how unhealthy additional FAST updates beyond this number are
windowManager->setDisplayResilience(10, 1.5);
// Prepare fonts
InkHUD::AppletFont largeFont(FreeSans9pt7b);
InkHUD::AppletFont smallFont(FreeSans6pt7b);
/*
// Font localization demo: Cyrillic
InkHUD::AppletFont smallFont(FreeSans6pt8bCyrillic);
smallFont.addSubstitutionsWin1251();
*/
InkHUD::Applet::setDefaultFonts(largeFont, smallFont);
// Init settings, and customize defaults
InkHUD::settings.userTiles.maxCount = 2; // How many tiles can the display handle?
InkHUD::settings.rotation = 3; // 270 degrees clockwise
InkHUD::settings.userTiles.count = 1; // One tile only by default, keep things simple for new users
// Pick applets
// Note: order of applets determines priority of "auto-show" feature
// Optional arguments for defaults:
// - is activated?
// - is autoshown?
// - is foreground on a specific tile (index)?
windowManager->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown
windowManager->addApplet("DMs", new InkHUD::DMApplet);
windowManager->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0));
windowManager->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1));
windowManager->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated
windowManager->addApplet("Recents List", new InkHUD::RecentsListApplet);
windowManager->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0
// windowManager->addApplet("Basic", new InkHUD::BasicExampleApplet);
// windowManager->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet);
// Start running window manager
windowManager->begin();
// Buttons
// --------------------------
Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component
constexpr uint8_t MAIN_BUTTON = 0;
// Setup the main user button
buttons->setWiring(MAIN_BUTTON, BUTTON_PIN);
buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::WindowManager::getInstance()->handleButtonShort(); });
buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::WindowManager::getInstance()->handleButtonLong(); });
// No aux button on this board
buttons->start();
}
#endif

View File

@@ -1,3 +1,4 @@
; Using the original screen class
[env:heltec-wireless-paper]
extends = esp32s3_base
board = heltec_wifi_lora_32_V3
@@ -8,6 +9,7 @@ build_flags =
-D EINK_DISPLAY_MODEL=GxEPD2_213_FC1
-D EINK_WIDTH=250
-D EINK_HEIGHT=122
-D USE_EINK
-D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
-D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
-D EINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
@@ -16,4 +18,24 @@ lib_deps =
${esp32s3_base.lib_deps}
https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d
lewisxhe/PCF8563_Library@^1.0.1
upload_speed = 115200
; Using experimental InkHUD UI (work in progress)
[platformio]
extra_configs = src/graphics/niche/InkHUD/PlatformioConfig.ini
[env:heltec-wireless-paper-inkhud]
extends = esp32s3_base, inkhud
board = heltec_wifi_lora_32_V3
build_src_filter =
${esp32_base.build_src_filter}
${inkhud.build_src_filter}
build_flags =
${esp32s3_base.build_flags}
${inkhud.build_flags}
-I variants/heltec_wireless_paper
-D HELTEC_WIRELESS_PAPER
-D MAX_THREADS=40
lib_deps =
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot intead of AdafruitGFX
${esp32s3_base.lib_deps}
upload_speed = 115200

View File

@@ -6,7 +6,6 @@
#define I2C_SCL SCL
// Display (E-Ink)
#define USE_EINK
#define PIN_EINK_CS 4
#define PIN_EINK_BUSY 7
#define PIN_EINK_DC 5

View File

@@ -6,7 +6,7 @@ board_check = true
board_build.mcu = esp32s3
upload_protocol = esptool
upload_speed = 921600
platform_packages = framework-arduinoespressif32@https://github.com/PowerFeather/powerfeather-meshtastic-arduino-lib/releases/download/2.0.16a/esp32-2.0.16.zip
platform_packages = platformio/framework-arduinoespressif32@https://github.com/PowerFeather/powerfeather-meshtastic-arduino-lib/releases/download/2.0.16a/esp32-2.0.16.zip
lib_deps =
${esp32s3_base.lib_deps}
build_unflags =
@@ -16,4 +16,4 @@ build_flags =
${esp32s3_base.build_flags} -D PRIVATE_HW -I variants/icarus
-DBOARD_HAS_PSRAM
-DARDUINO_USB_MODE=0
-DARDUINO_USB_MODE=0

View File

@@ -17,11 +17,11 @@ build_flags =
-DM5STACK
lib_deps =
${esp32_base.lib_deps}
zinggjm/GxEPD2@^1.5.3
zinggjm/GxEPD2@^1.6.2
lewisxhe/PCF8563_Library@^1.0.1
lib_ignore =
m5stack-coreink
monitor_filters = esp32_exception_decoder
board_build.f_cpu = 240000000L
upload_protocol = esptool
upload_port = /dev/ttyACM0
upload_port = /dev/ttyACM0

View File

@@ -36,6 +36,7 @@ build_flags = ${esp32s3_base.build_flags}
-D RAM_SIZE=1024
-D LGFX_DRIVER_TEMPLATE
-D LGFX_DRIVER=LGFX_GENERIC
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_GENERIC.h\"
-D LGFX_PIN_SCK=12
-D LGFX_PIN_MOSI=13
-D LGFX_PIN_MISO=11

View File

@@ -9,10 +9,10 @@ upload_protocol = esptool
;upload_port = /dev/ttyACM1
upload_speed = 921600
platform_packages =
tool-esptoolpy@^1.40500.0
platformio/tool-esptoolpy@^1.40801.0
lib_deps =
${esp32_base.lib_deps}
zinggjm/GxEPD2@^1.5.1
zinggjm/GxEPD2@^1.6.2
adafruit/Adafruit NeoPixel @ ^1.12.0
build_unflags =
${esp32s3_base.build_unflags}

View File

@@ -9,7 +9,7 @@ upload_protocol = esptool
;upload_port = /dev/ttyACM0
upload_speed = 921600
platform_packages =
tool-esptoolpy@^1.40500.0
platformio/tool-esptoolpy@^1.40801.0
lib_deps =
${esp32_base.lib_deps}
adafruit/Adafruit NeoPixel @ ^1.12.0

View File

@@ -1,7 +1,7 @@
[env:picomputer-s3]
extends = esp32s3_base
board = bpi_picow_esp32_s3
board_check = true
;OpenOCD flash method
;upload_protocol = esp-builtin
;Normal method
@@ -15,3 +15,50 @@ build_flags =
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0
build_src_filter =
${esp32s3_base.build_src_filter}
[env:picomputer-s3-tft]
extends = env:picomputer-s3
board_build.partitions = default_8MB.csv ; just for test
build_flags =
${env:picomputer-s3.build_flags}
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
-D MESHTASTIC_EXCLUDE_BLUETOOTH=1
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
-D MESHTASTIC_EXCLUDE_SERIAL=1
-D MESHTASTIC_EXCLUDE_SOCKETAPI=1
-D INPUTDRIVER_MATRIX_TYPE=1
-D USE_PIN_BUZZER=PIN_BUZZER
-D USE_SX127x
-D MAX_NUM_NODES=200
-D HAS_SCREEN=0
-D HAS_TFT=1
-D RAM_SIZE=1024
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_CONF_INCLUDE_SIMPLE
-D LV_COMP_CONF_INCLUDE_SIMPLE
-D LV_USE_SYSMON=0
-D LV_USE_PROFILER=0
-D LV_USE_PERF_MONITOR=0
-D LV_USE_MEM_MONITOR=0
-D LV_USE_LOG=0
-D USE_LOG_DEBUG
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
-D LGFX_DRIVER=LGFX_PICOMPUTER_S3
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_PICOMPUTER_S3.h\"
-D VIEW_320x240
; -D USE_DOUBLE_BUFFER
-D USE_PACKET_API
-I lib/device-ui/generated/ui_320x240
build_src_filter =
${env:picomputer-s3.build_src_filter}
+<../lib/device-ui/generated/ui_320x240>
+<../lib/device-ui/resources>
+<../lib/device-ui/locale>
+<../lib/device-ui/source>

View File

@@ -1,15 +1,79 @@
[env:native]
[native_base]
extends = portduino_base
; The pkg-config commands below optionally add link flags.
; the || : is just a "or run the null command" to avoid returning an error code
build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino
build_flags = ${portduino_base.build_flags} -I variants/portduino
-D ARCH_PORTDUINO
-I /usr/include
!pkg-config --libs libulfius --silence-errors || :
!pkg-config --libs openssl --silence-errors || :
board = cross_platform
lib_deps = ${portduino_base.lib_deps}
build_src_filter = ${portduino_base.build_src_filter}
[env:native]
extends = native_base
; The pkg-config commands below optionally add link flags.
; the || : is just a "or run the null command" to avoid returning an error code
build_flags = ${native_base.build_flags}
!pkg-config --libs libulfius --silence-errors || :
!pkg-config --libs openssl --silence-errors || :
[env:native-tft]
extends = native_base
build_type = release
build_flags = ${native_base.build_flags} -Os -lX11 -linput -lxkbcommon -ffunction-sections -fdata-sections -Wl,--gc-sections
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D RAM_SIZE=16384
-D USE_X11=1
-D HAS_TFT=1
-D HAS_SCREEN=0
-D LV_BUILD_TEST=0
-D LV_USE_LIBINPUT=1
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_CONF_INCLUDE_SIMPLE
-D LV_COMP_CONF_INCLUDE_SIMPLE
-D USE_LOG_DEBUG
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
-D USE_PACKET_API
-I lib/device-ui/generated/ui_320x240
!pkg-config --libs libulfius --silence-errors || :
!pkg-config --libs openssl --silence-errors || :
build_src_filter = ${native_base.build_src_filter}
-<graphics/TFTDisplay.cpp>
+<../lib/device-ui/generated/ui_320x240>
+<../lib/device-ui/generated/ui_320x240/fonts>
+<../lib/device-ui/resources>
+<../lib/device-ui/portduino>
+<../lib/device-ui/locale>
+<../lib/device-ui/source>
[env:native-tft-debug]
extends = native_base
build_type = debug
board_level = extra
build_flags = ${native_base.build_flags} -O0 -fsanitize=address -lX11 -linput -lxkbcommon
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D DEBUG_HEAP
-D RAM_SIZE=16384
-D USE_X11=1
-D HAS_TFT=1
-D HAS_SCREEN=0
; -D CALIBRATE_TOUCH=0
-D LV_BUILD_TEST=0
-D LV_USE_LOG=1
-D LV_USE_SYSMON=1
-D LV_USE_PERF_MONITOR=1
-D LV_USE_MEM_MONITOR=0
-D LV_USE_PROFILER=0
-D LV_USE_LIBINPUT=1
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_CONF_INCLUDE_SIMPLE
-D LV_COMP_CONF_INCLUDE_SIMPLE
-D USE_LOG_DEBUG
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
-D USE_PACKET_API
-I lib/device-ui/generated/ui_320x240
!pkg-config --libs libulfius --silence-errors || :
!pkg-config --libs openssl --silence-errors || :
build_src_filter = ${env:native-tft.build_src_filter}
[env:coverage]
extends = env:native
build_flags = -lgcov --coverage -fprofile-abs-path -fsanitize=address ${env:native.build_flags}

View File

@@ -1,4 +1,6 @@
#ifndef HAS_SCREEN
#define HAS_SCREEN 1
#endif
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define HAS_GPS 1
#define MAX_RX_TOPHONE settingsMap[maxtophone]

View File

@@ -18,4 +18,4 @@ lib_deps =
${networking_base.lib_deps}
https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2
debug_build_flags = ${rp2040_base.build_flags}, -g
debug_tool = cmsis-dap ; for e.g. Picotool
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@@ -107,11 +107,15 @@ static const uint8_t AREF = PIN_AREF;
/*
* SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 1
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_MISO (29)
#define PIN_SPI_MOSI (30)
#define PIN_SPI_SCK (3)
#define PIN_SPI_MISO (45)
#define PIN_SPI_MOSI (44)
#define PIN_SPI_SCK (43)
#define PIN_SPI1_MISO (29) // (0 + 29)
#define PIN_SPI1_MOSI (30) // (0 + 30)
#define PIN_SPI1_SCK (3) // (0 + 3)
static const uint8_t SS = 42;
static const uint8_t MOSI = PIN_SPI_MOSI;
@@ -126,8 +130,8 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define PIN_EINK_BUSY (0 + 4)
#define PIN_EINK_DC (0 + 17)
#define PIN_EINK_RES (-1)
#define PIN_EINK_SCLK PIN_SPI_SCK
#define PIN_EINK_MOSI PIN_SPI_MOSI // also called SDI
#define PIN_EINK_SCLK (0 + 3)
#define PIN_EINK_MOSI (0 + 30) // also called SDI
// #define USE_EINK
@@ -255,7 +259,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
#define PIN_ETHERNET_RESET 21
#define PIN_ETHERNET_SS PIN_EINK_CS
#define ETH_SPI_PORT SPI
#define ETH_SPI_PORT SPI1
#define AQ_SET_PIN 10
#ifdef __cplusplus

View File

@@ -13,10 +13,10 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper>
lib_deps =
${nrf52840_base.lib_deps}
zinggjm/GxEPD2@^1.4.9
zinggjm/GxEPD2@^1.6.2
melopero/Melopero RV3028@^1.1.0
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
beegee-tokyo/RAKwireless RAK12034@^1.0.0
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink
;upload_protocol = jlink

View File

@@ -15,11 +15,11 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper_onrxtx>
lib_deps =
${nrf52840_base.lib_deps}
zinggjm/GxEPD2@^1.5.1
zinggjm/GxEPD2@^1.6.2
melopero/Melopero RV3028@^1.1.0
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
beegee-tokyo/RAKwireless RAK12034@^1.0.0
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink
;upload_port = /dev/ttyACM3
;upload_port = /dev/ttyACM3

View File

@@ -9,7 +9,7 @@ build_flags = ${rp2350_base.build_flags}
-Ivariants/rpipico2
-DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus"
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m33"
lib_deps =
${rp2350_base.lib_deps}
debug_build_flags = ${rp2350_base.build_flags}, -g

View File

@@ -0,0 +1,30 @@
[env:pico2w]
extends = rp2350_base
board = rpipico2w
upload_protocol = jlink
# debug settings for external openocd with RP2040 support (custom build)
debug_tool = custom
debug_init_cmds =
target extended-remote localhost:3333
$INIT_BREAK
monitor reset halt
$LOAD_CMDS
monitor init
monitor reset halt
# add our variants files to the include and src paths
build_flags = ${rp2350_base.build_flags}
-DRPI_PICO2
-Ivariants/rpipico2w
# -DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
-DARDUINO_RASPBERRY_PI_PICO_2W
-DARDUINO_ARCH_RP2040
-DHAS_WIFI=1
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m33"
-fexceptions # for exception handling in MQTT
build_src_filter = ${rp2350_base.build_src_filter} +<mesh/wifi/>
lib_deps =
${rp2350_base.lib_deps}
${networking_base.lib_deps}
debug_build_flags = ${rp2350_base.build_flags}, -g

View File

@@ -0,0 +1,52 @@
// #define RADIOLIB_CUSTOM_ARDUINO 1
// #define RADIOLIB_TONE_UNSUPPORTED 1
// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1
#define ARDUINO_ARCH_AVR
#ifndef HAS_WIFI
#define HAS_WIFI 1
#endif
// default I2C pins:
// SDA = 4
// SCL = 5
// Recommended pins for SerialModule:
// txd = 8
// rxd = 9
#define EXT_NOTIFY_OUT 22
#define BUTTON_PIN 17
#define BATTERY_PIN 26
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION
#define USE_SX1262
#undef LORA_SCK
#undef LORA_MISO
#undef LORA_MOSI
#undef LORA_CS
#define LORA_SCK 10
#define LORA_MISO 12
#define LORA_MOSI 11
#define LORA_CS 3
#define LORA_DIO0 RADIOLIB_NC
#define LORA_RESET 15
#define LORA_DIO1 20
#define LORA_DIO2 2
#define LORA_DIO3 RADIOLIB_NC
#ifdef USE_SX1262
#define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY LORA_DIO2
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#endif

View File

@@ -26,3 +26,57 @@ lib_deps = ${esp32s3_base.lib_deps}
https://github.com/mverch67/LovyanGFX#develop
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1
[env:seeed-sensecap-indicator-tft]
extends = env:seeed-sensecap-indicator
board_level = main
upload_speed = 460800
board_build.partitions = default_8MB.csv ; must be here for some reason, board.json is not enough !?
build_flags =
${env:seeed-sensecap-indicator.build_flags}
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
-D MESHTASTIC_EXCLUDE_SCREEN=1
-D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
-D MESHTASTIC_EXCLUDE_SERIAL=1
-D MESHTASTIC_EXCLUDE_SOCKETAPI=1
-D INPUTDRIVER_BUTTON_TYPE=38
-D HAS_TELEMETRY=0
-D CONFIG_DISABLE_HAL_LOCKS=1
-D MAX_NUM_NODES=250
-D HAS_SCREEN=0
-D HAS_TFT=1
-D DISPLAY_SET_RESOLUTION
-D USE_I2S_BUZZER
-D RAM_SIZE=4096
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_CONF_INCLUDE_SIMPLE
-D LV_COMP_CONF_INCLUDE_SIMPLE
-D LV_USE_SYSMON=0
-D LV_USE_PROFILER=0
-D LV_USE_PERF_MONITOR=0
-D LV_USE_MEM_MONITOR=0
-D LV_USE_LOG=0
-D USE_LOG_DEBUG
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
-D CUSTOM_TOUCH_DRIVER
-D LGFX_DRIVER=LGFX_INDICATOR
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_INDICATOR.h\"
-D VIEW_320x240
; -D USE_DOUBLE_BUFFER
-D USE_PACKET_API
-I lib/device-ui/generated/ui_320x240
build_src_filter =
${env:seeed-sensecap-indicator.build_src_filter}
+<../lib/device-ui/generated/ui_320x240>
+<../lib/device-ui/resources>
+<../lib/device-ui/locale>
+<../lib/device-ui/source>
lib_deps =
${env:seeed-sensecap-indicator.lib_deps}
https://github.com/bitbank2/bb_captouch.git#8f2f06462ff597847921739376a299db93612417 ; alternative touch library supporting FT6x36

View File

@@ -7,7 +7,9 @@
#define SENSOR_PORT_NUM 2
#define SENSOR_BAUD_RATE 115200
#if !HAS_TFT
#define BUTTON_PIN 38
#endif
// #define BUTTON_NEED_PULLUP
// #define BATTERY_PIN 27 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage

View File

@@ -36,6 +36,10 @@ L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-S
#define BUTTON_PIN 21 // This is the Program Button
#define BUTTON_NEED_PULLUP
#define BATTERY_PIN -1
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
#define BATTERY_SENSE_RESOLUTION_BITS 12
/*Warning:
https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
L76K Expansion Board can not directly used, L76K Reset Pin needs to override or physically remove it,

View File

@@ -4,7 +4,6 @@ extends = esp32s3_base
board = t-deck
board_check = true
upload_protocol = esptool
#upload_port = COM29
build_flags = ${esp32s3_base.build_flags}
-DT_DECK
@@ -17,3 +16,64 @@ lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1
[env:t-deck-tft]
extends = env:t-deck
board_build.partitions = default_16MB.csv
build_flags =
${env:t-deck.build_flags}
-D CONFIG_DISABLE_HAL_LOCKS=1 ; "feels" to be a bit more stable without locks
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
-D MESHTASTIC_EXCLUDE_SERIAL=1
-D MESHTASTIC_EXCLUDE_SOCKETAPI=1
-D INPUTDRIVER_I2C_KBD_TYPE=0x55
-D INPUTDRIVER_ENCODER_TYPE=3
-D INPUTDRIVER_ENCODER_LEFT=1
-D INPUTDRIVER_ENCODER_RIGHT=2
-D INPUTDRIVER_ENCODER_UP=3
-D INPUTDRIVER_ENCODER_DOWN=15
-D INPUTDRIVER_ENCODER_BTN=0
-D INPUTDRIVER_BUTTON_TYPE=0
-D MAX_NUM_NODES=250
-D HAS_SCREEN=0
-D HAS_TFT=1
-D USE_I2S_BUZZER
-D RAM_SIZE=4096
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_CONF_INCLUDE_SIMPLE
-D LV_COMP_CONF_INCLUDE_SIMPLE
-D LV_USE_SYSMON=0
-D LV_USE_PROFILER=0
-D LV_USE_PERF_MONITOR=0
-D LV_USE_MEM_MONITOR=0
-D LV_USE_LOG=0
-D USE_LOG_DEBUG
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
-D RADIOLIB_DEBUG_BASIC=0
-D RADIOLIB_DEBUG_SPI=0
-D RADIOLIB_DEBUG_PROTOCOL=0
-D RADIOLIB_SPI_PARANOID=0
-D CALIBRATE_TOUCH=0
-D LGFX_DRIVER=LGFX_TDECK
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_T_DECK.h\"
; -D LVGL_DRIVER=LVGL_TDECK
; -D GFX_DRIVER_INC=\"graphics/LVGL/LVGL_T_DECK.h\"
; -D LV_USE_ST7789=1
-D VIEW_320x240
; -D USE_DOUBLE_BUFFER
-D USE_PACKET_API
-I lib/device-ui/generated/ui_320x240
build_src_filter =
${env:t-deck.build_src_filter}
+<../lib/device-ui/generated/ui_320x240>
+<../lib/device-ui/resources>
+<../lib/device-ui/locale>
+<../lib/device-ui/source>
lib_deps =
${env:t-deck.lib_deps}

View File

@@ -1,5 +1,10 @@
#define TFT_CS 12
#ifndef HAS_TFT // for TFT-UI the definitions are in device-ui
#define BUTTON_PIN 0
// ST7789 TFT LCD
#define ST7789_CS 12
#define ST7789_CS TFT_CS
#define ST7789_RS 11 // DC
#define ST7789_SDA 41 // MOSI
#define ST7789_SCK 40
@@ -19,6 +24,7 @@
#define SCREEN_ROTATE
#define SCREEN_TRANSITION_FRAMERATE 5
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
#endif
#define HAS_TOUCHSCREEN 1
#define SCREEN_TOUCH_INT 16
@@ -42,6 +48,7 @@
#define SPI_MISO (38)
#define SPI_CS (39)
#define SDCARD_CS SPI_CS
#define SD_SPI_FREQUENCY 75000000U
#define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
// ratio of voltage divider = 2.0 (RD2=100k, RD3=100k)

View File

@@ -0,0 +1,126 @@
#pragma once
#include "configuration.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
// InkHUD-specific components
// ---------------------------
#include "graphics/niche/InkHUD/WindowManager.h"
// Applets
#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h"
#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h"
#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h"
#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h"
#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h"
#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h"
// #include "graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.h"
// #include "graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.h"
// Shared NicheGraphics components
// --------------------------------
#include "graphics/niche/Drivers/Backlight/LatchingBacklight.h"
#include "graphics/niche/Drivers/EInk/GDEY0154D67.h"
#include "graphics/niche/Inputs/TwoButton.h"
#include "graphics/niche/Fonts/FreeSans6pt7b.h"
#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h"
#include <Fonts/FreeSans9pt7b.h>
void setupNicheGraphics()
{
using namespace NicheGraphics;
// SPI
// -----------------------------
// For NRF52 platforms, SPI pins are defined in variant.h, not passed to begin()
SPIClass *inkSPI = &SPI1;
inkSPI->begin();
// Driver
// -----------------------------
// Use E-Ink driver
Drivers::EInk *driver = new Drivers::GDEY0154D67;
driver->begin(inkSPI, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);
// InkHUD
// ----------------------------
InkHUD::WindowManager *windowManager = InkHUD::WindowManager::getInstance();
// Set the driver
windowManager->setDriver(driver);
// Set how many FAST updates per FULL update
// Set how unhealthy additional FAST updates beyond this number are
windowManager->setDisplayResilience(20, 1.5);
// Prepare fonts
InkHUD::AppletFont largeFont(FreeSans9pt7b);
InkHUD::AppletFont smallFont(FreeSans6pt7b);
/*
// Font localization demo: Cyrillic
InkHUD::AppletFont smallFont(FreeSans6pt8bCyrillic);
smallFont.addSubstitutionsWin1251();
*/
InkHUD::Applet::setDefaultFonts(largeFont, smallFont);
// Init settings, and customize defaults
// Values ignored individually if found saved to flash
InkHUD::settings.userTiles.maxCount = 2; // Two applets side-by-side
InkHUD::settings.rotation = 3; // 270 degrees clockwise
InkHUD::settings.optionalFeatures.batteryIcon = true; // Device definitely has a battery
InkHUD::settings.optionalMenuItems.backlight = true; // Until proven (by touch) that user still has the capacitive button
// Setup backlight
// Note: AUX button behavior configured further down
Drivers::LatchingBacklight *backlight = Drivers::LatchingBacklight::getInstance();
backlight->setPin(PIN_EINK_EN);
// Pick applets
// Note: order of applets determines priority of "auto-show" feature
windowManager->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown
windowManager->addApplet("DMs", new InkHUD::DMApplet);
windowManager->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0));
windowManager->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1));
windowManager->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated
windowManager->addApplet("Recents List", new InkHUD::RecentsListApplet);
windowManager->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, no autoshow, default on tile 0
// windowManager->addApplet("Basic", new InkHUD::BasicExampleApplet);
// windowManager->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet);
// Start running window manager
windowManager->begin();
// Buttons
// --------------------------
Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component
constexpr uint8_t MAIN_BUTTON = 0;
constexpr uint8_t TOUCH_BUTTON = 1;
// Setup the main user button
buttons->setWiring(MAIN_BUTTON, BUTTON_PIN, LOW);
buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::WindowManager::getInstance()->handleButtonShort(); });
buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::WindowManager::getInstance()->handleButtonLong(); });
// Setup the capacitive touch button
// - short: momentary backlight
// - long: latch backlight on
buttons->setWiring(TOUCH_BUTTON, PIN_BUTTON_TOUCH, LOW);
buttons->setTiming(TOUCH_BUTTON, 50, 5000); // 5 seconds before latch - limited by T-Echo's capacitive touch IC
buttons->setHandlerDown(TOUCH_BUTTON, [backlight]() {
backlight->peek();
InkHUD::settings.optionalMenuItems.backlight = false; // We've proved user still has the button. No need for menu entry.
});
buttons->setHandlerLongPress(TOUCH_BUTTON, [backlight]() { backlight->latch(); });
buttons->setHandlerShortPress(TOUCH_BUTTON, [backlight]() { backlight->off(); });
buttons->start();
}
#endif

View File

@@ -1,4 +1,4 @@
; First prototype eink/nrf52840/sx1262 device
; Using original screen class
[env:t-echo]
extends = nrf52840_base
board = t-echo
@@ -12,6 +12,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo
-DEINK_DISPLAY_MODEL=GxEPD2_154_D67
-DEINK_WIDTH=200
-DEINK_HEIGHT=200
-DUSE_EINK
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
-DEINK_LIMIT_FASTREFRESH=20 ; How many consecutive fast-refreshes are permitted
-DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
@@ -21,4 +22,26 @@ lib_deps =
${nrf52840_base.lib_deps}
https://github.com/meshtastic/GxEPD2#55f618961db45a23eff0233546430f1e5a80f63a
lewisxhe/PCF8563_Library@^1.0.1
;upload_protocol = fs
;upload_protocol = fs
; Using experimental InkHUD UI (work in progress)
[platformio]
extra_configs = src/graphics/niche/InkHUD/PlatformioConfig.ini
[env:t-echo-inkhud]
extends = nrf52840_base, inkhud
board = t-echo
board_check = true
debug_tool = jlink
build_flags =
${nrf52840_base.build_flags}
${inkhud.build_flags}
-I variants/t-echo
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
build_src_filter =
${nrf52_base.build_src_filter}
${inkhud.build_src_filter}
+<../variants/t-echo>
lib_deps =
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot intead of AdafruitGFX
${nrf52840_base.lib_deps}
lewisxhe/PCF8563_Library@^1.0.1

View File

@@ -162,8 +162,6 @@ External serial flash WP25R1635FZUIL0
#define PIN_POWER_EN (0 + 12)
// #define PIN_POWER_EN1 (0 + 13)
#define USE_EINK
#define PIN_SPI1_MISO \
(32 + 7) // FIXME not really needed, but for now the SPI code requires something to be defined, pick an used GPIO
#define PIN_SPI1_MOSI PIN_EINK_MOSI

View File

@@ -111,6 +111,7 @@ extern "C" {
#define GPS_TX_PIN PIN_SERIAL1_TX
#define GPS_BAUDRATE 115200
#define GPS_PROBETRIES 5
#define PIN_GPS_EN (32 + 11) // P1.11
#define GPS_EN_ACTIVE HIGH

View File

@@ -1,13 +1,8 @@
[env:trackerd]
extends = esp32_base
;platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform = espressif32
board = pico32
board_build.f_flash = 80000000L
build_flags =
${esp32_base.build_flags} -D PRIVATE_HW -I variants/trackerd -D BSFILE=\"boards/dragino_lbt2.h\"
;board_build.partitions = no_ota.csv
;platform_packages =
; platformio/framework-arduinoespressif32@3
;platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.1-RC1
;board_build.partitions = no_ota.csv

View File

@@ -1,18 +1,14 @@
; platformio.ini for unphone meshtastic
[env:unphone]
extends = esp32s3_base
board = unphone9
board = unphone
upload_speed = 921600
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
build_unflags =
${esp32s3_base.build_unflags}
-D ARDUINO_USB_MODE
build_flags = ${esp32_base.build_flags}
build_flags =
${esp32s3_base.build_flags}
-D UNPHONE
-I variants/unphone
-D ARDUINO_USB_MODE=0
@@ -22,8 +18,11 @@ build_flags = ${esp32_base.build_flags}
-D UNPHONE_UI0=0
-D UNPHONE_LORA=0
-D UNPHONE_FACTORY_MODE=0
-D USE_SX127x
build_src_filter = ${esp32_base.build_src_filter} +<../variants/unphone>
build_src_filter =
${esp32s3_base.build_src_filter}
+<../variants/unphone>
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@ 1.2.0
@@ -32,46 +31,43 @@ lib_deps = ${esp32s3_base.lib_deps}
[env:unphone-tft]
extends = esp32s3_base
board_level = extra
board = unphone
extends = env:unphone
board_build.partitions = default_8MB.csv
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
build_flags = ${esp32_base.build_flags}
-D UNPHONE
-D UNPHONE_ACCEL=0
-D UNPHONE_TOUCHS=0
-D UNPHONE_SDCARD=0
-D UNPHONE_UI0=0
-D UNPHONE_LORA=0
-D UNPHONE_FACTORY_MODE=0
build_flags =
${env:unphone.build_flags}
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
-D MESHTASTIC_EXCLUDE_BLUETOOTH=1
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
-D MESHTASTIC_EXCLUDE_SERIAL=1
-D MESHTASTIC_EXCLUDE_SOCKETAPI=1
-D INPUTDRIVER_BUTTON_TYPE=21
-D MAX_NUM_NODES=200
-D MAX_THREADS=40
-D HAS_SCREEN=0
-D HAS_TFT=1
-D RAM_SIZE=512
-D DISPLAY_SET_RESOLUTION
-D RAM_SIZE=3072
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_CONF_INCLUDE_SIMPLE
-D LV_COMP_CONF_INCLUDE_SIMPLE
-D LV_BUILD_TEST=0
-D LV_USE_SYSMON=0
-D LV_USE_PROFILER=0
-D LV_USE_PERF_MONITOR=0
-D LV_USE_MEM_MONITOR=0
-D LV_USE_LOG=0
-D USE_LOG_DEBUG
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
; -D CALIBRATE_TOUCH=0
-D LGFX_DRIVER=LGFX_UNPHONE_V9
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_UNPHONE.h\"
-D VIEW_320x240
; -D USE_DOUBLE_BUFFER
-D USE_PACKET_API
-I lib/device-ui/generated/ui_320x240
-I variants/unphone
build_src_filter = ${esp32_base.build_src_filter} +<../variants/unphone>
build_src_filter =
${env:unphone.build_src_filter}
+<../lib/device-ui/generated/ui_320x240>
+<../lib/device-ui/resources>
+<../lib/device-ui/source>
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0
https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic@9.0.0
adafruit/Adafruit NeoPixel@1.12.0
+<../lib/device-ui/locale>
+<../lib/device-ui/source>

View File

@@ -48,7 +48,8 @@
#undef GPS_RX_PIN
#undef GPS_TX_PIN
// #define HAS_SDCARD 1 // causes hang if defined
#define HAS_SDCARD 1
#define SD_SPI_FREQUENCY 25000000
#define SDCARD_CS 43
#define LED_PIN 13 // the red part of the RGB LED

View File

@@ -103,6 +103,11 @@ extern "C" {
#define LR1110_GNSS_ANT_PIN (32 + 5) // P1.05 37
#define GPS_RX_PIN PIN_SERIAL1_RX
#define GPS_TX_PIN PIN_SERIAL1_TX
#define HAS_GPS 1
#ifdef __cplusplus
}
#endif

View File

@@ -116,24 +116,26 @@ The default pin mapping in `variant.h` uses 'automatic Tx/Rx switching' mode. If
&nbsp;
<strong>MCU -> E22 connections</strong>
| Xiao BLE pin | variant.h definition | E22 pin | Notes |
| :------------ | :---------------------------- | :-----------------| :------------------------------------------------------------------------------------------------------------------- |
| D0 | SX126X_CS | 19 (NSS) | |
| D1 | SX126X_DIO1 | 13 (DIO1) | |
| D2 | SX126X_BUSY | 14 (BUSY) | |
| D3 | SX126X_RESET | 15 (NRST) | |
| D7 | SX126X_RXEN | 6 (RXEN) | These pins must still be connected, and `SX126X_RXEN` defined in `variant.h`, otherwise Rx sensitivity will be poor. |
| D8 | PIN_SPI_SCK | 18 (SCK) | |
| D9 | PIN_SPI_MISO | 16 (MISO) | |
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
| Xiao BLE pin | variant.h definition | E22 pin | Notes |
| :----------- | :------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------- |
| D0 | SX126X_CS | 19 (NSS) | |
| D1 | SX126X_DIO1 | 13 (DIO1) | |
| D2 | SX126X_BUSY | 14 (BUSY) | |
| D3 | SX126X_RESET | 15 (NRST) | |
| D7 | SX126X_RXEN | 6 (RXEN) | These pins must still be connected, and `SX126X_RXEN` defined in `variant.h`, otherwise Rx sensitivity will be poor. |
| D8 | PIN_SPI_SCK | 18 (SCK) | |
| D9 | PIN_SPI_MISO | 16 (MISO) | |
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
&nbsp;
&nbsp;
<strong>E22 -> E22 connections:</strong>
| E22 pin | E22 pin | Notes |
| :------------ | :---------------------------- | :------------------------------------------------------------------------ |
| TXEN | DIO2 | These must be physically connected for automatic Tx/Rx switching to work. |
| E22 pin | E22 pin | Notes |
| :------ | :------ | :------------------------------------------------------------------------ |
| TXEN | DIO2 | These must be physically connected for automatic Tx/Rx switching to work. |
<h3>Note</h3>
@@ -148,17 +150,18 @@ The schematic (`xiao-ble-e22-schematic.png`) in the `eagle-project` directory us
<h3>Example wiring for "Manual Tx/Rx switching" mode:</h3>
<strong>MCU -> E22 connections</strong>
| Xiao BLE pin | variant.h definition | E22 pin | Notes |
| :------------ | :---------------------------- | :-----------------| :--------------------------- |
| D0 | SX126X_CS | 19 (NSS) | |
| D1 | SX126X_DIO1 | 13 (DIO1) | |
| D2 | SX126X_BUSY | 14 (BUSY) | |
| D3 | SX126X_RESET | 15 (NRST) | |
| D6 | SX126X_TXEN | 7 (TXEN) | |
| D7 | SX126X_RXEN | 6 (RXEN) | |
| D8 | PIN_SPI_SCK | 18 (SCK) | |
| D9 | PIN_SPI_MISO | 16 (MISO) | |
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
| Xiao BLE pin | variant.h definition | E22 pin | Notes |
| :----------- | :------------------- | :-------- | :---- |
| D0 | SX126X_CS | 19 (NSS) | |
| D1 | SX126X_DIO1 | 13 (DIO1) | |
| D2 | SX126X_BUSY | 14 (BUSY) | |
| D3 | SX126X_RESET | 15 (NRST) | |
| D6 | SX126X_TXEN | 7 (TXEN) | |
| D7 | SX126X_RXEN | 6 (RXEN) | |
| D8 | PIN_SPI_SCK | 18 (SCK) | |
| D9 | PIN_SPI_MISO | 16 (MISO) | |
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
<strong>E22 -> E22 connections:</strong> (none)