mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-28 07:13:25 +00:00
Merge branch 'master' into meshtastic-ELRS
This commit is contained in:
commit
270b30b229
@ -9,9 +9,9 @@ plugins:
|
|||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- checkov@3.2.461
|
- checkov@3.2.461
|
||||||
- renovate@41.63.0
|
- renovate@41.71.1
|
||||||
- prettier@3.6.2
|
- prettier@3.6.2
|
||||||
- trufflehog@3.90.3
|
- trufflehog@3.90.4
|
||||||
- yamllint@1.37.1
|
- yamllint@1.37.1
|
||||||
- bandit@1.8.6
|
- bandit@1.8.6
|
||||||
- trivy@0.64.1
|
- trivy@0.64.1
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions
|
# trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions
|
||||||
# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions
|
# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions
|
||||||
|
|
||||||
FROM python:3.13-bookworm AS builder
|
FROM python:3.13-slim-trixie AS builder
|
||||||
ARG PIO_ENV=native
|
ARG PIO_ENV=native
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Etc/UTC
|
ENV TZ=Etc/UTC
|
||||||
@ -36,7 +36,7 @@ RUN curl -L "https://github.com/meshtastic/web/releases/download/v$(cat /tmp/fir
|
|||||||
|
|
||||||
##### PRODUCTION BUILD #############
|
##### PRODUCTION BUILD #############
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
FROM debian:trixie-slim
|
||||||
LABEL org.opencontainers.image.title="Meshtastic" \
|
LABEL org.opencontainers.image.title="Meshtastic" \
|
||||||
org.opencontainers.image.description="Debian Meshtastic daemon and web interface" \
|
org.opencontainers.image.description="Debian Meshtastic daemon and web interface" \
|
||||||
org.opencontainers.image.url="https://meshtastic.org" \
|
org.opencontainers.image.url="https://meshtastic.org" \
|
||||||
@ -51,8 +51,8 @@ ENV TZ=Etc/UTC
|
|||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN apt-get update && apt-get --no-install-recommends -y install \
|
RUN apt-get update && apt-get --no-install-recommends -y install \
|
||||||
libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libuv1 libusb-1.0-0-dev \
|
libc-bin libc6 libgpiod3 libyaml-cpp0.8 libi2c0 libuv1t64 libusb-1.0-0-dev \
|
||||||
liborcania2.3 libulfius2.7 libssl3 \
|
liborcania2.3 libulfius2.7t64 libssl3t64 \
|
||||||
libx11-6 libinput10 libxkbcommon-x11-0 \
|
libx11-6 libinput10 libxkbcommon-x11-0 \
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
|
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
|
||||||
&& mkdir -p /var/lib/meshtasticd \
|
&& mkdir -p /var/lib/meshtasticd \
|
||||||
|
|||||||
@ -23,7 +23,7 @@ build_flags =
|
|||||||
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
||||||
|
|
||||||
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>
|
${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/>
|
||||||
|
|
||||||
lib_deps=
|
lib_deps=
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
|
|||||||
@ -62,8 +62,8 @@ monitor_filters = direct
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=git-refs depName=meshtastic-esp8266-oled-ssd1306 packageName=https://github.com/meshtastic/esp8266-oled-ssd1306 gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-esp8266-oled-ssd1306 packageName=https://github.com/meshtastic/esp8266-oled-ssd1306 gitBranch=master
|
||||||
https://github.com/meshtastic/esp8266-oled-ssd1306/archive/0119501e9983bd894830b02f545c377ee08d66fe.zip
|
https://github.com/meshtastic/esp8266-oled-ssd1306/archive/0119501e9983bd894830b02f545c377ee08d66fe.zip
|
||||||
# renovate: datasource=custom.pio depName=OneButton packageName=mathertel/library/OneButton
|
# renovate: datasource=git-refs depName=meshtastic-OneButton packageName=https://github.com/meshtastic/OneButton gitBranch=master
|
||||||
mathertel/OneButton@2.6.1
|
https://github.com/meshtastic/OneButton/archive/fa352d668c53f290cfa480a5f79ad422cd828c70.zip
|
||||||
# renovate: datasource=git-refs depName=meshtastic-arduino-fsm packageName=https://github.com/meshtastic/arduino-fsm gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-arduino-fsm packageName=https://github.com/meshtastic/arduino-fsm gitBranch=master
|
||||||
https://github.com/meshtastic/arduino-fsm/archive/7db3702bf0cfe97b783d6c72595e3f38e0b19159.zip
|
https://github.com/meshtastic/arduino-fsm/archive/7db3702bf0cfe97b783d6c72595e3f38e0b19159.zip
|
||||||
# renovate: datasource=git-refs depName=meshtastic-TinyGPSPlus packageName=https://github.com/meshtastic/TinyGPSPlus gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-TinyGPSPlus packageName=https://github.com/meshtastic/TinyGPSPlus gitBranch=master
|
||||||
@ -103,6 +103,14 @@ lib_deps =
|
|||||||
# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog
|
# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog
|
||||||
arcao/Syslog@2.0.0
|
arcao/Syslog@2.0.0
|
||||||
|
|
||||||
|
; Minimal networking libs for nrf52 (excludes Syslog to save flash)
|
||||||
|
[nrf52_networking_base]
|
||||||
|
lib_deps =
|
||||||
|
# renovate: datasource=custom.pio depName=TBPubSubClient packageName=thingsboard/library/TBPubSubClient
|
||||||
|
thingsboard/TBPubSubClient@2.12.1
|
||||||
|
# renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient
|
||||||
|
arduino-libraries/NTPClient@3.2.1
|
||||||
|
|
||||||
[radiolib_base]
|
[radiolib_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib
|
# renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit e2c0831aa3d34a58a36c2b9fdcb828e58961cbc5
|
Subproject commit 5dd723fe6f33a8613ec81acf5e15be26365c7cce
|
||||||
@ -140,6 +140,10 @@ bool playNextLeadUpNote()
|
|||||||
playTones(¬e, 1); // Play single note using existing playTones function
|
playTones(¬e, 1); // Play single note using existing playTones function
|
||||||
|
|
||||||
leadUpNoteIndex++;
|
leadUpNoteIndex++;
|
||||||
|
|
||||||
|
if (leadUpNoteIndex >= leadUpNotesCount) {
|
||||||
|
return false; // this was the final note
|
||||||
|
}
|
||||||
return true; // Note was played (playTones handles buzzer availability internally)
|
return true; // Note was played (playTones handles buzzer availability internally)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -365,9 +365,6 @@ void Screen::doDeepSleep()
|
|||||||
{
|
{
|
||||||
#ifdef USE_EINK
|
#ifdef USE_EINK
|
||||||
setOn(false, graphics::UIRenderer::drawDeepSleepFrame);
|
setOn(false, graphics::UIRenderer::drawDeepSleepFrame);
|
||||||
#ifdef PIN_EINK_EN
|
|
||||||
digitalWrite(PIN_EINK_EN, LOW); // power off backlight
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
// Without E-Ink display:
|
// Without E-Ink display:
|
||||||
setOn(false);
|
setOn(false);
|
||||||
@ -391,8 +388,12 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
|
|||||||
dispdev->displayOn();
|
dispdev->displayOn();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ELECROW_ThinkNode_M5
|
#ifdef PIN_EINK_EN
|
||||||
io.digitalWrite(PCA_PIN_EINK_EN, HIGH);
|
if (uiconfig.screen_brightness == 1)
|
||||||
|
digitalWrite(PIN_EINK_EN, HIGH);
|
||||||
|
#elif defined(PCA_PIN_EINK_EN)
|
||||||
|
if (uiconfig.screen_brightness == 1)
|
||||||
|
io.digitalWrite(PCA_PIN_EINK_EN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ST7789_CS) && \
|
#if defined(ST7789_CS) && \
|
||||||
@ -424,13 +425,10 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
|
|||||||
// eInkScreensaver parameter is usually NULL (default argument), default frame used instead
|
// eInkScreensaver parameter is usually NULL (default argument), default frame used instead
|
||||||
setScreensaverFrames(einkScreensaver);
|
setScreensaverFrames(einkScreensaver);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ELECROW_ThinkNode_M1
|
|
||||||
if (digitalRead(PIN_EINK_EN) == HIGH) {
|
|
||||||
digitalWrite(PIN_EINK_EN, LOW);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ELECROW_ThinkNode_M5
|
#ifdef PIN_EINK_EN
|
||||||
|
digitalWrite(PIN_EINK_EN, LOW);
|
||||||
|
#elif defined(PCA_PIN_EINK_EN)
|
||||||
io.digitalWrite(PCA_PIN_EINK_EN, LOW);
|
io.digitalWrite(PCA_PIN_EINK_EN, LOW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
#include "graphics/fonts/OLEDDisplayFontsCS.h"
|
#include "graphics/fonts/OLEDDisplayFontsCS.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CROWPANEL_ESP32S3_5_EPAPER
|
#if defined(CROWPANEL_ESP32S3_5_EPAPER) && defined(USE_EINK)
|
||||||
#include "graphics/fonts/EinkDisplayFonts.h"
|
#include "graphics/fonts/EinkDisplayFonts.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -85,7 +85,7 @@
|
|||||||
#define FONT_LARGE FONT_LARGE_LOCAL // Height: 28
|
#define FONT_LARGE FONT_LARGE_LOCAL // Height: 28
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CROWPANEL_ESP32S3_5_EPAPER)
|
#if defined(CROWPANEL_ESP32S3_5_EPAPER) && defined(USE_EINK)
|
||||||
#undef FONT_SMALL
|
#undef FONT_SMALL
|
||||||
#undef FONT_MEDIUM
|
#undef FONT_MEDIUM
|
||||||
#undef FONT_LARGE
|
#undef FONT_LARGE
|
||||||
|
|||||||
@ -318,7 +318,7 @@ void menuHandler::homeBaseMenu()
|
|||||||
static int optionsEnumArray[enumEnd] = {Back};
|
static int optionsEnumArray[enumEnd] = {Back};
|
||||||
int options = 1;
|
int options = 1;
|
||||||
|
|
||||||
#ifdef PIN_EINK_EN
|
#if defined(PIN_EINK_EN) || defined(PCA_PIN_EINK_EN)
|
||||||
optionsArray[options] = "Toggle Backlight";
|
optionsArray[options] = "Toggle Backlight";
|
||||||
optionsEnumArray[options++] = Backlight;
|
optionsEnumArray[options++] = Backlight;
|
||||||
#else
|
#else
|
||||||
@ -342,12 +342,24 @@ void menuHandler::homeBaseMenu()
|
|||||||
bannerOptions.optionsCount = options;
|
bannerOptions.optionsCount = options;
|
||||||
bannerOptions.bannerCallback = [](int selected) -> void {
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
if (selected == Backlight) {
|
if (selected == Backlight) {
|
||||||
#ifdef PIN_EINK_EN
|
#if defined(PIN_EINK_EN)
|
||||||
if (digitalRead(PIN_EINK_EN) == HIGH) {
|
if (uiconfig.screen_brightness == 1) {
|
||||||
|
uiconfig.screen_brightness = 0;
|
||||||
digitalWrite(PIN_EINK_EN, LOW);
|
digitalWrite(PIN_EINK_EN, LOW);
|
||||||
} else {
|
} else {
|
||||||
|
uiconfig.screen_brightness = 1;
|
||||||
digitalWrite(PIN_EINK_EN, HIGH);
|
digitalWrite(PIN_EINK_EN, HIGH);
|
||||||
}
|
}
|
||||||
|
saveUIConfig();
|
||||||
|
#elif defined(PCA_PIN_EINK_EN)
|
||||||
|
if (uiconfig.screen_brightness == 1) {
|
||||||
|
uiconfig.screen_brightness = 0;
|
||||||
|
io.digitalWrite(PCA_PIN_EINK_EN, LOW);
|
||||||
|
} else {
|
||||||
|
uiconfig.screen_brightness = 1;
|
||||||
|
io.digitalWrite(PCA_PIN_EINK_EN, HIGH);
|
||||||
|
}
|
||||||
|
saveUIConfig();
|
||||||
#endif
|
#endif
|
||||||
} else if (selected == Sleep) {
|
} else if (selected == Sleep) {
|
||||||
screen->setOn(false);
|
screen->setOn(false);
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#ifdef USE_EINK
|
||||||
|
|
||||||
#include "EinkDisplayFonts.h"
|
#include "EinkDisplayFonts.h"
|
||||||
|
|
||||||
// Created by https://oleddisplay.squix.ch/ Consider a donation
|
// Created by https://oleddisplay.squix.ch/ Consider a donation
|
||||||
@ -1182,3 +1184,5 @@ const uint8_t Monospaced_plain_30[] PROGMEM = {
|
|||||||
0xF0, 0xFF, 0x01, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0xE0, 0x00, 0xFE, 0x03, 0x00, 0xE0, 0x80, 0x7F,
|
0xF0, 0xFF, 0x01, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0xE0, 0x00, 0xFE, 0x03, 0x00, 0xE0, 0x80, 0x7F,
|
||||||
0x00, 0x00, 0xE0, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10 // 255
|
0x00, 0x00, 0xE0, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10 // 255
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // USE_EINK
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
#ifndef EINKDISPLAYFONTS_h
|
#ifndef EINKDISPLAYFONTS_h
|
||||||
#define EINKDISPLAYFONTS_h
|
#define EINKDISPLAYFONTS_h
|
||||||
|
|
||||||
|
#ifdef USE_EINK
|
||||||
|
|
||||||
#ifdef ARDUINO
|
#ifdef ARDUINO
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#elif __MBED__
|
#elif __MBED__
|
||||||
@ -11,4 +13,7 @@
|
|||||||
* Monospaced Plain 30
|
* Monospaced Plain 30
|
||||||
*/
|
*/
|
||||||
extern const uint8_t Monospaced_plain_30[] PROGMEM;
|
extern const uint8_t Monospaced_plain_30[] PROGMEM;
|
||||||
|
|
||||||
|
#endif // USE_EINK
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#ifdef OLED_CS
|
||||||
|
|
||||||
#include "OLEDDisplayFontsCS.h"
|
#include "OLEDDisplayFontsCS.h"
|
||||||
|
|
||||||
// Font generated or edited with the glyphEditor
|
// Font generated or edited with the glyphEditor
|
||||||
@ -1861,3 +1863,5 @@ const uint8_t ArialMT_Plain_24_CS[] PROGMEM = {
|
|||||||
0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0xC0, 0xC0, 0x1F, 0x00, 0xC0, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
|
0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0xC0, 0xC0, 0x1F, 0x00, 0xC0, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
|
||||||
0x06, // 255
|
0x06, // 255
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // OLED_CS
|
||||||
@ -1,4 +1,5 @@
|
|||||||
// trunk-ignore-all(clang-format): Preserve long lines
|
// trunk-ignore-all(clang-format): Preserve long lines
|
||||||
|
#ifdef OLED_PL
|
||||||
#include "OLEDDisplayFontsPL.h"
|
#include "OLEDDisplayFontsPL.h"
|
||||||
|
|
||||||
const uint8_t ArialMT_Plain_10_PL[] PROGMEM = {
|
const uint8_t ArialMT_Plain_10_PL[] PROGMEM = {
|
||||||
@ -1311,3 +1312,5 @@ const uint8_t ArialMT_Plain_24_PL[] PROGMEM = {
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x1C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x03, // 254
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x1C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x03, // 254
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0xC0, 0xF0, 0x01, 0x06, 0xC0, 0x80, 0x0F, 0x07, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0xC0, 0xC0, 0x1F, 0x00, 0xC0, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, // 255
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0xC0, 0xF0, 0x01, 0x06, 0xC0, 0x80, 0x0F, 0x07, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0xC0, 0xC0, 0x1F, 0x00, 0xC0, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, // 255
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // OLED_PL
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
#ifdef OLED_RU
|
||||||
|
|
||||||
#include "OLEDDisplayFontsRU.h"
|
#include "OLEDDisplayFontsRU.h"
|
||||||
|
|
||||||
// Font generated or edited with the glyphEditor
|
// Font generated or edited with the glyphEditor
|
||||||
@ -1763,3 +1765,5 @@ const uint8_t ArialMT_Plain_24_RU[] PROGMEM = {
|
|||||||
0x84, 0x03, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC,
|
0x84, 0x03, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC,
|
||||||
0x3F, // 255
|
0x3F, // 255
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // OLED_RU
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
#ifdef OLED_UA
|
||||||
|
|
||||||
#include "OLEDDisplayFontsUA.h"
|
#include "OLEDDisplayFontsUA.h"
|
||||||
|
|
||||||
// Font generated or edited with the glyphEditor
|
// Font generated or edited with the glyphEditor
|
||||||
@ -1921,3 +1923,5 @@ const uint8_t ArialMT_Plain_24_UA[] PROGMEM = {
|
|||||||
0x18, 0x0E, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8,
|
0x18, 0x0E, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8,
|
||||||
0xFF, // 1103
|
0xFF, // 1103
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // OLED_UA
|
||||||
@ -92,8 +92,11 @@ bool ButtonThread::initButton(const ButtonConfig &config)
|
|||||||
if (config.shortLong != INPUT_BROKER_NONE) {
|
if (config.shortLong != INPUT_BROKER_NONE) {
|
||||||
_shortLong = config.shortLong;
|
_shortLong = config.shortLong;
|
||||||
}
|
}
|
||||||
|
#ifdef USE_EINK
|
||||||
|
userButton.setDebounceMs(0);
|
||||||
|
#else
|
||||||
userButton.setDebounceMs(1);
|
userButton.setDebounceMs(1);
|
||||||
|
#endif
|
||||||
userButton.setPressMs(_longPressTime);
|
userButton.setPressMs(_longPressTime);
|
||||||
|
|
||||||
if (screen) {
|
if (screen) {
|
||||||
@ -137,8 +140,7 @@ int32_t ButtonThread::runOnce()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Progressive lead-up sound system
|
// Progressive lead-up sound system
|
||||||
if (buttonCurrentlyPressed && (millis() - buttonPressStartTime) >= BUTTON_LEADUP_MS &&
|
if (buttonCurrentlyPressed && (millis() - buttonPressStartTime) >= BUTTON_LEADUP_MS) {
|
||||||
(millis() - buttonPressStartTime) < _longLongPressTime) {
|
|
||||||
|
|
||||||
// Start the progressive sequence if not already active
|
// Start the progressive sequence if not already active
|
||||||
if (!leadUpSequenceActive) {
|
if (!leadUpSequenceActive) {
|
||||||
@ -150,13 +152,14 @@ int32_t ButtonThread::runOnce()
|
|||||||
else if ((millis() - lastLeadUpNoteTime) >= 400) { // 400ms interval between notes
|
else if ((millis() - lastLeadUpNoteTime) >= 400) { // 400ms interval between notes
|
||||||
if (playNextLeadUpNote()) {
|
if (playNextLeadUpNote()) {
|
||||||
lastLeadUpNoteTime = millis();
|
lastLeadUpNoteTime = millis();
|
||||||
|
} else {
|
||||||
|
leadUpPlayed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset when button is released
|
// Reset when button is released
|
||||||
if (!buttonCurrentlyPressed && buttonWasPressed) {
|
if (!buttonCurrentlyPressed && buttonWasPressed) {
|
||||||
leadUpPlayed = false;
|
|
||||||
leadUpSequenceActive = false;
|
leadUpSequenceActive = false;
|
||||||
resetLeadUpSequence();
|
resetLeadUpSequence();
|
||||||
}
|
}
|
||||||
@ -253,12 +256,13 @@ int32_t ButtonThread::runOnce()
|
|||||||
|
|
||||||
LOG_INFO("LONG PRESS RELEASE AFTER %u MILLIS", millis() - buttonPressStartTime);
|
LOG_INFO("LONG PRESS RELEASE AFTER %u MILLIS", millis() - buttonPressStartTime);
|
||||||
if (millis() > 30000 && _longLongPress != INPUT_BROKER_NONE &&
|
if (millis() > 30000 && _longLongPress != INPUT_BROKER_NONE &&
|
||||||
(millis() - buttonPressStartTime) >= _longLongPressTime) {
|
(millis() - buttonPressStartTime) >= _longLongPressTime && leadUpPlayed) {
|
||||||
evt.inputEvent = _longLongPress;
|
evt.inputEvent = _longLongPress;
|
||||||
this->notifyObservers(&evt);
|
this->notifyObservers(&evt);
|
||||||
}
|
}
|
||||||
// Reset combination tracking
|
// Reset combination tracking
|
||||||
waitingForLongPress = false;
|
waitingForLongPress = false;
|
||||||
|
leadUpPlayed = false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,7 +92,7 @@ class ButtonThread : public Observable<const InputEvent *>, public concurrency::
|
|||||||
|
|
||||||
voidFuncPtr _intRoutine = nullptr;
|
voidFuncPtr _intRoutine = nullptr;
|
||||||
uint16_t _longPressTime = 500;
|
uint16_t _longPressTime = 500;
|
||||||
uint16_t _longLongPressTime = 5000;
|
uint16_t _longLongPressTime = 3900;
|
||||||
int _pinNum = 0;
|
int _pinNum = 0;
|
||||||
bool _activeLow = true;
|
bool _activeLow = true;
|
||||||
bool _touchQuirk = false;
|
bool _touchQuirk = false;
|
||||||
|
|||||||
@ -309,7 +309,6 @@ void setup()
|
|||||||
Wire.begin(48, 47);
|
Wire.begin(48, 47);
|
||||||
io.pinMode(PCA_PIN_EINK_EN, OUTPUT);
|
io.pinMode(PCA_PIN_EINK_EN, OUTPUT);
|
||||||
io.pinMode(PCA_PIN_POWER_EN, OUTPUT);
|
io.pinMode(PCA_PIN_POWER_EN, OUTPUT);
|
||||||
io.digitalWrite(PCA_PIN_EINK_EN, HIGH);
|
|
||||||
io.digitalWrite(PCA_PIN_POWER_EN, HIGH);
|
io.digitalWrite(PCA_PIN_POWER_EN, HIGH);
|
||||||
// io.pinMode(C2_PIN, OUTPUT);
|
// io.pinMode(C2_PIN, OUTPUT);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -666,8 +666,10 @@ void RadioInterface::limitPower(int8_t loraMaxPower)
|
|||||||
|
|
||||||
void RadioInterface::deliverToReceiver(meshtastic_MeshPacket *p)
|
void RadioInterface::deliverToReceiver(meshtastic_MeshPacket *p)
|
||||||
{
|
{
|
||||||
if (router)
|
if (router) {
|
||||||
|
p->transport_mechanism = meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA;
|
||||||
router->enqueueReceivedMessage(p);
|
router->enqueueReceivedMessage(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|||||||
@ -66,7 +66,6 @@ int32_t Router::runOnce()
|
|||||||
{
|
{
|
||||||
meshtastic_MeshPacket *mp;
|
meshtastic_MeshPacket *mp;
|
||||||
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL) {
|
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL) {
|
||||||
mp->transport_mechanism = meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA;
|
|
||||||
// printPacket("handle fromRadioQ", mp);
|
// printPacket("handle fromRadioQ", mp);
|
||||||
perhapsHandleReceived(mp);
|
perhapsHandleReceived(mp);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -270,6 +270,8 @@ typedef enum _meshtastic_HardwareModel {
|
|||||||
/* MeshSolar is an integrated power management and communication solution designed for outdoor low-power devices.
|
/* MeshSolar is an integrated power management and communication solution designed for outdoor low-power devices.
|
||||||
https://heltec.org/project/meshsolar/ */
|
https://heltec.org/project/meshsolar/ */
|
||||||
meshtastic_HardwareModel_HELTEC_MESH_SOLAR = 108,
|
meshtastic_HardwareModel_HELTEC_MESH_SOLAR = 108,
|
||||||
|
/* Lilygo T-Echo Lite */
|
||||||
|
meshtastic_HardwareModel_T_ECHO_LITE = 109,
|
||||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||||
|
|||||||
@ -78,16 +78,15 @@ void CannedMessageModule::LaunchWithDestination(NodeNum newDest, uint8_t newChan
|
|||||||
lastDestSet = true;
|
lastDestSet = true;
|
||||||
|
|
||||||
// Rest of function unchanged...
|
// Rest of function unchanged...
|
||||||
// Always select the first real canned message on activation
|
// Upon activation, highlight "[Select Destination]"
|
||||||
int firstRealMsgIdx = 0;
|
int selectDestination = 0;
|
||||||
for (int i = 0; i < messagesCount; ++i) {
|
for (int i = 0; i < messagesCount; ++i) {
|
||||||
if (strcmp(messages[i], "[Select Destination]") != 0 && strcmp(messages[i], "[Exit]") != 0 &&
|
if (strcmp(messages[i], "[Select Destination]") == 0) {
|
||||||
strcmp(messages[i], "[---- Free Text ----]") != 0) {
|
selectDestination = i;
|
||||||
firstRealMsgIdx = i;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
currentMessageIndex = firstRealMsgIdx;
|
currentMessageIndex = selectDestination;
|
||||||
|
|
||||||
// This triggers the canned message list
|
// This triggers the canned message list
|
||||||
runState = CANNED_MESSAGE_RUN_STATE_ACTIVE;
|
runState = CANNED_MESSAGE_RUN_STATE_ACTIVE;
|
||||||
@ -999,17 +998,16 @@ int32_t CannedMessageModule::runOnce()
|
|||||||
this->notifyObservers(&e);
|
this->notifyObservers(&e);
|
||||||
return 2000;
|
return 2000;
|
||||||
}
|
}
|
||||||
// Always highlight the first real canned message when entering the message list
|
// Highlight [Select Destination] initially when entering the message list
|
||||||
else if ((this->runState != CANNED_MESSAGE_RUN_STATE_FREETEXT) && (this->currentMessageIndex == -1)) {
|
else if ((this->runState != CANNED_MESSAGE_RUN_STATE_FREETEXT) && (this->currentMessageIndex == -1)) {
|
||||||
int firstRealMsgIdx = 0;
|
int selectDestination = 0;
|
||||||
for (int i = 0; i < this->messagesCount; ++i) {
|
for (int i = 0; i < this->messagesCount; ++i) {
|
||||||
if (strcmp(this->messages[i], "[Select Destination]") != 0 && strcmp(this->messages[i], "[Exit]") != 0 &&
|
if (strcmp(this->messages[i], "[Select Destination]") == 0) {
|
||||||
strcmp(this->messages[i], "[---- Free Text ----]") != 0) {
|
selectDestination = i;
|
||||||
firstRealMsgIdx = i;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->currentMessageIndex = firstRealMsgIdx;
|
this->currentMessageIndex = selectDestination;
|
||||||
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;
|
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;
|
||||||
this->runState = CANNED_MESSAGE_RUN_STATE_ACTIVE;
|
this->runState = CANNED_MESSAGE_RUN_STATE_ACTIVE;
|
||||||
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_UP) {
|
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_UP) {
|
||||||
|
|||||||
@ -602,7 +602,7 @@ void TraceRouteModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state
|
|||||||
int start = 0;
|
int start = 0;
|
||||||
int newlinePos = resultText.indexOf('\n', start);
|
int newlinePos = resultText.indexOf('\n', start);
|
||||||
|
|
||||||
while (newlinePos != -1 || start < resultText.length()) {
|
while (newlinePos != -1 || start < static_cast<int>(resultText.length())) {
|
||||||
String segment;
|
String segment;
|
||||||
if (newlinePos != -1) {
|
if (newlinePos != -1) {
|
||||||
segment = resultText.substring(start, newlinePos);
|
segment = resultText.substring(start, newlinePos);
|
||||||
@ -624,7 +624,7 @@ void TraceRouteModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state
|
|||||||
int lastGoodBreak = -1;
|
int lastGoodBreak = -1;
|
||||||
bool lineComplete = false;
|
bool lineComplete = false;
|
||||||
|
|
||||||
for (int i = 0; i < remaining.length(); i++) {
|
for (int i = 0; i < static_cast<int>(remaining.length()); i++) {
|
||||||
char ch = remaining.charAt(i);
|
char ch = remaining.charAt(i);
|
||||||
String testLine = tempLine + ch;
|
String testLine = tempLine + ch;
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
#define LORA_DIO1 SX126X_DIO1
|
#define LORA_DIO1 SX126X_DIO1
|
||||||
|
|
||||||
#define USE_EINK
|
#define USE_EINK
|
||||||
#define PIN_EINK_EN -1 // Note: this is really just backlight power
|
// Note: this is really just backlight power
|
||||||
#define PCA_PIN_EINK_EN 5 // This is the pin number on the GPIO expander
|
#define PCA_PIN_EINK_EN 5 // This is the pin number on the GPIO expander
|
||||||
#define PIN_EINK_CS 39
|
#define PIN_EINK_CS 39
|
||||||
#define PIN_EINK_BUSY 42
|
#define PIN_EINK_BUSY 42
|
||||||
|
|||||||
@ -11,10 +11,10 @@ build_flags = ${nrf52840_base.build_flags}
|
|||||||
-DRADIOLIB_EXCLUDE_SX127X=1
|
-DRADIOLIB_EXCLUDE_SX127X=1
|
||||||
-DRADIOLIB_EXCLUDE_LR11X0=1
|
-DRADIOLIB_EXCLUDE_LR11X0=1
|
||||||
-DHAS_RAKPROT=1 ; Define if RAk OneWireSerial is used (disables GPS)
|
-DHAS_RAKPROT=1 ; Define if RAk OneWireSerial is used (disables GPS)
|
||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak2560> +<mesh/api/> +<mqtt/>
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak2560> +<mesh/api/> +<mqtt/> +<serialization/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${nrf52_networking_base.lib_deps}
|
||||||
melopero/Melopero RV3028@^1.1.0
|
melopero/Melopero RV3028@^1.1.0
|
||||||
https://github.com/beegee-tokyo/RAK-OneWireSerial/archive/0.0.2.zip
|
https://github.com/beegee-tokyo/RAK-OneWireSerial/archive/0.0.2.zip
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
|
|||||||
@ -17,7 +17,7 @@ build_flags = ${nrf52840_base.build_flags}
|
|||||||
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/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${nrf52_networking_base.lib_deps}
|
||||||
melopero/Melopero RV3028@^1.1.0
|
melopero/Melopero RV3028@^1.1.0
|
||||||
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
|
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
|
||||||
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
|
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
|
||||||
|
|||||||
@ -24,7 +24,7 @@ build_flags = ${nrf52840_base.build_flags}
|
|||||||
-DMESHTASTIC_EXCLUDE_STOREFORWARD=1
|
-DMESHTASTIC_EXCLUDE_STOREFORWARD=1
|
||||||
-DMESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
|
-DMESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
|
||||||
-DMESHTASTIC_EXCLUDE_WAYPOINT=1
|
-DMESHTASTIC_EXCLUDE_WAYPOINT=1
|
||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631_eth_gw> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631_eth_gw> +<mesh/eth/> +<mesh/api/> +<mqtt/> +<serialization/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ build_flags = ${nrf52840_base.build_flags}
|
|||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak_wismeshtap> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak_wismeshtap> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${nrf52_networking_base.lib_deps}
|
||||||
melopero/Melopero RV3028@^1.1.0
|
melopero/Melopero RV3028@^1.1.0
|
||||||
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
|
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
|
||||||
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
|
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user