Skip to content

Commit e7a214d

Browse files
authored
Merge branch 'master' into feat/add-scd4x
2 parents 96a8ddc + 81828c6 commit e7a214d

71 files changed

Lines changed: 3193 additions & 485 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ release/
3737
.vscode/extensions.json
3838
/compile_commands.json
3939
src/mesh/raspihttp/certificate.pem
40-
src/mesh/raspihttp/private_key.pem
40+
src/mesh/raspihttp/private_key.pem
41+
42+
# Ignore logo (set at build time with platformio-custom.py)
43+
data/boot/logo.*

bin/platformio-custom.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,33 @@ def esp32_create_combined_bin(source, target, env):
131131
if lb.name == "meshtastic-device-ui":
132132
lb.env.Append(CPPDEFINES=[("APP_VERSION", verObj["long"])])
133133
break
134+
135+
# Get the display resolution from macros
136+
def get_display_resolution(build_flags):
137+
# Check "DISPLAY_SIZE" to determine the screen resolution
138+
for flag in build_flags:
139+
if isinstance(flag, tuple) and flag[0] == "DISPLAY_SIZE":
140+
screen_width, screen_height = map(int, flag[1].split("x"))
141+
return screen_width, screen_height
142+
print("No screen resolution defined in build_flags. Please define DISPLAY_SIZE.")
143+
exit(1)
144+
145+
def load_boot_logo(source, target, env):
146+
build_flags = env.get("CPPDEFINES", [])
147+
logo_w, logo_h = get_display_resolution(build_flags)
148+
print(f"TFT build with {logo_w}x{logo_h} resolution detected")
149+
150+
# Load the boot logo from `branding/logo_<width>x<height>.png` if it exists
151+
source_path = join(env["PROJECT_DIR"], "branding", f"logo_{logo_w}x{logo_h}.png")
152+
dest_dir = join(env["PROJECT_DIR"], "data", "boot")
153+
dest_path = join(dest_dir, "logo.png")
154+
if env.File(source_path).exists():
155+
print(f"Loading boot logo from {source_path}")
156+
# Prepare the destination
157+
env.Execute(f"mkdir -p {dest_dir} && rm -f {dest_path}")
158+
# Copy the logo to the `data/boot` directory
159+
env.Execute(f"cp {source_path} {dest_path}")
160+
161+
# Load the boot logo on TFT builds
162+
if ("HAS_TFT", 1) in env.get("CPPDEFINES", []):
163+
env.AddPreAction('$BUILD_DIR/littlefs.bin', load_boot_logo)

boards/seeed_wio_tracker_L1.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"cpu": "cortex-m4",
88
"extra_flags": "-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA",
99
"f_cpu": "64000000L",
10-
"hwids": [["0x2886", "0x1668"]],
10+
"hwids": [
11+
["0x2886", "0x1668"],
12+
["0x2886", "0x1667"]
13+
],
1114
"usb_product": "TRACKER L1",
1215
"mcu": "nrf52840",
1316
"variant": "seeed_wio_tracker_L1",

branding/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Meshtastic Branding / Whitelabeling
2+
3+
This directory is consumed during the creation of **event** firmware.
4+
5+
`bin/platformio-custom.py` determines the display resolution, and locates the corresponding `logo_<width>x<height>.png`.
6+
7+
Ex:
8+
9+
- `logo_800x480.png`
10+
- `logo_480x480.png`
11+
- `logo_480x320.png`
12+
- `logo_320x480.png`
13+
- `logo_320x240.png`
14+
15+
This file is copied to `data/boot/logo.png` before filesytem image compilation.
16+
17+
For additional examples see the [`event/defcon33` branch](https://github.com/meshtastic/firmware/tree/event/defcon33).

platformio.ini

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ build_flags = -Wno-missing-field-initializers
4949
-DMESHTASTIC_EXCLUDE_DROPZONE=1
5050
-DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1
5151
-DMESHTASTIC_EXCLUDE_HEALTH_TELEMETRY=1
52-
-DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware
52+
-DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware
5353
-DMESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE=1
5454
-D MAX_THREADS=40 ; As we've split modules, we have more threads to manage
55-
#-DBUILD_EPOCH=$UNIX_TIME
56-
#-D OLED_PL=1
55+
#-DBUILD_EPOCH=$UNIX_TIME
56+
#-D OLED_PL=1
5757

5858
monitor_speed = 115200
5959
monitor_filters = direct
@@ -168,8 +168,8 @@ lib_deps =
168168
adafruit/Adafruit PCT2075@1.0.5
169169
# renovate: datasource=custom.pio depName=DFRobot_BMM150 packageName=dfrobot/library/DFRobot_BMM150
170170
dfrobot/DFRobot_BMM150@1.0.0
171-
172-
; (not included in native / portduino)
171+
172+
; (not included in native / portduino)
173173
[environmental_extra]
174174
lib_deps =
175175
# renovate: datasource=custom.pio depName=Adafruit BMP3XX packageName=adafruit/library/Adafruit BMP3XX Library
@@ -196,5 +196,7 @@ lib_deps =
196196
boschsensortec/BME68x Sensor Library@1.3.40408
197197
# renovate: datasource=git-refs depName=meshtastic-DFRobot_LarkWeatherStation packageName=https://github.com/meshtastic/DFRobot_LarkWeatherStation gitBranch=master
198198
https://github.com/meshtastic/DFRobot_LarkWeatherStation/archive/4de3a9cadef0f6a5220a8a906cf9775b02b0040d.zip
199-
# Sensor library from Sensirion
200-
sensirion/Sensirion I2C SCD4x@1.0.0
199+
# renovate: datasource=custom.pio depName=Sensirion Core packageName=sensirion/library/Sensirion Core
200+
sensirion/Sensirion Core@0.7.1
201+
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
202+
sensirion/Sensirion I2C SCD4x@1.1.0

src/commands.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ enum class Cmd {
1313
START_FIRMWARE_UPDATE_SCREEN,
1414
STOP_BOOT_SCREEN,
1515
SHOW_PREV_FRAME,
16-
SHOW_NEXT_FRAME
16+
SHOW_NEXT_FRAME,
17+
NOOP
1718
};

0 commit comments

Comments
 (0)