Compare commits

...

20 Commits

Author SHA1 Message Date
Clive Blackledge
2a17c3b5d4 Change ARDUINO_USB_MODE from 0 to 1 in the board definition. This switches to the ESP32-S3's Hardware CDC and JTAG mode, which properly handles the reset signals for automatic reboot after firmware updates. (#8881) 2025-12-06 18:56:56 -06:00
Tom
8060134224 promicro doesn't need these. (#8873) 2025-12-06 13:25:57 +11:00
Donato
2f4eb25b2f Optimization flags for all NRF52 targets to reduce code size (#8854)
* changes of variants/nrf52840/nrf52.ini and variants/nrf52840/rak4631/platformio.ini

* try for nrf52 size reduction, faketec exclude unused radios and meshlink refactor

* can't exclude LR11X0 as in schematic there's option for LR1121

* remove -Map flag and -Wl

* removed spaces causing error

---------

Co-authored-by: macvenez <macvenez@gmail.com>
2025-12-04 15:32:42 -06:00
Tom
aa85fbbcc4 Promicro documentation update (#8864)
* Delete variants/nrf52840/diy/nrf52_promicro_diy_tcxo/Schematic_Pro-Micro_Pinouts.pdf

remove old file

* Add updated schematic

* Update GPS TX and RX pin definitions after swap

* Update GPS pin definitions and schematic link

Updated the schematic link to reflect GPS pin definition changes.
2025-12-04 13:35:50 -06:00
Benjamin Faershtein
61e41a8beb Don't scale up the frequency of telemetry sending (#8664) 2025-12-02 13:59:05 -06:00
Jonathan Bennett
525c048354 Move device specific OCV curves to their respective device.h (#8834) 2025-12-02 05:46:24 -06:00
Jonathan Bennett
41cbd77db3 Move everything from /arch to /variant (#8831) 2025-12-02 08:56:55 +01:00
github-actions[bot]
f3e38a425f Automated version bumps (#8786)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2025-12-01 19:31:58 -06:00
rbomze
a11152e545 Commented out the definition of BATTERY_LPCOMP_INPUT in the Helltec T114 variant, due to power leakage of 2.9mA in off state. See bug #8801 (#8800)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-12-01 19:21:49 -06:00
Ben Meadors
859ae4d3d2 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>
2025-12-01 19:19:50 -06:00
Ben Meadors
03600b1252 Merge branch 'master' into develop 2025-12-01 15:40:16 -06:00
Ben Meadors
a3d3e1c912 Flags and scripts for size reduction on NRF52 -> Currently targeting … (#8825)
* Flags and scripts for size reduction on NRF52 -> Currently targeting rak4631

* Changes from the other branch poluted it

* Remove the stripper

* No strip
2025-12-01 15:34:05 -06:00
Austin
0e653056e7 RPM: Fix broken builds (bad backmerge) (#8787)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-12-01 08:00:10 -06:00
github-actions[bot]
eba6e4ed75 Upgrade trunk (#8822)
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
2025-12-01 06:16:52 -06:00
renovate[bot]
80e8745714 Update XPowersLib to v0.3.2 (#8823)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-01 06:14:46 -06:00
renovate[bot]
1abf8ddb30 Update meshtastic/device-ui digest to 3bf3322 (#8814)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-30 13:28:58 -06:00
HarukiToreda
5a595a3ae7 Replace assert in UTF8 decoder to prevent unexpected reboot (#8807) 2025-11-30 07:45:24 -06:00
renovate[bot]
bcd4a1176a Update dorny/test-reporter action to v2.3.0 (#8809)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-30 06:10:08 -06:00
github-actions[bot]
a59723030a Upgrade trunk (#8781)
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
2025-11-28 05:25:47 -06:00
Jason P
a6cdf2c50b - Correct vertical alignment for Muzi_Base on On Screen Keyboard (#8774) 2025-11-27 07:03:25 -06:00
63 changed files with 3866 additions and 3004 deletions

View File

@@ -143,7 +143,7 @@ jobs:
merge-multiple: true merge-multiple: true
- name: Test Report - name: Test Report
uses: dorny/test-reporter@v2.2.0 uses: dorny/test-reporter@v2.3.0
with: with:
name: PlatformIO Tests name: PlatformIO Tests
path: testreport.xml path: testreport.xml

View File

@@ -9,14 +9,14 @@ plugins:
lint: lint:
enabled: enabled:
- checkov@3.2.495 - checkov@3.2.495
- renovate@42.24.1 - renovate@42.27.1
- prettier@3.6.2 - prettier@3.7.3
- trufflehog@3.91.1 - trufflehog@3.91.1
- yamllint@1.37.1 - yamllint@1.37.1
- bandit@1.9.2 - bandit@1.9.2
- trivy@0.67.2 - trivy@0.67.2
- taplo@0.10.0 - taplo@0.10.0
- ruff@0.14.6 - ruff@0.14.7
- isort@7.0.0 - isort@7.0.0
- markdownlint@0.46.0 - markdownlint@0.46.0
- oxipng@9.1.5 - oxipng@9.1.5

165
bin/analyze_map.py Normal file
View File

@@ -0,0 +1,165 @@
#!/usr/bin/env python3
"""Summarise linker map output to highlight heavy object files and libraries.
Usage:
python bin/analyze_map.py --map .pio/build/rak4631/output.map --top 20
The script parses GNU ld map files and aggregates section sizes per object file
and per archive/library, then prints sortable tables that make it easy to spot
modules worth trimming or hiding behind feature flags.
"""
from __future__ import annotations
import argparse
import collections
import os
import re
import sys
from typing import DefaultDict, Dict, Tuple
SECTION_LINE_RE = re.compile(r"^\s+(?P<section>\S+)\s+0x[0-9A-Fa-f]+\s+0x(?P<size>[0-9A-Fa-f]+)\s+(?P<object>.+)$")
ARCHIVE_MEMBER_RE = re.compile(r"^(?P<archive>.+)\((?P<object>[^)]+)\)$")
def human_size(num_bytes: int) -> str:
"""Return a friendly size string with one decimal place."""
if num_bytes < 1024:
return f"{num_bytes:,} B"
num = float(num_bytes)
for unit in ("KB", "MB", "GB"):
num /= 1024.0
if num < 1024.0:
return f"{num:.1f} {unit}"
return f"{num:.1f} TB"
def shorten_path(path: str, root: str) -> str:
"""Prefer repository-relative paths for readability."""
path = path.strip()
if not path:
return path
# Normalise Windows archives (backslashes) to POSIX style for consistency.
path = path.replace("\\", "/")
# Attempt to strip the root when an absolute path lives inside the repo.
if os.path.isabs(path):
try:
rel = os.path.relpath(path, root)
if not rel.startswith(".."):
return rel
except ValueError:
# relpath can fail on mixed drives on Windows; fall back to basename.
pass
return path
def describe_object(raw_object: str, root: str) -> Tuple[str, str]:
"""Return a human friendly object label and the library it belongs to."""
raw_object = raw_object.strip()
lib_label = "[app]"
match = ARCHIVE_MEMBER_RE.match(raw_object)
if match:
archive = shorten_path(match.group("archive"), root)
obj = match.group("object")
lib_label = os.path.basename(archive) or archive
label = f"{archive}:{obj}"
else:
label = shorten_path(raw_object, root)
# If the object lives under libs, hint at the containing directory.
parent = os.path.basename(os.path.dirname(label))
if parent:
lib_label = parent
return label, lib_label
def parse_map(map_path: str, repo_root: str) -> Tuple[Dict[str, int], Dict[str, int], Dict[str, Dict[str, int]]]:
per_object: DefaultDict[str, int] = collections.defaultdict(int)
per_library: DefaultDict[str, int] = collections.defaultdict(int)
per_object_sections: DefaultDict[str, DefaultDict[str, int]] = collections.defaultdict(lambda: collections.defaultdict(int))
try:
with open(map_path, "r", encoding="utf-8", errors="ignore") as handle:
for line in handle:
match = SECTION_LINE_RE.match(line)
if not match:
continue
section = match.group("section")
if section.startswith("*") or section in {"LOAD", "ORIGIN"}:
continue
size = int(match.group("size"), 16)
if size == 0:
continue
obj_token = match.group("object").strip()
if not obj_token or obj_token.startswith("*") or "load address" in obj_token:
continue
label, lib_label = describe_object(obj_token, repo_root)
per_object[label] += size
per_library[lib_label] += size
per_object_sections[label][section] += size
except FileNotFoundError:
raise SystemExit(f"error: map file '{map_path}' not found. Run a build first.")
return per_object, per_library, per_object_sections
def format_section_breakdown(section_sizes: Dict[str, int], total: int, limit: int = 3) -> str:
items = sorted(section_sizes.items(), key=lambda kv: kv[1], reverse=True)
parts = []
for section, size in items[:limit]:
pct = (size / total) * 100 if total else 0
parts.append(f"{section} {pct:.1f}%")
if len(items) > limit:
remainder = total - sum(size for _, size in items[:limit])
pct = (remainder / total) * 100 if total else 0
parts.append(f"other {pct:.1f}%")
return ", ".join(parts)
def print_report(map_path: str, top_n: int, per_object: Dict[str, int], per_library: Dict[str, int], per_object_sections: Dict[str, Dict[str, int]]):
total_bytes = sum(per_object.values())
if total_bytes == 0:
print("No section data found in map file.")
return
print(f"Map file: {map_path}")
print(f"Accounted size: {human_size(total_bytes)} across {len(per_object)} object files\n")
sorted_objects = sorted(per_object.items(), key=lambda kv: kv[1], reverse=True)
print(f"Top {min(top_n, len(sorted_objects))} object files by linked size:")
for idx, (obj, size) in enumerate(sorted_objects[:top_n], 1):
pct = (size / total_bytes) * 100
breakdown = format_section_breakdown(per_object_sections[obj], size)
print(f"{idx:2}. {human_size(size):>9} ({size:,} B, {pct:5.2f}% of linked size)")
print(f" {obj}")
if breakdown:
print(f" sections: {breakdown}")
print()
sorted_libs = sorted(per_library.items(), key=lambda kv: kv[1], reverse=True)
print(f"Top {min(top_n, len(sorted_libs))} libraries or source roots:")
for idx, (lib, size) in enumerate(sorted_libs[:top_n], 1):
pct = (size / total_bytes) * 100
print(f"{idx:2}. {human_size(size):>9} ({size:,} B, {pct:5.2f}% of linked size) {lib}")
def main() -> None:
parser = argparse.ArgumentParser(description="Highlight heavy object files from a GNU ld map file.")
parser.add_argument("--map", default=".pio/build/rak4631/output.map", help="Path to the map file (default: %(default)s)")
parser.add_argument("--top", type=int, default=20, help="Number of entries to display per table (default: %(default)s)")
args = parser.parse_args()
map_path = os.path.abspath(args.map)
repo_root = os.path.abspath(os.getcwd())
per_object, per_library, per_object_sections = parse_map(map_path, repo_root)
print_report(os.path.relpath(map_path, repo_root), args.top, per_object, per_library, per_object_sections)
if __name__ == "__main__":
main()

View File

@@ -87,6 +87,9 @@
</screenshots> </screenshots>
<releases> <releases>
<release version="2.7.17" date="2025-11-28">
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.17</url>
</release>
<release version="2.7.16" date="2025-11-19"> <release version="2.7.16" date="2025-11-19">
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.16</url> <url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.16</url>
</release> </release>

View File

@@ -9,7 +9,7 @@
"extra_flags": [ "extra_flags": [
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=0", "-DARDUINO_USB_MODE=1",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
meshtasticd (2.7.17.0) unstable; urgency=medium
* Version 2.7.17
-- GitHub Actions <github-actions[bot]@users.noreply.github.com> Fri, 28 Nov 2025 15:11:34 +0000
meshtasticd (2.7.16.0) unstable; urgency=medium meshtasticd (2.7.16.0) unstable; urgency=medium
* Version 2.7.16 * Version 2.7.16

View File

@@ -33,7 +33,6 @@ BuildRequires: python3dist(grpcio[protobuf])
BuildRequires: python3dist(grpcio-tools) BuildRequires: python3dist(grpcio-tools)
BuildRequires: git-core BuildRequires: git-core
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: (glibc-devel >= 2.38) or pkgconfig(libbsd-overlay)
BuildRequires: pkgconfig(yaml-cpp) BuildRequires: pkgconfig(yaml-cpp)
BuildRequires: pkgconfig(libgpiod) BuildRequires: pkgconfig(libgpiod)
BuildRequires: pkgconfig(bluez) BuildRequires: pkgconfig(bluez)

View File

@@ -5,7 +5,7 @@
default_envs = tbeam default_envs = tbeam
extra_configs = extra_configs =
arch/*/*.ini variants/*/*.ini
variants/*/*/platformio.ini variants/*/*/platformio.ini
variants/*/diy/*/platformio.ini variants/*/diy/*/platformio.ini
src/graphics/niche/InkHUD/PlatformioConfig.ini src/graphics/niche/InkHUD/PlatformioConfig.ini
@@ -121,7 +121,7 @@ lib_deps =
[device-ui_base] [device-ui_base]
lib_deps = lib_deps =
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master # renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
https://github.com/meshtastic/device-ui/archive/28167c67dfd13015a0b5eef1828f95fe8e3ab7c3.zip https://github.com/meshtastic/device-ui/archive/3bf332240416c5cb8c919fac2a0ec7260eb3be75.zip
; Common libs for environmental measurements in telemetry module ; Common libs for environmental measurements in telemetry module
[environmental_base] [environmental_base]

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -506,6 +506,9 @@ void VirtualKeyboard::drawKey(OLEDDisplay *display, const VirtualKey &key, bool
centeredTextY -= 1; centeredTextY -= 1;
} }
} }
#ifdef MUZI_BASE // Correct issue with character vertical position on MUZI_BASE
centeredTextY -= 2;
#endif
display->drawString(textX, centeredTextY, keyText.c_str()); display->drawString(textX, centeredTextY, keyText.c_str());
} }

View File

@@ -124,7 +124,7 @@ uint32_t InkHUD::AppletFont::toUtf32(std::string utf8)
utf32 |= (utf8.at(3) & 0b00111111); utf32 |= (utf8.at(3) & 0b00111111);
break; break;
default: default:
assert(false); return 0;
} }
return utf32; return utf32;

View File

@@ -57,14 +57,7 @@ class Default
// Note: Kept as uint32_t to match the public API parameter type // Note: Kept as uint32_t to match the public API parameter type
static float congestionScalingCoefficient(uint32_t numOnlineNodes) static float congestionScalingCoefficient(uint32_t numOnlineNodes)
{ {
// Increase frequency of broadcasts for small networks regardless of preset if (numOnlineNodes <= 40) {
if (numOnlineNodes <= 10) {
return 0.6;
} else if (numOnlineNodes <= 20) {
return 0.7;
} else if (numOnlineNodes <= 30) {
return 0.8;
} else if (numOnlineNodes <= 40) {
return 1.0; return 1.0;
} else { } else {
float throttlingFactor = 0.075; float throttlingFactor = 0.075;

View File

@@ -13,6 +13,7 @@
#define NUM_OCV_POINTS 11 #define NUM_OCV_POINTS 11
#endif #endif
// Device specific curves go in variant.h
#ifndef OCV_ARRAY #ifndef OCV_ARRAY
#ifdef CELL_TYPE_LIFEPO4 #ifdef CELL_TYPE_LIFEPO4
#define OCV_ARRAY 3400, 3350, 3320, 3290, 3270, 3260, 3250, 3230, 3200, 3120, 3000 #define OCV_ARRAY 3400, 3350, 3320, 3290, 3270, 3260, 3250, 3230, 3200, 3120, 3000
@@ -24,18 +25,6 @@
#define OCV_ARRAY 1400, 1300, 1280, 1270, 1260, 1250, 1240, 1230, 1210, 1150, 1000 #define OCV_ARRAY 1400, 1300, 1280, 1270, 1260, 1250, 1240, 1230, 1210, 1150, 1000
#elif defined(CELL_TYPE_LTO) #elif defined(CELL_TYPE_LTO)
#define OCV_ARRAY 2700, 2560, 2540, 2520, 2500, 2460, 2420, 2400, 2380, 2320, 1500 #define OCV_ARRAY 2700, 2560, 2540, 2520, 2500, 2460, 2420, 2400, 2380, 2320, 1500
#elif defined(TRACKER_T1000_E)
#define OCV_ARRAY 4190, 4042, 3957, 3885, 3820, 3776, 3746, 3725, 3696, 3644, 3100
#elif defined(HELTEC_MESH_POCKET_BATTERY_5000)
#define OCV_ARRAY 4300, 4240, 4120, 4000, 3888, 3800, 3740, 3698, 3655, 3580, 3400
#elif defined(HELTEC_MESH_POCKET_BATTERY_10000)
#define OCV_ARRAY 4100, 4060, 3960, 3840, 3729, 3625, 3550, 3500, 3420, 3345, 3100
#elif defined(SEEED_WIO_TRACKER_L1)
#define OCV_ARRAY 4200, 3876, 3826, 3763, 3713, 3660, 3573, 3485, 3422, 3359, 3300
#elif defined(SEEED_SOLAR_NODE)
#define OCV_ARRAY 4200, 3986, 3922, 3812, 3734, 3645, 3527, 3420, 3281, 3087, 2786
#elif defined(WISMESH_TAG)
#define OCV_ARRAY 4240, 4112, 4029, 3970, 3906, 3846, 3824, 3802, 3776, 3650, 3072
#else // LiIon #else // LiIon
#define OCV_ARRAY 4190, 4050, 3990, 3890, 3800, 3720, 3630, 3530, 3420, 3300, 3100 #define OCV_ARRAY 4190, 4050, 3990, 3890, 3800, 3720, 3630, 3530, 3420, 3300, 3100
#endif #endif

View File

@@ -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

View File

@@ -57,7 +57,7 @@ lib_deps =
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
# renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib # renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
https://github.com/lewisxhe/XPowersLib/archive/v0.3.1.zip https://github.com/lewisxhe/XPowersLib/archive/v0.3.2.zip
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -28,7 +28,7 @@ lib_deps =
${environmental_extra.lib_deps} ${environmental_extra.lib_deps}
${radiolib_base.lib_deps} ${radiolib_base.lib_deps}
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib # renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib
lewisxhe/XPowersLib@0.3.1 lewisxhe/XPowersLib@0.3.2
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto

View File

@@ -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

View File

@@ -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
*/ */

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -2,9 +2,11 @@
# Notes # Notes
News 2025-12-04 - The GPS pin definitions have been changed!!! This has no material effect on current builds, but future builders may wish to review how they are using the wires.
## General ## General
The pinout is contained in the variant.h file, and a [generic schematic](./Schematic_Pro-Micro_Pinouts.pdf) is located in this directory. The pinout is contained in the variant.h file, and a [generic schematic](./Schematic_Pro-Micro_Pinouts_2025-12-04.pdf) is located in this directory.
This variant is suitable for both TCXO and XTAL types of modules. The old XTAL variant has been removed to reduce confusion. This variant is suitable for both TCXO and XTAL types of modules. The old XTAL variant has been removed to reduce confusion.

View File

@@ -30,8 +30,8 @@ NRF52 PRO MICRO PIN ASSIGNMENT
| Gnd   |             |   | reset   |             | | | Gnd   |             |   | reset   |             | |
| Gnd   |             |   | ext_vcc | *see 0.13   | | | Gnd   |             |   | ext_vcc | *see 0.13   | |
| P0.17 | RXEN       |   | P0.31   | BATTERY_PIN | | | P0.17 | RXEN       |   | P0.31   | BATTERY_PIN | |
| P0.20 | GPS_RX     |   | P0.29   | BUSY         | DIO0 | | P0.20 | GPS_TX     |   | P0.29   | BUSY         | DIO0 |
| P0.22 | GPS_TX     |   | P0.02   | MISO | MISO | | P0.22 | GPS_RX     |   | P0.02   | MISO | MISO |
| P0.24 | GPS_EN     |   | P1.15   | MOSI         | MOSI | | P0.24 | GPS_EN     |   | P1.15   | MOSI         | MOSI |
| P1.00 | BUTTON_PIN |   | P1.13   | CS           | CS   | | P1.00 | BUTTON_PIN |   | P1.13   | CS           | CS   |
| P0.11 | SCL         |   | P1.11   | SCK         | SCK | | P0.11 | SCL         |   | P1.11   | SCK         | SCK |
@@ -90,8 +90,8 @@ NRF52 PRO MICRO PIN ASSIGNMENT
#define BUTTON_PIN (32 + 0) // P1.00 #define BUTTON_PIN (32 + 0) // P1.00
// GPS // GPS
#define PIN_GPS_TX (0 + 20) // P0.20 #define PIN_GPS_TX (0 + 20) // P0.20 - This is data from the MCU
#define PIN_GPS_RX (0 + 22) // P0.22 #define PIN_GPS_RX (0 + 22) // P0.22 - This is data from the GNSS
#define PIN_GPS_EN (0 + 24) // P0.24 #define PIN_GPS_EN (0 + 24) // P0.24
#define GPS_UBLOX #define GPS_UBLOX

View File

@@ -211,7 +211,8 @@ No longer populated on PCB
#define ADC_MULTIPLIER (4.916F) #define ADC_MULTIPLIER (4.916F)
// rf52840 AIN2 = Pin 4 // rf52840 AIN2 = Pin 4
#define BATTERY_LPCOMP_INPUT NRF_LPCOMP_INPUT_2 // commented out due to power leakage of 2.9mA in shutdown state see reported issue #8801
// #define BATTERY_LPCOMP_INPUT NRF_LPCOMP_INPUT_2 //UNSAFE
// We have AIN2 with a VBAT divider so AIN2 = VBAT * (100/490) // We have AIN2 with a VBAT divider so AIN2 = VBAT * (100/490)
// We have the device going deep sleep under 3.1V, which is AIN2 = 0.63V // We have the device going deep sleep under 3.1V, which is AIN2 = 0.63V

View File

@@ -122,6 +122,12 @@ No longer populated on PCB
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define ADC_MULTIPLIER (4.6425F) #define ADC_MULTIPLIER (4.6425F)
#if defined(HELTEC_MESH_POCKET_BATTERY_5000)
#define OCV_ARRAY 4300, 4240, 4120, 4000, 3888, 3800, 3740, 3698, 3655, 3580, 3400
#elif defined(HELTEC_MESH_POCKET_BATTERY_10000)
#define OCV_ARRAY 4100, 4060, 3960, 3840, 3729, 3625, 3550, 3500, 3420, 3345, 3100
#endif
#undef HAS_GPS #undef HAS_GPS
#define HAS_GPS 0 #define HAS_GPS 0
#define HAS_RTC 0 #define HAS_RTC 0

View File

@@ -9,6 +9,30 @@ board_level = extra
build_flags = ${nrf52840_base.build_flags} build_flags = ${nrf52840_base.build_flags}
-I variants/nrf52840/meshlink -I variants/nrf52840/meshlink
-D MESHLINK -D MESHLINK
-DRADIOLIB_EXCLUDE_SX128X=1
-DRADIOLIB_EXCLUDE_SX127X=1
-DRADIOLIB_EXCLUDE_LR11X0=1
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/meshlink>
lib_deps =
${nrf52840_base.lib_deps}
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds
;upload_protocol = jlink
[env:meshlink_eink]
extends = nrf52840_base
board = meshlink
board_level = extra
;board_check = true
build_flags = ${nrf52840_base.build_flags}
-I variants/nrf52840/meshlink
-D MESHLINK
-DRADIOLIB_EXCLUDE_SX128X=1
-DRADIOLIB_EXCLUDE_SX127X=1
-DRADIOLIB_EXCLUDE_LR11X0=1
-D USE_EINK
-D EINK_DISPLAY_MODEL=GxEPD2_213_B74 -D EINK_DISPLAY_MODEL=GxEPD2_213_B74
-D EINK_WIDTH=250 -D EINK_WIDTH=250
-D EINK_HEIGHT=122 -D EINK_HEIGHT=122

View File

@@ -1,31 +0,0 @@
; MeshLink board developed by LoraItalia. NRF52840, eByte E22900M22S (Will also come with other frequencies), 25w MPPT solar charger (5v,12v,18v selectable), support for gps, buzzer, oled or e-ink display, 10 gpios, hardware watchdog
; https://www.loraitalia.it
; firmware for boards with a 250x122 e-ink display
[env:meshlink_eink]
extends = nrf52840_base
board = meshlink
board_level = extra
;board_check = true
build_flags = ${nrf52840_base.build_flags}
-I variants/nrf52840/meshlink_eink
-D MESHLINK
-D EINK_DISPLAY_MODEL=GxEPD2_213_B74
-D EINK_WIDTH=250
-D EINK_HEIGHT=122
-D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
-D EINK_LIMIT_FASTREFRESH=5 ; How many consecutive fast-refreshes are permitted
-D EINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
-D EINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
-D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated
-D EINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
-D EINK_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/meshlink_eink>
lib_deps =
${nrf52840_base.lib_deps}
https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds
;upload_protocol = jlink

View File

@@ -1,23 +0,0 @@
#include "variant.h"
#include "nrf.h"
#include "wiring_constants.h"
#include "wiring_digital.h"
const uint32_t g_ADigitalPinMap[] = {
// P0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
void initVariant()
{
pinMode(PIN_LED1, OUTPUT);
digitalWrite(PIN_LED1, HIGH); // turn off the white led while booting
// otherwise it will stay lit for several seconds (could be annoying)
#ifdef PIN_WD_EN
pinMode(PIN_WD_EN, OUTPUT);
digitalWrite(PIN_WD_EN, HIGH); // Enable the Watchdog at boot
#endif
}

View File

@@ -1,153 +0,0 @@
#ifndef _VARIANT_MESHLINK_
#define _VARIANT_MESHLINK_
#ifndef MESHLINK
#define MESHLINK
#endif
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
// #define USE_LFXO // Board uses 32khz crystal for LF
#define USE_LFRC // Board uses RC for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
#include "WVariant.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (48)
#define NUM_DIGITAL_PINS (48)
#define NUM_ANALOG_INPUTS (2)
#define NUM_ANALOG_OUTPUTS (0)
#define BUTTON_PIN (-1) // If defined, this will be used for user button presses,
#define BUTTON_NEED_PULLUP
// LEDs
#define PIN_LED1 (24) // Built in white led for status
#define LED_BLUE PIN_LED1
#define LED_BUILTIN PIN_LED1
#define LED_STATE_ON 0 // State when LED is litted
#define LED_INVERTED 1
// Testing USB detection
// #define NRF_APM
/*
* Analog pins
*/
#define PIN_A1 (3) // P0.03/AIN1
#define ADC_RESOLUTION 14
// Other pins
// #define PIN_AREF (2)
// static const uint8_t AREF = PIN_AREF;
/*
* Serial interfaces
*/
#define PIN_SERIAL1_RX (32 + 8)
#define PIN_SERIAL1_TX (7)
/*
* SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_MISO (8)
#define PIN_SPI_MOSI (32 + 9)
#define PIN_SPI_SCK (11)
#define PIN_SPI1_MISO (23)
#define PIN_SPI1_MOSI (21)
#define PIN_SPI1_SCK (19)
static const uint8_t SS = 12;
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;
/*
* eink display pins
*/
#define USE_EINK
#define PIN_EINK_CS (15)
#define PIN_EINK_BUSY (16)
#define PIN_EINK_DC (14)
#define PIN_EINK_RES (17)
#define PIN_EINK_SCLK (19)
#define PIN_EINK_MOSI (21) // also called SDI
/*
* Wire Interfaces
*/
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE_SDA (1)
#define PIN_WIRE_SCL (27)
// QSPI Pins
#define PIN_QSPI_SCK 19
#define PIN_QSPI_CS 22
#define PIN_QSPI_IO0 21
#define PIN_QSPI_IO1 23
#define PIN_QSPI_IO2 32
#define PIN_QSPI_IO3 20
// On-board QSPI Flash
#define EXTERNAL_FLASH_DEVICES W25Q16JVUXIQ
#define EXTERNAL_FLASH_USE_QSPI
#define USE_SX1262
#define SX126X_CS (12)
#define SX126X_DIO1 (32 + 1)
#define SX126X_BUSY (32 + 3)
#define SX126X_RESET (6)
// #define SX126X_RXEN (13)
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
// pin 25 is used to enable or disable the watchdog. This pin has to be disabled when cpu is put to sleep
// otherwise the timer will expire and wd will reboot the cpu
#define PIN_WD_EN (25)
#define PIN_GPS_PPS (26) // Pulse per second input from the GPS
#define GPS_TX_PIN PIN_SERIAL1_TX // This is for bits going TOWARDS the CPU
#define GPS_RX_PIN PIN_SERIAL1_RX // This is for bits going TOWARDS the GPS
// #define GPS_THREAD_INTERVAL 50
// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press
#define PIN_GPS_EN (0)
#define GPS_EN_ACTIVE LOW
#define PIN_BUZZER (31) // P0.31/AIN7
// Battery
// The battery sense is hooked to pin A0 (2)
#define BATTERY_PIN (2)
// and has 12 bit resolution
#define BATTERY_SENSE_RESOLUTION_BITS 12
#define BATTERY_SENSE_RESOLUTION 4096.0
#undef AREF_VOLTAGE
#define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define ADC_MULTIPLIER 1.42 // fine tuning of voltage
#ifdef __cplusplus
}
#endif
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif

View File

@@ -11,9 +11,9 @@ platform_packages =
; Don't renovate toolchain-gccarmnoneeabi ; Don't renovate toolchain-gccarmnoneeabi
platformio/toolchain-gccarmnoneeabi@~1.90301.0 platformio/toolchain-gccarmnoneeabi@~1.90301.0
build_type = debug build_type = release
build_flags = build_flags =
-include arch/nrf52/cpp_overrides/lfs_util.h -include variants/nrf52840/cpp_overrides/lfs_util.h
${arduino_base.build_flags} ${arduino_base.build_flags}
-DSERIAL_BUFFER_SIZE=1024 -DSERIAL_BUFFER_SIZE=1024
-Wno-unused-variable -Wno-unused-variable
@@ -21,6 +21,17 @@ build_flags =
-DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818 -DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818
-DMESHTASTIC_EXCLUDE_AUDIO=1 -DMESHTASTIC_EXCLUDE_AUDIO=1
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1 -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
-Os
build_unflags =
-Ofast
-Og
-ggdb3
-ggdb2
-g3
-g2
-g
-g1
-g0
build_src_filter = build_src_filter =
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp> -<serialization/> ${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp> -<serialization/>

View File

@@ -4,16 +4,22 @@ extends = nrf52840_base
board = wiscore_rak4631 board = wiscore_rak4631
board_level = pr board_level = pr
board_check = true board_check = true
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
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631> +<mesh/eth/> +<mesh/api/> +<mqtt/> build_src_filter = ${nrf52_base.build_src_filter} \
+<../variants/nrf52840/rak4631> \
+<mesh/eth/> \
+<mesh/api/> \
+<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}

View File

@@ -230,6 +230,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
#define AREF_VOLTAGE 3.0 #define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define ADC_MULTIPLIER 1.73 #define ADC_MULTIPLIER 1.73
#define OCV_ARRAY 4240, 4112, 4029, 3970, 3906, 3846, 3824, 3802, 3776, 3650, 3072
#define RAK_4631 1 #define RAK_4631 1

View File

@@ -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

View File

@@ -110,6 +110,7 @@ static const uint8_t SCL = PIN_WIRE_SCL;
#define ADC_MULTIPLIER 3.3 #define ADC_MULTIPLIER 3.3
#define BATTERY_PIN PIN_VBAT // PIN_A7 #define BATTERY_PIN PIN_VBAT // PIN_A7
#define AREF_VOLTAGE 3.3 #define AREF_VOLTAGE 3.3
#define OCV_ARRAY 4200, 3986, 3922, 3812, 3734, 3645, 3527, 3420, 3281, 3087, 2786
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// GPS L76KB // GPS L76KB
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

View File

@@ -122,6 +122,8 @@ static const uint8_t SCL = PIN_WIRE_SCL;
#define ADC_MULTIPLIER 2.0 #define ADC_MULTIPLIER 2.0
#define BATTERY_PIN PIN_VBAT // PIN_A7 #define BATTERY_PIN PIN_VBAT // PIN_A7
#define AREF_VOLTAGE 3.6 #define AREF_VOLTAGE 3.6
#define OCV_ARRAY 4200, 3876, 3826, 3763, 3713, 3660, 3573, 3485, 3422, 3359, 3300
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// GPS L76KB // GPS L76KB
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

View File

@@ -142,6 +142,8 @@ extern "C" {
#define AREF_VOLTAGE 3.0 #define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define OCV_ARRAY 4190, 4042, 3957, 3885, 3820, 3776, 3746, 3725, 3696, 3644, 3100
// Buzzer // Buzzer
#define BUZZER_EN_PIN (32 + 5) // P1.05, always high #define BUZZER_EN_PIN (32 + 5) // P1.05, always high
#define PIN_BUZZER (0 + 25) // P0.25, pwm output #define PIN_BUZZER (0 + 25) // P0.25, pwm output

View File

@@ -1,4 +1,4 @@
[VERSION] [VERSION]
major = 2 major = 2
minor = 7 minor = 7
build = 16 build = 17