Merge branch 'master' into tft-gui-work

This commit is contained in:
Tom Fifield 2025-01-12 15:22:33 +08:00 committed by GitHub
commit 36f22b7676
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 1401 additions and 473 deletions

View File

@ -68,6 +68,12 @@ runs:
sed -i '/DDEBUG_HEAP/d' ${INI_FILE}
done
- name: PlatformIO ${{ inputs.arch }} download cache
uses: actions/cache@v4
with:
path: ~/.platformio/.cache
key: pio-cache-${{ inputs.arch }}-${{ hashFiles('.github/actions/**', '**.ini') }}
- name: Build ${{ inputs.board }}
shell: bash
run: ${{ inputs.build-script-path }} ${{ inputs.board }}

View File

@ -20,19 +20,16 @@ runs:
shell: bash
run: |
sudo apt-get -y update --fix-missing
sudo apt-get install -y cppcheck libbluetooth-dev libgpiod-dev libyaml-cpp-dev
sudo apt-get install -y cppcheck libbluetooth-dev libgpiod-dev libyaml-cpp-dev lsb-release
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
# - name: Cache python libs
# uses: actions/cache@v4
# id: cache-pip # needed in if test
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip
cache: pip
cache-dependency-path: |
.github/actions/**
**.ini
- name: Upgrade python tools
shell: bash

View File

@ -90,7 +90,7 @@ jobs:
run: sed -i 's/-DBUILD_EPOCH=$UNIX_TIME/#-DBUILD_EPOCH=$UNIX_TIME/' platformio.ini
- name: PlatformIO Tests
run: platformio test -e coverage --junit-output-path testreport.xml
run: platformio test -e coverage -v --junit-output-path testreport.xml
- name: Save test results
if: always() # run this step even if previous step failed

View File

@ -25,7 +25,7 @@ lib_deps =
${networking_base.lib_deps}
${radiolib_base.lib_deps}
rweather/Crypto@^0.4.0
https://github.com/lovyan03/LovyanGFX.git#1401c28a47646fe00538d487adcb2eb3c72de805
lovyan03/LovyanGFX@^1.2.0
https://github.com/pine64/libch341-spi-userspace#a9b17e3452f7fb747000d9b4ad4409155b39f6ef
build_flags =
@ -40,4 +40,4 @@ build_flags =
-lgpiod
-lyaml-cpp
-li2c
-std=c++17
-std=c++17

View File

@ -49,7 +49,7 @@ build_flags = -Wno-missing-field-initializers
-DMESHTASTIC_EXCLUDE_HEALTH_TELEMETRY=1
-DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware
#-DBUILD_EPOCH=$UNIX_TIME
;-D OLED_PL
#-D OLED_PL=1
monitor_speed = 115200
monitor_filters = direct

View File

@ -20,9 +20,15 @@
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
// The screen is bigger so use bigger fonts
#ifdef OLED_PL
#define FONT_SMALL ArialMT_Plain_16_PL // Height: 19
#define FONT_MEDIUM ArialMT_Plain_24_PL // Height: 28
#define FONT_LARGE ArialMT_Plain_24_PL // Height: 28
#else
#define FONT_SMALL ArialMT_Plain_16 // Height: 19
#define FONT_MEDIUM ArialMT_Plain_24 // Height: 28
#define FONT_LARGE ArialMT_Plain_24 // Height: 28
#endif
#else
#ifdef OLED_PL
#define FONT_SMALL ArialMT_Plain_10_PL
@ -41,6 +47,9 @@
#endif
#endif
#endif
#ifdef OLED_PL
#define FONT_MEDIUM ArialMT_Plain_16_PL // Height: 19
#else
#ifdef OLED_UA
#define FONT_MEDIUM ArialMT_Plain_16_UA // Height: 19
#else
@ -50,6 +59,10 @@
#define FONT_MEDIUM ArialMT_Plain_16 // Height: 19
#endif
#endif
#endif
#ifdef OLED_PL
#define FONT_LARGE ArialMT_Plain_24_PL // Height: 28
#else
#ifdef OLED_UA
#define FONT_LARGE ArialMT_Plain_24_UA // Height: 28
#else
@ -60,6 +73,7 @@
#endif
#endif
#endif
#endif
#define _fontHeight(font) ((font)[1] + 1) // height is position 1

View File

@ -7,7 +7,7 @@ const uint8_t ArialMT_Plain_10_CS[] PROGMEM = {
0x20, // First char: 32
0xE0, // Number of chars: 224
// Jump Table:
0xFF, 0xFF, 0x00, 0x0A, // 32
0xFF, 0xFF, 0x00, 0x03, // 32
0x00, 0x00, 0x04, 0x03, // 33
0x00, 0x04, 0x05, 0x04, // 34
0x00, 0x09, 0x09, 0x06, // 35
@ -453,7 +453,7 @@ const uint8_t ArialMT_Plain_16_CS[] PROGMEM = {
0x20, // First char: 32
0xE0, // Number of chars: 224
// Jump Table:
0xFF, 0xFF, 0x00, 0x10, // 32
0xFF, 0xFF, 0x00, 0x04, // 32
0x00, 0x00, 0x08, 0x04, // 33
0x00, 0x08, 0x0D, 0x06, // 34
0x00, 0x15, 0x1A, 0x0A, // 35
@ -1036,7 +1036,7 @@ const uint8_t ArialMT_Plain_24_CS[] PROGMEM = {
0x20, // First char: 32
0xE0, // Number of chars: 224
// Jump Table:
0xFF, 0xFF, 0x00, 0x18, // 32
0xFF, 0xFF, 0x00, 0x06, // 32
0x00, 0x00, 0x13, 0x06, // 33
0x00, 0x13, 0x1A, 0x08, // 34
0x00, 0x2D, 0x33, 0x0E, // 35

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@
#elif __MBED__
#define PROGMEM
#endif
extern const uint8_t ArialMT_Plain_10_PL[] PROGMEM;
extern const uint8_t ArialMT_Plain_16_PL[] PROGMEM;
extern const uint8_t ArialMT_Plain_24_PL[] PROGMEM;
#endif

View File

@ -297,7 +297,7 @@ uint32_t RadioInterface::getTxDelayMsecWeighted(float snr)
void printPacket(const char *prefix, const meshtastic_MeshPacket *p)
{
#ifdef DEBUG_PORT
#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)
std::string out = DEBUG_PORT.mt_sprintf("%s (id=0x%08x fr=0x%08x to=0x%08x, WantAck=%d, HopLim=%d Ch=0x%x", prefix, p->id,
p->from, p->to, p->want_ack, p->hop_limit, p->channel);
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
@ -637,4 +637,4 @@ size_t RadioInterface::beginSending(meshtastic_MeshPacket *p)
sendingPacket = p;
return p->encrypted.size + sizeof(PacketHeader);
}
}

View File

@ -501,14 +501,13 @@ bool RadioLibInterface::startSend(meshtastic_MeshPacket *txp)
powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn); // Transmitter off now
startReceive(); // Restart receive mode (because startTransmit failed to put us in xmit mode)
} else {
// Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register
// bits
enableInterrupt(isrTxLevel0);
lastTxStart = millis();
printPacket("Started Tx", txp);
}
// Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register
// bits
enableInterrupt(isrTxLevel0);
return res == RADIOLIB_ERR_NONE;
}
}

View File

@ -9,4 +9,4 @@ build_flags =
lib_deps =
${esp32_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
lovyan03/LovyanGFX@^1.2.0

View File

@ -11,4 +11,4 @@ build_flags =
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
lovyan03/LovyanGFX@^1.2.0

View File

@ -10,4 +10,4 @@ build_flags =
;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
lovyan03/LovyanGFX@^1.2.0

View File

@ -0,0 +1,7 @@
[env:heltec-wsl-v2_1]
extends = esp32_base
board = heltec_wireless_stick_lite
board_level = extra
build_flags =
${esp32_base.build_flags} -D PRIVATE_HW -I variants/heltec_wsl_v2.1
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.

View File

@ -0,0 +1,29 @@
#define I2C_SCL SCL
#define I2C_SDA SDA
#define LED_PIN LED
// active low, powers the Battery reader, but no lora antenna boost (?)
// #define VEXT_ENABLE Vext
// #define VEXT_ON_VALUE LOW
#define BUTTON_PIN 0
#define ADC_CTRL 21
#define ADC_CTRL_ENABLED LOW
#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC1_CHANNEL_1
// ratio of voltage divider = 3.20 (R1=100k, R2=220k)
#define ADC_MULTIPLIER 3.2
#define USE_RF95 // RFM95/SX127x
#define LORA_DIO0 26
#define LORA_RESET 14
#define LORA_DIO1 35
#define LORA_DIO2 34
#define LORA_SCK 5
#define LORA_MISO 19
#define LORA_MOSI 27
#define LORA_CS 18

View File

@ -25,4 +25,4 @@ lib_ignore =
m5stack-core
lib_deps =
${esp32_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
lovyan03/LovyanGFX@^1.2.0

View File

@ -54,7 +54,7 @@ build_src_filter = ${esp32_base.build_src_filter}
+<../lib/device-ui/locale>
+<../lib/device-ui/source>
lib_deps = ${esp32_base.lib_deps}
lovyan03/LovyanGFX@^1.1.16
lovyan03/LovyanGFX@^1.2.0
[mesh_tab_xpt2046]
extends = mesh_tab_base

View File

@ -15,7 +15,7 @@ build_flags =
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.16
lovyan03/LovyanGFX@^1.2.0
build_src_filter =
${esp32s3_base.build_src_filter}
@ -63,4 +63,3 @@ build_src_filter =
+<../lib/device-ui/resources>
+<../lib/device-ui/locale>
+<../lib/device-ui/source>

View File

@ -76,4 +76,4 @@ build_src_filter = ${env:native-tft.build_src_filter}
[env:coverage]
extends = env:native
build_flags = -lgcov --coverage -fprofile-abs-path ${env:native.build_flags}
build_flags = -lgcov --coverage -fprofile-abs-path -fsanitize=address ${env:native.build_flags}

View File

@ -28,6 +28,8 @@ build_flags =
-DHAL_TIM_MODULE_DISABLED
-DHAL_WWDG_MODULE_DISABLED
-DHAL_EXTI_MODULE_DISABLED
-DHAL_SAI_MODULE_DISABLED
-DHAL_ICACHE_MODULE_DISABLED
-DRADIOLIB_EXCLUDE_SX128X=1
-DRADIOLIB_EXCLUDE_SX127X=1
-DRADIOLIB_EXCLUDE_LR11X0=1

View File

@ -14,7 +14,7 @@ build_flags = ${esp32s3_base.build_flags}
-Ivariants/t-deck
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.16
lovyan03/LovyanGFX@^1.2.0
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1

View File

@ -12,7 +12,7 @@ build_flags = ${esp32_base.build_flags}
-DHAS_BMA423=1
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.9
lovyan03/LovyanGFX@^1.2.0
lewisxhe/PCF8563_Library@1.0.1
adafruit/Adafruit DRV2605 Library@^1.2.2
earlephilhower/ESP8266Audio@^1.9.9

View File

@ -11,7 +11,7 @@ build_flags =
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
lovyan03/LovyanGFX@^1.2.0
[env:tracksenger-lcd]
extends = esp32s3_base
@ -26,7 +26,7 @@ build_flags =
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
lovyan03/LovyanGFX@^1.2.0
[env:tracksenger-oled]
extends = esp32s3_base

View File

@ -26,7 +26,7 @@ build_src_filter =
+<../variants/unphone>
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@ 1.1.16
lovyan03/LovyanGFX@ 1.2.0
https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic@9.0.0
adafruit/Adafruit NeoPixel @ ^1.12.0
@ -71,4 +71,4 @@ build_src_filter =
+<../lib/device-ui/generated/ui_320x240>
+<../lib/device-ui/resources>
+<../lib/device-ui/locale>
+<../lib/device-ui/source>
+<../lib/device-ui/source>

View File

@ -28,6 +28,8 @@ build_flags =
-DHAL_TIM_MODULE_DISABLED
-DHAL_WWDG_MODULE_DISABLED
-DHAL_EXTI_MODULE_DISABLED
-DHAL_SAI_MODULE_DISABLED
-DHAL_ICACHE_MODULE_DISABLED
-DRADIOLIB_EXCLUDE_SX128X=1
-DRADIOLIB_EXCLUDE_SX127X=1
-DRADIOLIB_EXCLUDE_LR11X0=1

View File

@ -8,6 +8,6 @@ build_flags =
${esp32_base.build_flags} -D WIPHONE -I variants/wiphone
lib_deps =
${esp32_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
lovyan03/LovyanGFX@^1.2.0
sparkfun/SX1509 IO Expander@^3.0.5
pololu/APA102@^3.0.0
pololu/APA102@^3.0.0