mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-21 17:27:30 +00:00
Compare commits
11 Commits
Message_Bu
...
meshtastic
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2b274bba8 | ||
|
|
d07db5a850 | ||
|
|
72acd8f58d | ||
|
|
fb4486c74b | ||
|
|
89be78ef0f | ||
|
|
f7a374600c | ||
|
|
6574af0551 | ||
|
|
16feccec2a | ||
|
|
59ca02aca0 | ||
|
|
7a5d4ad43c | ||
|
|
e93abf85c0 |
@@ -20,7 +20,7 @@ ENV PIP_ROOT_USER_ACTION=ignore
|
|||||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
cmake git zip libgpiod-dev libbluetooth-dev libi2c-dev \
|
cmake git zip libgpiod-dev libbluetooth-dev libi2c-dev \
|
||||||
libunistring-dev libmicrohttpd-dev libgnutls28-dev libgcrypt20-dev \
|
libunistring-dev libmicrohttpd-dev libgnutls28-dev libgcrypt20-dev \
|
||||||
libusb-1.0-0-dev libssl-dev pkg-config libsqlite3-dev && \
|
libusb-1.0-0-dev libssl-dev pkg-config && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||||
pip install --no-cache-dir -U \
|
pip install --no-cache-dir -U \
|
||||||
platformio==6.1.16 \
|
platformio==6.1.16 \
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ plugins:
|
|||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- checkov@3.2.497
|
- checkov@3.2.497
|
||||||
- renovate@42.84.2
|
- renovate@42.81.8
|
||||||
- prettier@3.8.0
|
- prettier@3.8.0
|
||||||
- trufflehog@3.92.5
|
- trufflehog@3.92.4
|
||||||
- yamllint@1.38.0
|
- yamllint@1.38.0
|
||||||
- bandit@1.9.3
|
- bandit@1.9.2
|
||||||
- trivy@0.68.2
|
- trivy@0.68.2
|
||||||
- taplo@0.10.0
|
- taplo@0.10.0
|
||||||
- ruff@0.14.13
|
- ruff@0.14.11
|
||||||
- isort@7.0.0
|
- isort@7.0.0
|
||||||
- markdownlint@0.47.0
|
- markdownlint@0.47.0
|
||||||
- oxipng@10.0.0
|
- oxipng@10.0.0
|
||||||
@@ -26,7 +26,7 @@ lint:
|
|||||||
- hadolint@2.14.0
|
- hadolint@2.14.0
|
||||||
- shfmt@3.6.0
|
- shfmt@3.6.0
|
||||||
- shellcheck@0.11.0
|
- shellcheck@0.11.0
|
||||||
- black@26.1.0
|
- black@25.12.0
|
||||||
- git-diff-check
|
- git-diff-check
|
||||||
- gitleaks@8.30.0
|
- gitleaks@8.30.0
|
||||||
- clang-format@16.0.3
|
- clang-format@16.0.3
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||||||
curl wget g++ zip git ca-certificates pkg-config \
|
curl wget g++ zip git ca-certificates pkg-config \
|
||||||
libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \
|
libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \
|
||||||
libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev \
|
libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev \
|
||||||
libx11-dev libinput-dev libxkbcommon-x11-dev libsqlite3-dev \
|
libx11-dev libinput-dev libxkbcommon-x11-dev \
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
|
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
|
||||||
&& pip install --no-cache-dir -U platformio \
|
&& pip install --no-cache-dir -U platformio \
|
||||||
&& mkdir /tmp/firmware
|
&& mkdir /tmp/firmware
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ RUN apk --no-cache add \
|
|||||||
bash g++ libstdc++-dev linux-headers zip git ca-certificates libbsd-dev \
|
bash g++ libstdc++-dev linux-headers zip git ca-certificates libbsd-dev \
|
||||||
libgpiod-dev yaml-cpp-dev bluez-dev \
|
libgpiod-dev yaml-cpp-dev bluez-dev \
|
||||||
libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \
|
libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \
|
||||||
libx11-dev libinput-dev libxkbcommon-dev sqlite-dev \
|
libx11-dev libinput-dev libxkbcommon-dev \
|
||||||
&& rm -rf /var/cache/apk/* \
|
&& rm -rf /var/cache/apk/* \
|
||||||
&& pip install --no-cache-dir -U platformio \
|
&& pip install --no-cache-dir -U platformio \
|
||||||
&& mkdir /tmp/firmware
|
&& mkdir /tmp/firmware
|
||||||
|
|||||||
3
debian/control
vendored
3
debian/control
vendored
@@ -25,8 +25,7 @@ Build-Depends: debhelper-compat (= 13),
|
|||||||
liborcania-dev,
|
liborcania-dev,
|
||||||
libx11-dev,
|
libx11-dev,
|
||||||
libinput-dev,
|
libinput-dev,
|
||||||
libxkbcommon-x11-dev,
|
libxkbcommon-x11-dev
|
||||||
libsqlite3-dev
|
|
||||||
Standards-Version: 4.6.2
|
Standards-Version: 4.6.2
|
||||||
Homepage: https://github.com/meshtastic/firmware
|
Homepage: https://github.com/meshtastic/firmware
|
||||||
Rules-Requires-Root: no
|
Rules-Requires-Root: no
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ BuildRequires: pkgconfig(bluez)
|
|||||||
BuildRequires: pkgconfig(libusb-1.0)
|
BuildRequires: pkgconfig(libusb-1.0)
|
||||||
BuildRequires: libi2c-devel
|
BuildRequires: libi2c-devel
|
||||||
BuildRequires: pkgconfig(libuv)
|
BuildRequires: pkgconfig(libuv)
|
||||||
BuildRequires: pkgconfig(sqlite3)
|
|
||||||
# Web components:
|
# Web components:
|
||||||
BuildRequires: pkgconfig(openssl)
|
BuildRequires: pkgconfig(openssl)
|
||||||
BuildRequires: pkgconfig(liborcania)
|
BuildRequires: pkgconfig(liborcania)
|
||||||
|
|||||||
@@ -119,7 +119,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/3480b731d28b10d73414cf0dd7975bff745de8cf.zip
|
https://github.com/meshtastic/device-ui/archive/5a870c623a4e9ab7a7abe3d02950536f107d1a31.zip
|
||||||
|
|
||||||
; Common libs for environmental measurements in telemetry module
|
; Common libs for environmental measurements in telemetry module
|
||||||
[environmental_base]
|
[environmental_base]
|
||||||
@@ -212,30 +212,3 @@ lib_deps =
|
|||||||
sensirion/Sensirion Core@0.7.2
|
sensirion/Sensirion Core@0.7.2
|
||||||
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
|
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
|
||||||
sensirion/Sensirion I2C SCD4x@1.1.0
|
sensirion/Sensirion I2C SCD4x@1.1.0
|
||||||
; Same as environmental_extra but without BSEC (saves ~3.5KB DRAM for original ESP32 targets)
|
|
||||||
[environmental_extra_no_bsec]
|
|
||||||
lib_deps =
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit BMP3XX packageName=adafruit/library/Adafruit BMP3XX Library
|
|
||||||
adafruit/Adafruit BMP3XX Library@2.1.6
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit MAX1704X packageName=adafruit/library/Adafruit MAX1704X
|
|
||||||
adafruit/Adafruit MAX1704X@1.0.3
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit SHTC3 packageName=adafruit/library/Adafruit SHTC3 Library
|
|
||||||
adafruit/Adafruit SHTC3 Library@1.0.2
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit LPS2X packageName=adafruit/library/Adafruit LPS2X
|
|
||||||
adafruit/Adafruit LPS2X@2.0.6
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit SHT31 packageName=adafruit/library/Adafruit SHT31 Library
|
|
||||||
adafruit/Adafruit SHT31 Library@2.2.2
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit VEML7700 packageName=adafruit/library/Adafruit VEML7700 Library
|
|
||||||
adafruit/Adafruit VEML7700 Library@2.1.6
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit SHT4x packageName=adafruit/library/Adafruit SHT4x Library
|
|
||||||
adafruit/Adafruit SHT4x Library@1.0.5
|
|
||||||
# renovate: datasource=custom.pio depName=SparkFun Qwiic Scale NAU7802 packageName=sparkfun/library/SparkFun Qwiic Scale NAU7802 Arduino Library
|
|
||||||
sparkfun/SparkFun Qwiic Scale NAU7802 Arduino Library@1.0.6
|
|
||||||
# renovate: datasource=custom.pio depName=ClosedCube OPT3001 packageName=closedcube/library/ClosedCube OPT3001
|
|
||||||
closedcube/ClosedCube OPT3001@1.1.2
|
|
||||||
# renovate: datasource=git-refs depName=meshtastic-DFRobot_LarkWeatherStation packageName=https://github.com/meshtastic/DFRobot_LarkWeatherStation gitBranch=master
|
|
||||||
https://github.com/meshtastic/DFRobot_LarkWeatherStation/archive/4de3a9cadef0f6a5220a8a906cf9775b02b0040d.zip
|
|
||||||
# renovate: datasource=custom.pio depName=Sensirion Core packageName=sensirion/library/Sensirion Core
|
|
||||||
sensirion/Sensirion Core@0.7.2
|
|
||||||
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
|
|
||||||
sensirion/Sensirion I2C SCD4x@1.1.0
|
|
||||||
Submodule protobufs updated: 77c8329a59...4b9f104a18
@@ -445,6 +445,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// BME680 BSEC2 support detection
|
||||||
|
#if !defined(MESHTASTIC_BME680_BSEC2_SUPPORTED)
|
||||||
|
#if defined(RAK_4631) || defined(TBEAM_V10)
|
||||||
|
|
||||||
|
#define MESHTASTIC_BME680_BSEC2_SUPPORTED 1
|
||||||
|
#define MESHTASTIC_BME680_HEADER <bsec2.h>
|
||||||
|
#else
|
||||||
|
#define MESHTASTIC_BME680_BSEC2_SUPPORTED 0
|
||||||
|
#define MESHTASTIC_BME680_HEADER <Adafruit_BME680.h>
|
||||||
|
#endif // defined(RAK_4631)
|
||||||
|
#endif // !defined(MESHTASTIC_BME680_BSEC2_SUPPORTED)
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Global switches to turn off features for a minimized build
|
// Global switches to turn off features for a minimized build
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ void drawLoRaFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x,
|
|||||||
if (currentResolution == ScreenResolution::UltraLow) {
|
if (currentResolution == ScreenResolution::UltraLow) {
|
||||||
snprintf(frequencyslot, sizeof(frequencyslot), "%sMHz (%d)", freqStr, config.lora.channel_num);
|
snprintf(frequencyslot, sizeof(frequencyslot), "%sMHz (%d)", freqStr, config.lora.channel_num);
|
||||||
} else {
|
} else {
|
||||||
snprintf(frequencyslot, sizeof(frequencyslot), "Freq: %sMHz (%d)", freqStr, config.lora.channel_num);
|
snprintf(frequencyslot, sizeof(frequencyslot), "Freq/Ch: %sMHz (%d)", freqStr, config.lora.channel_num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
size_t len = strlen(frequencyslot);
|
size_t len = strlen(frequencyslot);
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ uint8_t test_count = 0;
|
|||||||
|
|
||||||
void menuHandler::loraMenu()
|
void menuHandler::loraMenu()
|
||||||
{
|
{
|
||||||
static const char *optionsArray[] = {"Back", "Device Role", "Radio Preset", "Frequency Slot", "LoRa Region"};
|
static const char *optionsArray[] = {"Back", "Device Role", "Radio Preset", "LoRa Region"};
|
||||||
enum optionsNumbers { Back = 0, device_role_picker = 1, radio_preset_picker = 2, frequency_slot = 3, lora_picker = 4 };
|
enum optionsNumbers { Back = 0, device_role_picker = 1, radio_preset_picker = 2, lora_picker = 3 };
|
||||||
BannerOverlayOptions bannerOptions;
|
BannerOverlayOptions bannerOptions;
|
||||||
bannerOptions.message = "LoRa Actions";
|
bannerOptions.message = "LoRa Actions";
|
||||||
bannerOptions.optionsArrayPtr = optionsArray;
|
bannerOptions.optionsArrayPtr = optionsArray;
|
||||||
bannerOptions.optionsCount = 5;
|
bannerOptions.optionsCount = 4;
|
||||||
bannerOptions.bannerCallback = [](int selected) -> void {
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
if (selected == Back) {
|
if (selected == Back) {
|
||||||
// No action
|
// No action
|
||||||
@@ -78,8 +78,6 @@ void menuHandler::loraMenu()
|
|||||||
menuHandler::menuQueue = menuHandler::device_role_picker;
|
menuHandler::menuQueue = menuHandler::device_role_picker;
|
||||||
} else if (selected == radio_preset_picker) {
|
} else if (selected == radio_preset_picker) {
|
||||||
menuHandler::menuQueue = menuHandler::radio_preset_picker;
|
menuHandler::menuQueue = menuHandler::radio_preset_picker;
|
||||||
} else if (selected == frequency_slot) {
|
|
||||||
menuHandler::menuQueue = menuHandler::frequency_slot;
|
|
||||||
} else if (selected == lora_picker) {
|
} else if (selected == lora_picker) {
|
||||||
menuHandler::menuQueue = menuHandler::lora_picker;
|
menuHandler::menuQueue = menuHandler::lora_picker;
|
||||||
}
|
}
|
||||||
@@ -250,113 +248,6 @@ void menuHandler::DeviceRolePicker()
|
|||||||
screen->showOverlayBanner(bannerOptions);
|
screen->showOverlayBanner(bannerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menuHandler::FrequencySlotPicker()
|
|
||||||
{
|
|
||||||
|
|
||||||
enum ReplyOptions : int { Back = -1 };
|
|
||||||
constexpr int MAX_CHANNEL_OPTIONS = 202;
|
|
||||||
static const char *optionsArray[MAX_CHANNEL_OPTIONS];
|
|
||||||
static int optionsEnumArray[MAX_CHANNEL_OPTIONS];
|
|
||||||
static char channelText[MAX_CHANNEL_OPTIONS - 1][12];
|
|
||||||
int options = 0;
|
|
||||||
optionsArray[options] = "Back";
|
|
||||||
optionsEnumArray[options++] = Back;
|
|
||||||
optionsArray[options] = "Slot 0 (Auto)";
|
|
||||||
optionsEnumArray[options++] = 0;
|
|
||||||
|
|
||||||
// Calculate number of channels (copied from RadioInterface::applyModemConfig())
|
|
||||||
meshtastic_Config_LoRaConfig &loraConfig = config.lora;
|
|
||||||
double bw = loraConfig.bandwidth;
|
|
||||||
if (loraConfig.use_preset) {
|
|
||||||
switch (loraConfig.modem_preset) {
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO:
|
|
||||||
bw = (myRegion->wideLora) ? 1625.0 : 500;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO:
|
|
||||||
bw = (myRegion->wideLora) ? 1625.0 : 500;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:
|
|
||||||
bw = (myRegion->wideLora) ? 406.25 : 125;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 406.25 : 125;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
bw = loraConfig.bandwidth;
|
|
||||||
if (bw == 31) // This parameter is not an integer
|
|
||||||
bw = 31.25;
|
|
||||||
if (bw == 62) // Fix for 62.5Khz bandwidth
|
|
||||||
bw = 62.5;
|
|
||||||
if (bw == 200)
|
|
||||||
bw = 203.125;
|
|
||||||
if (bw == 400)
|
|
||||||
bw = 406.25;
|
|
||||||
if (bw == 800)
|
|
||||||
bw = 812.5;
|
|
||||||
if (bw == 1600)
|
|
||||||
bw = 1625.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t numChannels = 0;
|
|
||||||
if (myRegion) {
|
|
||||||
numChannels = (uint32_t)floor((myRegion->freqEnd - myRegion->freqStart) / (myRegion->spacing + (bw / 1000.0)));
|
|
||||||
} else {
|
|
||||||
LOG_WARN("Region not set, cannot calculate number of channels");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (numChannels > (uint32_t)(MAX_CHANNEL_OPTIONS - 2))
|
|
||||||
numChannels = (uint32_t)(MAX_CHANNEL_OPTIONS - 2);
|
|
||||||
|
|
||||||
for (uint32_t ch = 1; ch <= numChannels; ch++) {
|
|
||||||
snprintf(channelText[ch - 1], sizeof(channelText[ch - 1]), "Slot %lu", (unsigned long)ch);
|
|
||||||
optionsArray[options] = channelText[ch - 1];
|
|
||||||
optionsEnumArray[options++] = (int)ch;
|
|
||||||
}
|
|
||||||
|
|
||||||
BannerOverlayOptions bannerOptions;
|
|
||||||
bannerOptions.message = "Frequency Slot";
|
|
||||||
bannerOptions.optionsArrayPtr = optionsArray;
|
|
||||||
bannerOptions.optionsEnumPtr = optionsEnumArray;
|
|
||||||
bannerOptions.optionsCount = options;
|
|
||||||
|
|
||||||
// Start highlight on current channel if possible, otherwise on "1"
|
|
||||||
int initial = (int)config.lora.channel_num + 1;
|
|
||||||
if (initial < 2 || initial > (int)numChannels + 1)
|
|
||||||
initial = 1;
|
|
||||||
bannerOptions.InitialSelected = initial;
|
|
||||||
|
|
||||||
bannerOptions.bannerCallback = [](int selected) -> void {
|
|
||||||
if (selected == Back) {
|
|
||||||
menuHandler::menuQueue = menuHandler::lora_Menu;
|
|
||||||
screen->runNow();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
config.lora.channel_num = selected;
|
|
||||||
service->reloadConfig(SEGMENT_CONFIG);
|
|
||||||
rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);
|
|
||||||
};
|
|
||||||
|
|
||||||
screen->showOverlayBanner(bannerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
void menuHandler::RadioPresetPicker()
|
void menuHandler::RadioPresetPicker()
|
||||||
{
|
{
|
||||||
static const RadioPresetOption presetOptions[] = {
|
static const RadioPresetOption presetOptions[] = {
|
||||||
@@ -387,8 +278,6 @@ void menuHandler::RadioPresetPicker()
|
|||||||
}
|
}
|
||||||
|
|
||||||
config.lora.modem_preset = option.value;
|
config.lora.modem_preset = option.value;
|
||||||
config.lora.channel_num = 0; // Reset to default channel for the preset
|
|
||||||
config.lora.override_frequency = 0; // Clear any custom frequency
|
|
||||||
service->reloadConfig(SEGMENT_CONFIG);
|
service->reloadConfig(SEGMENT_CONFIG);
|
||||||
rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);
|
rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);
|
||||||
});
|
});
|
||||||
@@ -2662,9 +2551,6 @@ void menuHandler::handleMenuSwitch(OLEDDisplay *display)
|
|||||||
case radio_preset_picker:
|
case radio_preset_picker:
|
||||||
RadioPresetPicker();
|
RadioPresetPicker();
|
||||||
break;
|
break;
|
||||||
case frequency_slot:
|
|
||||||
FrequencySlotPicker();
|
|
||||||
break;
|
|
||||||
case no_timeout_lora_picker:
|
case no_timeout_lora_picker:
|
||||||
LoraRegionPicker(0);
|
LoraRegionPicker(0);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class menuHandler
|
|||||||
lora_picker,
|
lora_picker,
|
||||||
device_role_picker,
|
device_role_picker,
|
||||||
radio_preset_picker,
|
radio_preset_picker,
|
||||||
frequency_slot,
|
|
||||||
no_timeout_lora_picker,
|
no_timeout_lora_picker,
|
||||||
TZ_picker,
|
TZ_picker,
|
||||||
twelve_hour_picker,
|
twelve_hour_picker,
|
||||||
@@ -64,7 +63,6 @@ class menuHandler
|
|||||||
static void loraMenu();
|
static void loraMenu();
|
||||||
static void DeviceRolePicker();
|
static void DeviceRolePicker();
|
||||||
static void RadioPresetPicker();
|
static void RadioPresetPicker();
|
||||||
static void FrequencySlotPicker();
|
|
||||||
static void handleMenuSwitch(OLEDDisplay *display);
|
static void handleMenuSwitch(OLEDDisplay *display);
|
||||||
static void showConfirmationBanner(const char *message, std::function<void()> onConfirm);
|
static void showConfirmationBanner(const char *message, std::function<void()> onConfirm);
|
||||||
static void clockMenu();
|
static void clockMenu();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "MessageStore.h"
|
#include "MessageStore.h"
|
||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "UIRenderer.h"
|
#include "UIRenderer.h"
|
||||||
|
#include "configuration.h"
|
||||||
#include "gps/RTC.h"
|
#include "gps/RTC.h"
|
||||||
#include "graphics/Screen.h"
|
#include "graphics/Screen.h"
|
||||||
#include "graphics/ScreenFonts.h"
|
#include "graphics/ScreenFonts.h"
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
|
|
||||||
// External declarations
|
// External declarations
|
||||||
extern bool hasUnreadMessage;
|
extern bool hasUnreadMessage;
|
||||||
|
extern meshtastic_DeviceState devicestate;
|
||||||
extern graphics::Screen *screen;
|
extern graphics::Screen *screen;
|
||||||
|
|
||||||
using graphics::Emote;
|
using graphics::Emote;
|
||||||
@@ -47,7 +49,7 @@ static inline size_t utf8CharLen(uint8_t c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove variation selectors (FE0F) and skin tone modifiers from emoji so they match your labels
|
// Remove variation selectors (FE0F) and skin tone modifiers from emoji so they match your labels
|
||||||
static std::string normalizeEmoji(const std::string &s)
|
std::string normalizeEmoji(const std::string &s)
|
||||||
{
|
{
|
||||||
std::string out;
|
std::string out;
|
||||||
for (size_t i = 0; i < s.size();) {
|
for (size_t i = 0; i < s.size();) {
|
||||||
@@ -80,7 +82,6 @@ uint32_t pauseStart = 0;
|
|||||||
bool waitingToReset = false;
|
bool waitingToReset = false;
|
||||||
bool scrollStarted = false;
|
bool scrollStarted = false;
|
||||||
static bool didReset = false;
|
static bool didReset = false;
|
||||||
static constexpr int MESSAGE_BLOCK_GAP = 6;
|
|
||||||
|
|
||||||
void scrollUp()
|
void scrollUp()
|
||||||
{
|
{
|
||||||
@@ -110,6 +111,22 @@ void scrollDown()
|
|||||||
|
|
||||||
void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string &line, const Emote *emotes, int emoteCount)
|
void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string &line, const Emote *emotes, int emoteCount)
|
||||||
{
|
{
|
||||||
|
std::string renderLine;
|
||||||
|
for (size_t i = 0; i < line.size();) {
|
||||||
|
uint8_t c = (uint8_t)line[i];
|
||||||
|
size_t len = utf8CharLen(c);
|
||||||
|
if (c == 0xEF && i + 2 < line.size() && (uint8_t)line[i + 1] == 0xB8 && (uint8_t)line[i + 2] == 0x8F) {
|
||||||
|
i += 3;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (c == 0xF0 && i + 3 < line.size() && (uint8_t)line[i + 1] == 0x9F && (uint8_t)line[i + 2] == 0x8F &&
|
||||||
|
((uint8_t)line[i + 3] >= 0xBB && (uint8_t)line[i + 3] <= 0xBF)) {
|
||||||
|
i += 4;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
renderLine.append(line, i, len);
|
||||||
|
i += len;
|
||||||
|
}
|
||||||
int cursorX = x;
|
int cursorX = x;
|
||||||
const int fontHeight = FONT_HEIGHT_SMALL;
|
const int fontHeight = FONT_HEIGHT_SMALL;
|
||||||
|
|
||||||
@@ -186,7 +203,8 @@ void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string
|
|||||||
|
|
||||||
// Render the emote (if found)
|
// Render the emote (if found)
|
||||||
if (matchedEmote && i == nextEmotePos) {
|
if (matchedEmote && i == nextEmotePos) {
|
||||||
int iconY = y + (lineHeight - matchedEmote->height) / 2;
|
// Vertically center emote relative to font baseline (not just midline)
|
||||||
|
int iconY = fontY + (fontHeight - matchedEmote->height) / 2;
|
||||||
display->drawXbm(cursorX, iconY, matchedEmote->width, matchedEmote->height, matchedEmote->bitmap);
|
display->drawXbm(cursorX, iconY, matchedEmote->width, matchedEmote->height, matchedEmote->bitmap);
|
||||||
cursorX += matchedEmote->width + 1;
|
cursorX += matchedEmote->width + 1;
|
||||||
i += emojiLen;
|
i += emojiLen;
|
||||||
@@ -405,102 +423,6 @@ static inline int getRenderedLineWidth(OLEDDisplay *display, const std::string &
|
|||||||
return totalWidth;
|
return totalWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct MessageBlock {
|
|
||||||
size_t start;
|
|
||||||
size_t end;
|
|
||||||
bool mine;
|
|
||||||
};
|
|
||||||
|
|
||||||
static int getDrawnLinePixelBottom(int lineTopY, const std::string &line, bool isHeaderLine)
|
|
||||||
{
|
|
||||||
if (isHeaderLine) {
|
|
||||||
return lineTopY + (FONT_HEIGHT_SMALL - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int tallest = FONT_HEIGHT_SMALL;
|
|
||||||
for (int e = 0; e < numEmotes; ++e) {
|
|
||||||
if (line.find(emotes[e].label) != std::string::npos) {
|
|
||||||
if (emotes[e].height > tallest)
|
|
||||||
tallest = emotes[e].height;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const int lineHeight = std::max(FONT_HEIGHT_SMALL, tallest);
|
|
||||||
const int iconTop = lineTopY + (lineHeight - tallest) / 2;
|
|
||||||
|
|
||||||
return iconTop + tallest - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void drawRoundedRectOutline(OLEDDisplay *display, int x, int y, int w, int h, int r)
|
|
||||||
{
|
|
||||||
if (w <= 1 || h <= 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (r < 0)
|
|
||||||
r = 0;
|
|
||||||
|
|
||||||
int maxR = (std::min(w, h) / 2) - 1;
|
|
||||||
if (r > maxR)
|
|
||||||
r = maxR;
|
|
||||||
|
|
||||||
if (r == 0) {
|
|
||||||
display->drawRect(x, y, w, h);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const int x0 = x;
|
|
||||||
const int y0 = y;
|
|
||||||
const int x1 = x + w - 1;
|
|
||||||
const int y1 = y + h - 1;
|
|
||||||
|
|
||||||
// sides
|
|
||||||
if (x0 + r <= x1 - r) {
|
|
||||||
display->drawLine(x0 + r, y0, x1 - r, y0); // top
|
|
||||||
display->drawLine(x0 + r, y1, x1 - r, y1); // bottom
|
|
||||||
}
|
|
||||||
if (y0 + r <= y1 - r) {
|
|
||||||
display->drawLine(x0, y0 + r, x0, y1 - r); // left
|
|
||||||
display->drawLine(x1, y0 + r, x1, y1 - r); // right
|
|
||||||
}
|
|
||||||
|
|
||||||
// corner arcs
|
|
||||||
display->drawCircleQuads(x0 + r, y0 + r, r, 2); // top left
|
|
||||||
display->drawCircleQuads(x1 - r, y0 + r, r, 1); // top right
|
|
||||||
display->drawCircleQuads(x1 - r, y1 - r, r, 8); // bottom right
|
|
||||||
display->drawCircleQuads(x0 + r, y1 - r, r, 4); // bottom left
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::vector<MessageBlock> buildMessageBlocks(const std::vector<bool> &isHeaderVec, const std::vector<bool> &isMineVec)
|
|
||||||
{
|
|
||||||
std::vector<MessageBlock> blocks;
|
|
||||||
if (isHeaderVec.empty())
|
|
||||||
return blocks;
|
|
||||||
|
|
||||||
size_t start = 0;
|
|
||||||
bool mine = isMineVec[0];
|
|
||||||
|
|
||||||
for (size_t i = 1; i < isHeaderVec.size(); ++i) {
|
|
||||||
if (isHeaderVec[i]) {
|
|
||||||
MessageBlock b;
|
|
||||||
b.start = start;
|
|
||||||
b.end = i - 1;
|
|
||||||
b.mine = mine;
|
|
||||||
blocks.push_back(b);
|
|
||||||
|
|
||||||
start = i;
|
|
||||||
mine = isMineVec[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageBlock last;
|
|
||||||
last.start = start;
|
|
||||||
last.end = isHeaderVec.size() - 1;
|
|
||||||
last.mine = mine;
|
|
||||||
blocks.push_back(last);
|
|
||||||
|
|
||||||
return blocks;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void drawMessageScrollbar(OLEDDisplay *display, int visibleHeight, int totalHeight, int scrollOffset, int startY)
|
static void drawMessageScrollbar(OLEDDisplay *display, int visibleHeight, int totalHeight, int scrollOffset, int startY)
|
||||||
{
|
{
|
||||||
if (totalHeight <= visibleHeight)
|
if (totalHeight <= visibleHeight)
|
||||||
@@ -560,14 +482,9 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
constexpr int LEFT_MARGIN = 2;
|
constexpr int LEFT_MARGIN = 2;
|
||||||
constexpr int RIGHT_MARGIN = 2;
|
constexpr int RIGHT_MARGIN = 2;
|
||||||
constexpr int SCROLLBAR_WIDTH = 3;
|
constexpr int SCROLLBAR_WIDTH = 3;
|
||||||
constexpr int BUBBLE_PAD_X = 3;
|
|
||||||
constexpr int BUBBLE_PAD_Y = 4;
|
|
||||||
constexpr int BUBBLE_RADIUS = 4;
|
|
||||||
constexpr int BUBBLE_MIN_W = 24;
|
|
||||||
constexpr int BUBBLE_TEXT_INDENT = 2;
|
|
||||||
|
|
||||||
// Derived widths
|
const int leftTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN;
|
||||||
const int leftTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN - (BUBBLE_PAD_X * 2);
|
|
||||||
const int rightTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN - SCROLLBAR_WIDTH;
|
const int rightTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN - SCROLLBAR_WIDTH;
|
||||||
|
|
||||||
// Title string depending on mode
|
// Title string depending on mode
|
||||||
@@ -630,28 +547,7 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
char chanType[32] = "";
|
char chanType[32] = "";
|
||||||
if (currentMode == ThreadMode::ALL) {
|
if (currentMode == ThreadMode::ALL) {
|
||||||
if (m.dest == NODENUM_BROADCAST) {
|
if (m.dest == NODENUM_BROADCAST) {
|
||||||
const char *name = channels.getName(m.channelIndex);
|
snprintf(chanType, sizeof(chanType), "#%s", channels.getName(m.channelIndex));
|
||||||
if (currentResolution == ScreenResolution::Low || currentResolution == ScreenResolution::UltraLow) {
|
|
||||||
if (strcmp(name, "ShortTurbo") == 0)
|
|
||||||
name = "ShortT";
|
|
||||||
else if (strcmp(name, "ShortSlow") == 0)
|
|
||||||
name = "ShortS";
|
|
||||||
else if (strcmp(name, "ShortFast") == 0)
|
|
||||||
name = "ShortF";
|
|
||||||
else if (strcmp(name, "MediumSlow") == 0)
|
|
||||||
name = "MedS";
|
|
||||||
else if (strcmp(name, "MediumFast") == 0)
|
|
||||||
name = "MedF";
|
|
||||||
else if (strcmp(name, "LongSlow") == 0)
|
|
||||||
name = "LongS";
|
|
||||||
else if (strcmp(name, "LongFast") == 0)
|
|
||||||
name = "LongF";
|
|
||||||
else if (strcmp(name, "LongTurbo") == 0)
|
|
||||||
name = "LongT";
|
|
||||||
else if (strcmp(name, "LongMod") == 0)
|
|
||||||
name = "LongM";
|
|
||||||
}
|
|
||||||
snprintf(chanType, sizeof(chanType), "#%s", name);
|
|
||||||
} else {
|
} else {
|
||||||
snprintf(chanType, sizeof(chanType), "(DM)");
|
snprintf(chanType, sizeof(chanType), "(DM)");
|
||||||
}
|
}
|
||||||
@@ -718,8 +614,8 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Shrink Sender name if needed
|
// Shrink Sender name if needed
|
||||||
int availWidth = (mine ? rightTextWidth : leftTextWidth) - display->getStringWidth(timeBuf) -
|
int availWidth = SCREEN_WIDTH - display->getStringWidth(timeBuf) - display->getStringWidth(chanType) -
|
||||||
display->getStringWidth(chanType) - display->getStringWidth(" @...");
|
display->getStringWidth(" @...") - 10;
|
||||||
if (availWidth < 0)
|
if (availWidth < 0)
|
||||||
availWidth = 0;
|
availWidth = 0;
|
||||||
|
|
||||||
@@ -771,8 +667,6 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
cachedLines = allLines;
|
cachedLines = allLines;
|
||||||
cachedHeights = calculateLineHeights(cachedLines, emotes, isHeader);
|
cachedHeights = calculateLineHeights(cachedLines, emotes, isHeader);
|
||||||
|
|
||||||
std::vector<MessageBlock> blocks = buildMessageBlocks(isHeader, isMine);
|
|
||||||
|
|
||||||
// Scrolling logic (unchanged)
|
// Scrolling logic (unchanged)
|
||||||
int totalHeight = 0;
|
int totalHeight = 0;
|
||||||
for (size_t i = 0; i < cachedHeights.size(); ++i)
|
for (size_t i = 0; i < cachedHeights.size(); ++i)
|
||||||
@@ -820,123 +714,12 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
|
|
||||||
int finalScroll = (int)scrollY;
|
int finalScroll = (int)scrollY;
|
||||||
int yOffset = -finalScroll + getTextPositions(display)[1];
|
int yOffset = -finalScroll + getTextPositions(display)[1];
|
||||||
const int contentTop = getTextPositions(display)[1];
|
|
||||||
const int contentBottom = scrollBottom; // already excludes nav line
|
|
||||||
const int rightEdge = SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN;
|
|
||||||
const int bubbleGapY = std::max(1, MESSAGE_BLOCK_GAP / 2);
|
|
||||||
|
|
||||||
std::vector<int> lineTop;
|
|
||||||
lineTop.resize(cachedLines.size());
|
|
||||||
{
|
|
||||||
int acc = 0;
|
|
||||||
for (size_t i = 0; i < cachedLines.size(); ++i) {
|
|
||||||
lineTop[i] = yOffset + acc;
|
|
||||||
acc += cachedHeights[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw bubbles
|
|
||||||
for (size_t bi = 0; bi < blocks.size(); ++bi) {
|
|
||||||
const auto &b = blocks[bi];
|
|
||||||
if (b.start >= cachedLines.size() || b.end >= cachedLines.size() || b.start > b.end)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
int visualTop = lineTop[b.start];
|
|
||||||
|
|
||||||
int topY;
|
|
||||||
if (isHeader[b.start]) {
|
|
||||||
// Header start
|
|
||||||
constexpr int BUBBLE_PAD_TOP_HEADER = 1; // try 1 or 2
|
|
||||||
topY = visualTop - BUBBLE_PAD_TOP_HEADER;
|
|
||||||
} else {
|
|
||||||
// Body start
|
|
||||||
bool thisLineHasEmote = false;
|
|
||||||
for (int e = 0; e < numEmotes; ++e) {
|
|
||||||
if (cachedLines[b.start].find(emotes[e].label) != std::string::npos) {
|
|
||||||
thisLineHasEmote = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (thisLineHasEmote) {
|
|
||||||
constexpr int EMOTE_PADDING_ABOVE = 4;
|
|
||||||
visualTop -= EMOTE_PADDING_ABOVE;
|
|
||||||
}
|
|
||||||
topY = visualTop - BUBBLE_PAD_Y;
|
|
||||||
}
|
|
||||||
int visualBottom = getDrawnLinePixelBottom(lineTop[b.end], cachedLines[b.end], isHeader[b.end]);
|
|
||||||
int bottomY = visualBottom + BUBBLE_PAD_Y;
|
|
||||||
|
|
||||||
if (bi + 1 < blocks.size()) {
|
|
||||||
int nextHeaderIndex = (int)blocks[bi + 1].start;
|
|
||||||
int nextTop = lineTop[nextHeaderIndex];
|
|
||||||
int maxBottom = nextTop - 1 - bubbleGapY;
|
|
||||||
if (bottomY > maxBottom)
|
|
||||||
bottomY = maxBottom;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bottomY <= topY + 2)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (bottomY < contentTop || topY > contentBottom - 1)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
int maxLineW = 0;
|
|
||||||
|
|
||||||
for (size_t i = b.start; i <= b.end; ++i) {
|
|
||||||
int w = 0;
|
|
||||||
if (isHeader[i]) {
|
|
||||||
w = display->getStringWidth(cachedLines[i].c_str());
|
|
||||||
if (b.mine)
|
|
||||||
w += 12; // room for ACK/NACK/relay mark
|
|
||||||
} else {
|
|
||||||
w = getRenderedLineWidth(display, cachedLines[i], emotes, numEmotes);
|
|
||||||
}
|
|
||||||
if (w > maxLineW)
|
|
||||||
maxLineW = w;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bubbleW = std::max(BUBBLE_MIN_W, maxLineW + (BUBBLE_PAD_X * 2));
|
|
||||||
int bubbleH = (bottomY - topY) + 1;
|
|
||||||
int bubbleX = 0;
|
|
||||||
if (b.mine) {
|
|
||||||
bubbleX = rightEdge - bubbleW;
|
|
||||||
} else {
|
|
||||||
bubbleX = x;
|
|
||||||
}
|
|
||||||
if (bubbleX < x)
|
|
||||||
bubbleX = x;
|
|
||||||
if (bubbleX + bubbleW > rightEdge)
|
|
||||||
bubbleW = std::max(1, rightEdge - bubbleX);
|
|
||||||
|
|
||||||
if (bubbleW > 1 && bubbleH > 1) {
|
|
||||||
int r = BUBBLE_RADIUS;
|
|
||||||
int maxR = (std::min(bubbleW, bubbleH) / 2) - 1;
|
|
||||||
if (maxR < 0)
|
|
||||||
maxR = 0;
|
|
||||||
if (r > maxR)
|
|
||||||
r = maxR;
|
|
||||||
|
|
||||||
drawRoundedRectOutline(display, bubbleX, topY, bubbleW, bubbleH, r);
|
|
||||||
const int extra = 3;
|
|
||||||
const int rr = r + extra;
|
|
||||||
int x1 = bubbleX + bubbleW - 1;
|
|
||||||
int y1 = topY + bubbleH - 1;
|
|
||||||
|
|
||||||
if (!b.mine) {
|
|
||||||
// top-left corner square
|
|
||||||
display->drawLine(bubbleX, topY, bubbleX + rr, topY);
|
|
||||||
display->drawLine(bubbleX, topY, bubbleX, topY + rr);
|
|
||||||
} else {
|
|
||||||
// bottom-right corner square
|
|
||||||
display->drawLine(x1 - rr, y1, x1, y1);
|
|
||||||
display->drawLine(x1, y1 - rr, x1, y1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Render visible lines
|
// Render visible lines
|
||||||
int lineY = yOffset;
|
|
||||||
for (size_t i = 0; i < cachedLines.size(); ++i) {
|
for (size_t i = 0; i < cachedLines.size(); ++i) {
|
||||||
|
int lineY = yOffset;
|
||||||
|
for (size_t j = 0; j < i; ++j)
|
||||||
|
lineY += cachedHeights[j];
|
||||||
|
|
||||||
if (lineY > -cachedHeights[i] && lineY < scrollBottom) {
|
if (lineY > -cachedHeights[i] && lineY < scrollBottom) {
|
||||||
if (isHeader[i]) {
|
if (isHeader[i]) {
|
||||||
@@ -945,28 +728,14 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
int headerX;
|
int headerX;
|
||||||
if (isMine[i]) {
|
if (isMine[i]) {
|
||||||
// push header left to avoid overlap with scrollbar
|
// push header left to avoid overlap with scrollbar
|
||||||
headerX = (SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN) - w - BUBBLE_TEXT_INDENT;
|
headerX = SCREEN_WIDTH - w - SCROLLBAR_WIDTH - RIGHT_MARGIN;
|
||||||
if (headerX < LEFT_MARGIN)
|
if (headerX < LEFT_MARGIN)
|
||||||
headerX = LEFT_MARGIN;
|
headerX = LEFT_MARGIN;
|
||||||
} else {
|
} else {
|
||||||
headerX = x + BUBBLE_PAD_X + BUBBLE_TEXT_INDENT;
|
headerX = x;
|
||||||
}
|
}
|
||||||
display->drawString(headerX, lineY, cachedLines[i].c_str());
|
display->drawString(headerX, lineY, cachedLines[i].c_str());
|
||||||
|
|
||||||
// Draw underline just under header text
|
|
||||||
int underlineY = lineY + FONT_HEIGHT_SMALL;
|
|
||||||
|
|
||||||
int underlineW = w;
|
|
||||||
int maxW = rightEdge - headerX;
|
|
||||||
if (maxW < 0)
|
|
||||||
maxW = 0;
|
|
||||||
if (underlineW > maxW)
|
|
||||||
underlineW = maxW;
|
|
||||||
|
|
||||||
for (int px = 0; px < underlineW; ++px) {
|
|
||||||
display->setPixel(headerX + px, underlineY);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw ACK/NACK mark for our own messages
|
// Draw ACK/NACK mark for our own messages
|
||||||
if (isMine[i]) {
|
if (isMine[i]) {
|
||||||
int markX = headerX - 10;
|
int markX = headerX - 10;
|
||||||
@@ -984,28 +753,32 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
// AckStatus::NONE → show nothing
|
// AckStatus::NONE → show nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Draw underline just under header text
|
||||||
|
int underlineY = lineY + FONT_HEIGHT_SMALL;
|
||||||
|
for (int px = 0; px < w; ++px) {
|
||||||
|
display->setPixel(headerX + px, underlineY);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Render message line
|
// Render message line
|
||||||
if (isMine[i]) {
|
if (isMine[i]) {
|
||||||
// Calculate actual rendered width including emotes
|
// Calculate actual rendered width including emotes
|
||||||
int renderedWidth = getRenderedLineWidth(display, cachedLines[i], emotes, numEmotes);
|
int renderedWidth = getRenderedLineWidth(display, cachedLines[i], emotes, numEmotes);
|
||||||
int rightX = (SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN) - renderedWidth - BUBBLE_TEXT_INDENT;
|
int rightX = SCREEN_WIDTH - renderedWidth - SCROLLBAR_WIDTH - RIGHT_MARGIN;
|
||||||
if (rightX < LEFT_MARGIN)
|
if (rightX < LEFT_MARGIN)
|
||||||
rightX = LEFT_MARGIN;
|
rightX = LEFT_MARGIN;
|
||||||
|
|
||||||
drawStringWithEmotes(display, rightX, lineY, cachedLines[i], emotes, numEmotes);
|
drawStringWithEmotes(display, rightX, lineY, cachedLines[i], emotes, numEmotes);
|
||||||
} else {
|
} else {
|
||||||
drawStringWithEmotes(display, x + BUBBLE_PAD_X + BUBBLE_TEXT_INDENT, lineY, cachedLines[i], emotes,
|
drawStringWithEmotes(display, x, lineY, cachedLines[i], emotes, numEmotes);
|
||||||
numEmotes);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lineY += cachedHeights[i];
|
|
||||||
}
|
}
|
||||||
|
int totalContentHeight = totalHeight;
|
||||||
|
int visibleHeight = usableHeight;
|
||||||
|
|
||||||
// Draw scrollbar
|
// Draw scrollbar
|
||||||
drawMessageScrollbar(display, usableHeight, totalHeight, finalScroll, getTextPositions(display)[1]);
|
drawMessageScrollbar(display, visibleHeight, totalContentHeight, finalScroll, getTextPositions(display)[1]);
|
||||||
graphics::drawCommonHeader(display, x, y, titleStr);
|
graphics::drawCommonHeader(display, x, y, titleStr);
|
||||||
graphics::drawCommonFooter(display, x, y);
|
graphics::drawCommonFooter(display, x, y);
|
||||||
}
|
}
|
||||||
@@ -1068,6 +841,7 @@ std::vector<int> calculateLineHeights(const std::vector<std::string> &lines, con
|
|||||||
constexpr int HEADER_UNDERLINE_GAP = 0; // space between underline and first body line
|
constexpr int HEADER_UNDERLINE_GAP = 0; // space between underline and first body line
|
||||||
constexpr int HEADER_UNDERLINE_PIX = 1; // underline thickness (1px row drawn)
|
constexpr int HEADER_UNDERLINE_PIX = 1; // underline thickness (1px row drawn)
|
||||||
constexpr int BODY_LINE_LEADING = -4; // default vertical leading for normal body lines
|
constexpr int BODY_LINE_LEADING = -4; // default vertical leading for normal body lines
|
||||||
|
constexpr int MESSAGE_BLOCK_GAP = 4; // gap after a message block before a new header
|
||||||
constexpr int EMOTE_PADDING_ABOVE = 4; // space above emote line (added to line above)
|
constexpr int EMOTE_PADDING_ABOVE = 4; // space above emote line (added to line above)
|
||||||
constexpr int EMOTE_PADDING_BELOW = 3; // space below emote line (added to emote line)
|
constexpr int EMOTE_PADDING_BELOW = 3; // space below emote line (added to emote line)
|
||||||
|
|
||||||
@@ -1077,7 +851,6 @@ std::vector<int> calculateLineHeights(const std::vector<std::string> &lines, con
|
|||||||
for (size_t idx = 0; idx < lines.size(); ++idx) {
|
for (size_t idx = 0; idx < lines.size(); ++idx) {
|
||||||
const auto &line = lines[idx];
|
const auto &line = lines[idx];
|
||||||
const int baseHeight = FONT_HEIGHT_SMALL;
|
const int baseHeight = FONT_HEIGHT_SMALL;
|
||||||
int lineHeight = baseHeight;
|
|
||||||
|
|
||||||
// Detect if THIS line or NEXT line contains an emote
|
// Detect if THIS line or NEXT line contains an emote
|
||||||
bool hasEmote = false;
|
bool hasEmote = false;
|
||||||
@@ -1099,6 +872,8 @@ std::vector<int> calculateLineHeights(const std::vector<std::string> &lines, con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int lineHeight = baseHeight;
|
||||||
|
|
||||||
if (isHeaderVec[idx]) {
|
if (isHeaderVec[idx]) {
|
||||||
// Header line spacing
|
// Header line spacing
|
||||||
lineHeight = baseHeight + HEADER_UNDERLINE_PIX + HEADER_UNDERLINE_GAP;
|
lineHeight = baseHeight + HEADER_UNDERLINE_PIX + HEADER_UNDERLINE_GAP;
|
||||||
@@ -1147,7 +922,7 @@ void handleNewMessage(OLEDDisplay *display, const StoredMessage &sm, const mesht
|
|||||||
|
|
||||||
// Banner logic
|
// Banner logic
|
||||||
const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet.from);
|
const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet.from);
|
||||||
char longName[48] = "?";
|
char longName[48] = "???";
|
||||||
if (node && node->user.long_name) {
|
if (node && node->user.long_name) {
|
||||||
strncpy(longName, node->user.long_name, sizeof(longName) - 1);
|
strncpy(longName, node->user.long_name, sizeof(longName) - 1);
|
||||||
longName[sizeof(longName) - 1] = '\0';
|
longName[sizeof(longName) - 1] = '\0';
|
||||||
|
|||||||
@@ -77,9 +77,7 @@ typedef enum _meshtastic_AdminMessage_ModuleConfigType {
|
|||||||
/* TODO: REPLACE */
|
/* TODO: REPLACE */
|
||||||
meshtastic_AdminMessage_ModuleConfigType_DETECTIONSENSOR_CONFIG = 11,
|
meshtastic_AdminMessage_ModuleConfigType_DETECTIONSENSOR_CONFIG = 11,
|
||||||
/* TODO: REPLACE */
|
/* TODO: REPLACE */
|
||||||
meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG = 12,
|
meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG = 12
|
||||||
/* TODO: REPLACE */
|
|
||||||
meshtastic_AdminMessage_ModuleConfigType_STATUSMESSAGE_CONFIG = 13
|
|
||||||
} meshtastic_AdminMessage_ModuleConfigType;
|
} meshtastic_AdminMessage_ModuleConfigType;
|
||||||
|
|
||||||
typedef enum _meshtastic_AdminMessage_BackupLocation {
|
typedef enum _meshtastic_AdminMessage_BackupLocation {
|
||||||
@@ -325,8 +323,8 @@ extern "C" {
|
|||||||
#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG+1))
|
#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG+1))
|
||||||
|
|
||||||
#define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG
|
#define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG
|
||||||
#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_STATUSMESSAGE_CONFIG
|
#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG
|
||||||
#define _meshtastic_AdminMessage_ModuleConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ModuleConfigType)(meshtastic_AdminMessage_ModuleConfigType_STATUSMESSAGE_CONFIG+1))
|
#define _meshtastic_AdminMessage_ModuleConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ModuleConfigType)(meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG+1))
|
||||||
|
|
||||||
#define _meshtastic_AdminMessage_BackupLocation_MIN meshtastic_AdminMessage_BackupLocation_FLASH
|
#define _meshtastic_AdminMessage_BackupLocation_MIN meshtastic_AdminMessage_BackupLocation_FLASH
|
||||||
#define _meshtastic_AdminMessage_BackupLocation_MAX meshtastic_AdminMessage_BackupLocation_SD
|
#define _meshtastic_AdminMessage_BackupLocation_MAX meshtastic_AdminMessage_BackupLocation_SD
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ extern const pb_msgdesc_t meshtastic_BackupPreferences_msg;
|
|||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
/* meshtastic_NodeDatabase_size depends on runtime parameters */
|
/* meshtastic_NodeDatabase_size depends on runtime parameters */
|
||||||
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_BackupPreferences_size
|
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_BackupPreferences_size
|
||||||
#define meshtastic_BackupPreferences_size 2362
|
#define meshtastic_BackupPreferences_size 2279
|
||||||
#define meshtastic_ChannelFile_size 718
|
#define meshtastic_ChannelFile_size 718
|
||||||
#define meshtastic_DeviceState_size 1737
|
#define meshtastic_DeviceState_size 1737
|
||||||
#define meshtastic_NodeInfoLite_size 196
|
#define meshtastic_NodeInfoLite_size 196
|
||||||
|
|||||||
@@ -87,9 +87,6 @@ typedef struct _meshtastic_LocalModuleConfig {
|
|||||||
/* Paxcounter Config */
|
/* Paxcounter Config */
|
||||||
bool has_paxcounter;
|
bool has_paxcounter;
|
||||||
meshtastic_ModuleConfig_PaxcounterConfig paxcounter;
|
meshtastic_ModuleConfig_PaxcounterConfig paxcounter;
|
||||||
/* StatusMessage Config */
|
|
||||||
bool has_statusmessage;
|
|
||||||
meshtastic_ModuleConfig_StatusMessageConfig statusmessage;
|
|
||||||
} meshtastic_LocalModuleConfig;
|
} meshtastic_LocalModuleConfig;
|
||||||
|
|
||||||
|
|
||||||
@@ -99,9 +96,9 @@ extern "C" {
|
|||||||
|
|
||||||
/* Initializer values for message structs */
|
/* Initializer values for message structs */
|
||||||
#define meshtastic_LocalConfig_init_default {false, meshtastic_Config_DeviceConfig_init_default, false, meshtastic_Config_PositionConfig_init_default, false, meshtastic_Config_PowerConfig_init_default, false, meshtastic_Config_NetworkConfig_init_default, false, meshtastic_Config_DisplayConfig_init_default, false, meshtastic_Config_LoRaConfig_init_default, false, meshtastic_Config_BluetoothConfig_init_default, 0, false, meshtastic_Config_SecurityConfig_init_default}
|
#define meshtastic_LocalConfig_init_default {false, meshtastic_Config_DeviceConfig_init_default, false, meshtastic_Config_PositionConfig_init_default, false, meshtastic_Config_PowerConfig_init_default, false, meshtastic_Config_NetworkConfig_init_default, false, meshtastic_Config_DisplayConfig_init_default, false, meshtastic_Config_LoRaConfig_init_default, false, meshtastic_Config_BluetoothConfig_init_default, 0, false, meshtastic_Config_SecurityConfig_init_default}
|
||||||
#define meshtastic_LocalModuleConfig_init_default {false, meshtastic_ModuleConfig_MQTTConfig_init_default, false, meshtastic_ModuleConfig_SerialConfig_init_default, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_default, false, meshtastic_ModuleConfig_StoreForwardConfig_init_default, false, meshtastic_ModuleConfig_RangeTestConfig_init_default, false, meshtastic_ModuleConfig_TelemetryConfig_init_default, false, meshtastic_ModuleConfig_CannedMessageConfig_init_default, 0, false, meshtastic_ModuleConfig_AudioConfig_init_default, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_default, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_default, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_default, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_default, false, meshtastic_ModuleConfig_PaxcounterConfig_init_default, false, meshtastic_ModuleConfig_StatusMessageConfig_init_default}
|
#define meshtastic_LocalModuleConfig_init_default {false, meshtastic_ModuleConfig_MQTTConfig_init_default, false, meshtastic_ModuleConfig_SerialConfig_init_default, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_default, false, meshtastic_ModuleConfig_StoreForwardConfig_init_default, false, meshtastic_ModuleConfig_RangeTestConfig_init_default, false, meshtastic_ModuleConfig_TelemetryConfig_init_default, false, meshtastic_ModuleConfig_CannedMessageConfig_init_default, 0, false, meshtastic_ModuleConfig_AudioConfig_init_default, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_default, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_default, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_default, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_default, false, meshtastic_ModuleConfig_PaxcounterConfig_init_default}
|
||||||
#define meshtastic_LocalConfig_init_zero {false, meshtastic_Config_DeviceConfig_init_zero, false, meshtastic_Config_PositionConfig_init_zero, false, meshtastic_Config_PowerConfig_init_zero, false, meshtastic_Config_NetworkConfig_init_zero, false, meshtastic_Config_DisplayConfig_init_zero, false, meshtastic_Config_LoRaConfig_init_zero, false, meshtastic_Config_BluetoothConfig_init_zero, 0, false, meshtastic_Config_SecurityConfig_init_zero}
|
#define meshtastic_LocalConfig_init_zero {false, meshtastic_Config_DeviceConfig_init_zero, false, meshtastic_Config_PositionConfig_init_zero, false, meshtastic_Config_PowerConfig_init_zero, false, meshtastic_Config_NetworkConfig_init_zero, false, meshtastic_Config_DisplayConfig_init_zero, false, meshtastic_Config_LoRaConfig_init_zero, false, meshtastic_Config_BluetoothConfig_init_zero, 0, false, meshtastic_Config_SecurityConfig_init_zero}
|
||||||
#define meshtastic_LocalModuleConfig_init_zero {false, meshtastic_ModuleConfig_MQTTConfig_init_zero, false, meshtastic_ModuleConfig_SerialConfig_init_zero, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero, false, meshtastic_ModuleConfig_StoreForwardConfig_init_zero, false, meshtastic_ModuleConfig_RangeTestConfig_init_zero, false, meshtastic_ModuleConfig_TelemetryConfig_init_zero, false, meshtastic_ModuleConfig_CannedMessageConfig_init_zero, 0, false, meshtastic_ModuleConfig_AudioConfig_init_zero, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_zero, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_zero, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_zero, false, meshtastic_ModuleConfig_PaxcounterConfig_init_zero, false, meshtastic_ModuleConfig_StatusMessageConfig_init_zero}
|
#define meshtastic_LocalModuleConfig_init_zero {false, meshtastic_ModuleConfig_MQTTConfig_init_zero, false, meshtastic_ModuleConfig_SerialConfig_init_zero, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero, false, meshtastic_ModuleConfig_StoreForwardConfig_init_zero, false, meshtastic_ModuleConfig_RangeTestConfig_init_zero, false, meshtastic_ModuleConfig_TelemetryConfig_init_zero, false, meshtastic_ModuleConfig_CannedMessageConfig_init_zero, 0, false, meshtastic_ModuleConfig_AudioConfig_init_zero, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_zero, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_zero, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_zero, false, meshtastic_ModuleConfig_PaxcounterConfig_init_zero}
|
||||||
|
|
||||||
/* Field tags (for use in manual encoding/decoding) */
|
/* Field tags (for use in manual encoding/decoding) */
|
||||||
#define meshtastic_LocalConfig_device_tag 1
|
#define meshtastic_LocalConfig_device_tag 1
|
||||||
@@ -127,7 +124,6 @@ extern "C" {
|
|||||||
#define meshtastic_LocalModuleConfig_ambient_lighting_tag 12
|
#define meshtastic_LocalModuleConfig_ambient_lighting_tag 12
|
||||||
#define meshtastic_LocalModuleConfig_detection_sensor_tag 13
|
#define meshtastic_LocalModuleConfig_detection_sensor_tag 13
|
||||||
#define meshtastic_LocalModuleConfig_paxcounter_tag 14
|
#define meshtastic_LocalModuleConfig_paxcounter_tag 14
|
||||||
#define meshtastic_LocalModuleConfig_statusmessage_tag 15
|
|
||||||
|
|
||||||
/* Struct field encoding specification for nanopb */
|
/* Struct field encoding specification for nanopb */
|
||||||
#define meshtastic_LocalConfig_FIELDLIST(X, a) \
|
#define meshtastic_LocalConfig_FIELDLIST(X, a) \
|
||||||
@@ -165,8 +161,7 @@ X(a, STATIC, OPTIONAL, MESSAGE, remote_hardware, 10) \
|
|||||||
X(a, STATIC, OPTIONAL, MESSAGE, neighbor_info, 11) \
|
X(a, STATIC, OPTIONAL, MESSAGE, neighbor_info, 11) \
|
||||||
X(a, STATIC, OPTIONAL, MESSAGE, ambient_lighting, 12) \
|
X(a, STATIC, OPTIONAL, MESSAGE, ambient_lighting, 12) \
|
||||||
X(a, STATIC, OPTIONAL, MESSAGE, detection_sensor, 13) \
|
X(a, STATIC, OPTIONAL, MESSAGE, detection_sensor, 13) \
|
||||||
X(a, STATIC, OPTIONAL, MESSAGE, paxcounter, 14) \
|
X(a, STATIC, OPTIONAL, MESSAGE, paxcounter, 14)
|
||||||
X(a, STATIC, OPTIONAL, MESSAGE, statusmessage, 15)
|
|
||||||
#define meshtastic_LocalModuleConfig_CALLBACK NULL
|
#define meshtastic_LocalModuleConfig_CALLBACK NULL
|
||||||
#define meshtastic_LocalModuleConfig_DEFAULT NULL
|
#define meshtastic_LocalModuleConfig_DEFAULT NULL
|
||||||
#define meshtastic_LocalModuleConfig_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig
|
#define meshtastic_LocalModuleConfig_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig
|
||||||
@@ -182,7 +177,6 @@ X(a, STATIC, OPTIONAL, MESSAGE, statusmessage, 15)
|
|||||||
#define meshtastic_LocalModuleConfig_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig
|
#define meshtastic_LocalModuleConfig_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig
|
||||||
#define meshtastic_LocalModuleConfig_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig
|
#define meshtastic_LocalModuleConfig_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig
|
||||||
#define meshtastic_LocalModuleConfig_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig
|
#define meshtastic_LocalModuleConfig_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig
|
||||||
#define meshtastic_LocalModuleConfig_statusmessage_MSGTYPE meshtastic_ModuleConfig_StatusMessageConfig
|
|
||||||
|
|
||||||
extern const pb_msgdesc_t meshtastic_LocalConfig_msg;
|
extern const pb_msgdesc_t meshtastic_LocalConfig_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
||||||
@@ -192,9 +186,9 @@ extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
|||||||
#define meshtastic_LocalModuleConfig_fields &meshtastic_LocalModuleConfig_msg
|
#define meshtastic_LocalModuleConfig_fields &meshtastic_LocalModuleConfig_msg
|
||||||
|
|
||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalModuleConfig_size
|
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalConfig_size
|
||||||
#define meshtastic_LocalConfig_size 749
|
#define meshtastic_LocalConfig_size 749
|
||||||
#define meshtastic_LocalModuleConfig_size 758
|
#define meshtastic_LocalModuleConfig_size 675
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ PB_BIND(meshtastic_StoreForwardPlusPlus, meshtastic_StoreForwardPlusPlus, 2)
|
|||||||
PB_BIND(meshtastic_Waypoint, meshtastic_Waypoint, AUTO)
|
PB_BIND(meshtastic_Waypoint, meshtastic_Waypoint, AUTO)
|
||||||
|
|
||||||
|
|
||||||
PB_BIND(meshtastic_StatusMessage, meshtastic_StatusMessage, AUTO)
|
|
||||||
|
|
||||||
|
|
||||||
PB_BIND(meshtastic_MqttClientProxyMessage, meshtastic_MqttClientProxyMessage, 2)
|
PB_BIND(meshtastic_MqttClientProxyMessage, meshtastic_MqttClientProxyMessage, 2)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -858,11 +858,6 @@ typedef struct _meshtastic_Waypoint {
|
|||||||
uint32_t icon;
|
uint32_t icon;
|
||||||
} meshtastic_Waypoint;
|
} meshtastic_Waypoint;
|
||||||
|
|
||||||
/* Message for node status */
|
|
||||||
typedef struct _meshtastic_StatusMessage {
|
|
||||||
char status[80];
|
|
||||||
} meshtastic_StatusMessage;
|
|
||||||
|
|
||||||
typedef PB_BYTES_ARRAY_T(435) meshtastic_MqttClientProxyMessage_data_t;
|
typedef PB_BYTES_ARRAY_T(435) meshtastic_MqttClientProxyMessage_data_t;
|
||||||
/* This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server */
|
/* This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server */
|
||||||
typedef struct _meshtastic_MqttClientProxyMessage {
|
typedef struct _meshtastic_MqttClientProxyMessage {
|
||||||
@@ -1407,7 +1402,6 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define meshtastic_MeshPacket_priority_ENUMTYPE meshtastic_MeshPacket_Priority
|
#define meshtastic_MeshPacket_priority_ENUMTYPE meshtastic_MeshPacket_Priority
|
||||||
#define meshtastic_MeshPacket_delayed_ENUMTYPE meshtastic_MeshPacket_Delayed
|
#define meshtastic_MeshPacket_delayed_ENUMTYPE meshtastic_MeshPacket_Delayed
|
||||||
#define meshtastic_MeshPacket_transport_mechanism_ENUMTYPE meshtastic_MeshPacket_TransportMechanism
|
#define meshtastic_MeshPacket_transport_mechanism_ENUMTYPE meshtastic_MeshPacket_TransportMechanism
|
||||||
@@ -1450,7 +1444,6 @@ extern "C" {
|
|||||||
#define meshtastic_KeyVerification_init_default {0, {0, {0}}, {0, {0}}}
|
#define meshtastic_KeyVerification_init_default {0, {0, {0}}, {0, {0}}}
|
||||||
#define meshtastic_StoreForwardPlusPlus_init_default {_meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}
|
#define meshtastic_StoreForwardPlusPlus_init_default {_meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||||
#define meshtastic_StatusMessage_init_default {""}
|
|
||||||
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
||||||
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0, _meshtastic_MeshPacket_TransportMechanism_MIN}
|
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0, _meshtastic_MeshPacket_TransportMechanism_MIN}
|
||||||
#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0, 0, 0}
|
#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0, 0, 0}
|
||||||
@@ -1483,7 +1476,6 @@ extern "C" {
|
|||||||
#define meshtastic_KeyVerification_init_zero {0, {0, {0}}, {0, {0}}}
|
#define meshtastic_KeyVerification_init_zero {0, {0, {0}}, {0, {0}}}
|
||||||
#define meshtastic_StoreForwardPlusPlus_init_zero {_meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}
|
#define meshtastic_StoreForwardPlusPlus_init_zero {_meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||||
#define meshtastic_StatusMessage_init_zero {""}
|
|
||||||
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
||||||
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0, _meshtastic_MeshPacket_TransportMechanism_MIN}
|
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0, _meshtastic_MeshPacket_TransportMechanism_MIN}
|
||||||
#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0, 0, 0}
|
#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0, 0, 0}
|
||||||
@@ -1579,7 +1571,6 @@ extern "C" {
|
|||||||
#define meshtastic_Waypoint_name_tag 6
|
#define meshtastic_Waypoint_name_tag 6
|
||||||
#define meshtastic_Waypoint_description_tag 7
|
#define meshtastic_Waypoint_description_tag 7
|
||||||
#define meshtastic_Waypoint_icon_tag 8
|
#define meshtastic_Waypoint_icon_tag 8
|
||||||
#define meshtastic_StatusMessage_status_tag 1
|
|
||||||
#define meshtastic_MqttClientProxyMessage_topic_tag 1
|
#define meshtastic_MqttClientProxyMessage_topic_tag 1
|
||||||
#define meshtastic_MqttClientProxyMessage_data_tag 2
|
#define meshtastic_MqttClientProxyMessage_data_tag 2
|
||||||
#define meshtastic_MqttClientProxyMessage_text_tag 3
|
#define meshtastic_MqttClientProxyMessage_text_tag 3
|
||||||
@@ -1815,11 +1806,6 @@ X(a, STATIC, SINGULAR, FIXED32, icon, 8)
|
|||||||
#define meshtastic_Waypoint_CALLBACK NULL
|
#define meshtastic_Waypoint_CALLBACK NULL
|
||||||
#define meshtastic_Waypoint_DEFAULT NULL
|
#define meshtastic_Waypoint_DEFAULT NULL
|
||||||
|
|
||||||
#define meshtastic_StatusMessage_FIELDLIST(X, a) \
|
|
||||||
X(a, STATIC, SINGULAR, STRING, status, 1)
|
|
||||||
#define meshtastic_StatusMessage_CALLBACK NULL
|
|
||||||
#define meshtastic_StatusMessage_DEFAULT NULL
|
|
||||||
|
|
||||||
#define meshtastic_MqttClientProxyMessage_FIELDLIST(X, a) \
|
#define meshtastic_MqttClientProxyMessage_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, STRING, topic, 1) \
|
X(a, STATIC, SINGULAR, STRING, topic, 1) \
|
||||||
X(a, STATIC, ONEOF, BYTES, (payload_variant,data,payload_variant.data), 2) \
|
X(a, STATIC, ONEOF, BYTES, (payload_variant,data,payload_variant.data), 2) \
|
||||||
@@ -2086,7 +2072,6 @@ extern const pb_msgdesc_t meshtastic_Data_msg;
|
|||||||
extern const pb_msgdesc_t meshtastic_KeyVerification_msg;
|
extern const pb_msgdesc_t meshtastic_KeyVerification_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_StoreForwardPlusPlus_msg;
|
extern const pb_msgdesc_t meshtastic_StoreForwardPlusPlus_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Waypoint_msg;
|
extern const pb_msgdesc_t meshtastic_Waypoint_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_StatusMessage_msg;
|
|
||||||
extern const pb_msgdesc_t meshtastic_MqttClientProxyMessage_msg;
|
extern const pb_msgdesc_t meshtastic_MqttClientProxyMessage_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_MeshPacket_msg;
|
extern const pb_msgdesc_t meshtastic_MeshPacket_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_NodeInfo_msg;
|
extern const pb_msgdesc_t meshtastic_NodeInfo_msg;
|
||||||
@@ -2121,7 +2106,6 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||||||
#define meshtastic_KeyVerification_fields &meshtastic_KeyVerification_msg
|
#define meshtastic_KeyVerification_fields &meshtastic_KeyVerification_msg
|
||||||
#define meshtastic_StoreForwardPlusPlus_fields &meshtastic_StoreForwardPlusPlus_msg
|
#define meshtastic_StoreForwardPlusPlus_fields &meshtastic_StoreForwardPlusPlus_msg
|
||||||
#define meshtastic_Waypoint_fields &meshtastic_Waypoint_msg
|
#define meshtastic_Waypoint_fields &meshtastic_Waypoint_msg
|
||||||
#define meshtastic_StatusMessage_fields &meshtastic_StatusMessage_msg
|
|
||||||
#define meshtastic_MqttClientProxyMessage_fields &meshtastic_MqttClientProxyMessage_msg
|
#define meshtastic_MqttClientProxyMessage_fields &meshtastic_MqttClientProxyMessage_msg
|
||||||
#define meshtastic_MeshPacket_fields &meshtastic_MeshPacket_msg
|
#define meshtastic_MeshPacket_fields &meshtastic_MeshPacket_msg
|
||||||
#define meshtastic_NodeInfo_fields &meshtastic_NodeInfo_msg
|
#define meshtastic_NodeInfo_fields &meshtastic_NodeInfo_msg
|
||||||
@@ -2177,7 +2161,6 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||||||
#define meshtastic_QueueStatus_size 23
|
#define meshtastic_QueueStatus_size 23
|
||||||
#define meshtastic_RouteDiscovery_size 256
|
#define meshtastic_RouteDiscovery_size 256
|
||||||
#define meshtastic_Routing_size 259
|
#define meshtastic_Routing_size 259
|
||||||
#define meshtastic_StatusMessage_size 81
|
|
||||||
#define meshtastic_StoreForwardPlusPlus_size 377
|
#define meshtastic_StoreForwardPlusPlus_size 377
|
||||||
#define meshtastic_ToRadio_size 504
|
#define meshtastic_ToRadio_size 504
|
||||||
#define meshtastic_User_size 115
|
#define meshtastic_User_size 115
|
||||||
|
|||||||
@@ -51,9 +51,6 @@ PB_BIND(meshtastic_ModuleConfig_CannedMessageConfig, meshtastic_ModuleConfig_Can
|
|||||||
PB_BIND(meshtastic_ModuleConfig_AmbientLightingConfig, meshtastic_ModuleConfig_AmbientLightingConfig, AUTO)
|
PB_BIND(meshtastic_ModuleConfig_AmbientLightingConfig, meshtastic_ModuleConfig_AmbientLightingConfig, AUTO)
|
||||||
|
|
||||||
|
|
||||||
PB_BIND(meshtastic_ModuleConfig_StatusMessageConfig, meshtastic_ModuleConfig_StatusMessageConfig, AUTO)
|
|
||||||
|
|
||||||
|
|
||||||
PB_BIND(meshtastic_RemoteHardwarePin, meshtastic_RemoteHardwarePin, AUTO)
|
PB_BIND(meshtastic_RemoteHardwarePin, meshtastic_RemoteHardwarePin, AUTO)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -409,12 +409,6 @@ typedef struct _meshtastic_ModuleConfig_AmbientLightingConfig {
|
|||||||
uint8_t blue;
|
uint8_t blue;
|
||||||
} meshtastic_ModuleConfig_AmbientLightingConfig;
|
} meshtastic_ModuleConfig_AmbientLightingConfig;
|
||||||
|
|
||||||
/* StatusMessage config - Allows setting a status message for a node to periodically rebroadcast */
|
|
||||||
typedef struct _meshtastic_ModuleConfig_StatusMessageConfig {
|
|
||||||
/* The actual status string */
|
|
||||||
char node_status[80];
|
|
||||||
} meshtastic_ModuleConfig_StatusMessageConfig;
|
|
||||||
|
|
||||||
/* A GPIO pin definition for remote hardware module */
|
/* A GPIO pin definition for remote hardware module */
|
||||||
typedef struct _meshtastic_RemoteHardwarePin {
|
typedef struct _meshtastic_RemoteHardwarePin {
|
||||||
/* GPIO Pin number (must match Arduino) */
|
/* GPIO Pin number (must match Arduino) */
|
||||||
@@ -466,8 +460,6 @@ typedef struct _meshtastic_ModuleConfig {
|
|||||||
meshtastic_ModuleConfig_DetectionSensorConfig detection_sensor;
|
meshtastic_ModuleConfig_DetectionSensorConfig detection_sensor;
|
||||||
/* TODO: REPLACE */
|
/* TODO: REPLACE */
|
||||||
meshtastic_ModuleConfig_PaxcounterConfig paxcounter;
|
meshtastic_ModuleConfig_PaxcounterConfig paxcounter;
|
||||||
/* TODO: REPLACE */
|
|
||||||
meshtastic_ModuleConfig_StatusMessageConfig statusmessage;
|
|
||||||
} payload_variant;
|
} payload_variant;
|
||||||
} meshtastic_ModuleConfig;
|
} meshtastic_ModuleConfig;
|
||||||
|
|
||||||
@@ -523,7 +515,6 @@ extern "C" {
|
|||||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_press_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar
|
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_press_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define meshtastic_RemoteHardwarePin_type_ENUMTYPE meshtastic_RemoteHardwarePinType
|
#define meshtastic_RemoteHardwarePin_type_ENUMTYPE meshtastic_RemoteHardwarePinType
|
||||||
|
|
||||||
|
|
||||||
@@ -543,7 +534,6 @@ extern "C" {
|
|||||||
#define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_ModuleConfig_CannedMessageConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0}
|
#define meshtastic_ModuleConfig_CannedMessageConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0}
|
||||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_init_default {0, 0, 0, 0, 0}
|
#define meshtastic_ModuleConfig_AmbientLightingConfig_init_default {0, 0, 0, 0, 0}
|
||||||
#define meshtastic_ModuleConfig_StatusMessageConfig_init_default {""}
|
|
||||||
#define meshtastic_RemoteHardwarePin_init_default {0, "", _meshtastic_RemoteHardwarePinType_MIN}
|
#define meshtastic_RemoteHardwarePin_init_default {0, "", _meshtastic_RemoteHardwarePinType_MIN}
|
||||||
#define meshtastic_ModuleConfig_init_zero {0, {meshtastic_ModuleConfig_MQTTConfig_init_zero}}
|
#define meshtastic_ModuleConfig_init_zero {0, {meshtastic_ModuleConfig_MQTTConfig_init_zero}}
|
||||||
#define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_zero}
|
#define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_zero}
|
||||||
@@ -560,7 +550,6 @@ extern "C" {
|
|||||||
#define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_ModuleConfig_CannedMessageConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0}
|
#define meshtastic_ModuleConfig_CannedMessageConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0}
|
||||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_init_zero {0, 0, 0, 0, 0}
|
#define meshtastic_ModuleConfig_AmbientLightingConfig_init_zero {0, 0, 0, 0, 0}
|
||||||
#define meshtastic_ModuleConfig_StatusMessageConfig_init_zero {""}
|
|
||||||
#define meshtastic_RemoteHardwarePin_init_zero {0, "", _meshtastic_RemoteHardwarePinType_MIN}
|
#define meshtastic_RemoteHardwarePin_init_zero {0, "", _meshtastic_RemoteHardwarePinType_MIN}
|
||||||
|
|
||||||
/* Field tags (for use in manual encoding/decoding) */
|
/* Field tags (for use in manual encoding/decoding) */
|
||||||
@@ -664,7 +653,6 @@ extern "C" {
|
|||||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_red_tag 3
|
#define meshtastic_ModuleConfig_AmbientLightingConfig_red_tag 3
|
||||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_green_tag 4
|
#define meshtastic_ModuleConfig_AmbientLightingConfig_green_tag 4
|
||||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_blue_tag 5
|
#define meshtastic_ModuleConfig_AmbientLightingConfig_blue_tag 5
|
||||||
#define meshtastic_ModuleConfig_StatusMessageConfig_node_status_tag 1
|
|
||||||
#define meshtastic_RemoteHardwarePin_gpio_pin_tag 1
|
#define meshtastic_RemoteHardwarePin_gpio_pin_tag 1
|
||||||
#define meshtastic_RemoteHardwarePin_name_tag 2
|
#define meshtastic_RemoteHardwarePin_name_tag 2
|
||||||
#define meshtastic_RemoteHardwarePin_type_tag 3
|
#define meshtastic_RemoteHardwarePin_type_tag 3
|
||||||
@@ -684,7 +672,6 @@ extern "C" {
|
|||||||
#define meshtastic_ModuleConfig_ambient_lighting_tag 11
|
#define meshtastic_ModuleConfig_ambient_lighting_tag 11
|
||||||
#define meshtastic_ModuleConfig_detection_sensor_tag 12
|
#define meshtastic_ModuleConfig_detection_sensor_tag 12
|
||||||
#define meshtastic_ModuleConfig_paxcounter_tag 13
|
#define meshtastic_ModuleConfig_paxcounter_tag 13
|
||||||
#define meshtastic_ModuleConfig_statusmessage_tag 14
|
|
||||||
|
|
||||||
/* Struct field encoding specification for nanopb */
|
/* Struct field encoding specification for nanopb */
|
||||||
#define meshtastic_ModuleConfig_FIELDLIST(X, a) \
|
#define meshtastic_ModuleConfig_FIELDLIST(X, a) \
|
||||||
@@ -700,8 +687,7 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,remote_hardware,payload_vari
|
|||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,neighbor_info,payload_variant.neighbor_info), 10) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,neighbor_info,payload_variant.neighbor_info), 10) \
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,ambient_lighting,payload_variant.ambient_lighting), 11) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,ambient_lighting,payload_variant.ambient_lighting), 11) \
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,detection_sensor,payload_variant.detection_sensor), 12) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,detection_sensor,payload_variant.detection_sensor), 12) \
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,paxcounter,payload_variant.paxcounter), 13) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,paxcounter,payload_variant.paxcounter), 13)
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,statusmessage,payload_variant.statusmessage), 14)
|
|
||||||
#define meshtastic_ModuleConfig_CALLBACK NULL
|
#define meshtastic_ModuleConfig_CALLBACK NULL
|
||||||
#define meshtastic_ModuleConfig_DEFAULT NULL
|
#define meshtastic_ModuleConfig_DEFAULT NULL
|
||||||
#define meshtastic_ModuleConfig_payload_variant_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig
|
#define meshtastic_ModuleConfig_payload_variant_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig
|
||||||
@@ -717,7 +703,6 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,statusmessage,payload_varian
|
|||||||
#define meshtastic_ModuleConfig_payload_variant_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig
|
#define meshtastic_ModuleConfig_payload_variant_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig
|
||||||
#define meshtastic_ModuleConfig_payload_variant_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig
|
#define meshtastic_ModuleConfig_payload_variant_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig
|
||||||
#define meshtastic_ModuleConfig_payload_variant_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig
|
#define meshtastic_ModuleConfig_payload_variant_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig
|
||||||
#define meshtastic_ModuleConfig_payload_variant_statusmessage_MSGTYPE meshtastic_ModuleConfig_StatusMessageConfig
|
|
||||||
|
|
||||||
#define meshtastic_ModuleConfig_MQTTConfig_FIELDLIST(X, a) \
|
#define meshtastic_ModuleConfig_MQTTConfig_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||||
@@ -880,11 +865,6 @@ X(a, STATIC, SINGULAR, UINT32, blue, 5)
|
|||||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_CALLBACK NULL
|
#define meshtastic_ModuleConfig_AmbientLightingConfig_CALLBACK NULL
|
||||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_DEFAULT NULL
|
#define meshtastic_ModuleConfig_AmbientLightingConfig_DEFAULT NULL
|
||||||
|
|
||||||
#define meshtastic_ModuleConfig_StatusMessageConfig_FIELDLIST(X, a) \
|
|
||||||
X(a, STATIC, SINGULAR, STRING, node_status, 1)
|
|
||||||
#define meshtastic_ModuleConfig_StatusMessageConfig_CALLBACK NULL
|
|
||||||
#define meshtastic_ModuleConfig_StatusMessageConfig_DEFAULT NULL
|
|
||||||
|
|
||||||
#define meshtastic_RemoteHardwarePin_FIELDLIST(X, a) \
|
#define meshtastic_RemoteHardwarePin_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, gpio_pin, 1) \
|
X(a, STATIC, SINGULAR, UINT32, gpio_pin, 1) \
|
||||||
X(a, STATIC, SINGULAR, STRING, name, 2) \
|
X(a, STATIC, SINGULAR, STRING, name, 2) \
|
||||||
@@ -907,7 +887,6 @@ extern const pb_msgdesc_t meshtastic_ModuleConfig_RangeTestConfig_msg;
|
|||||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_TelemetryConfig_msg;
|
extern const pb_msgdesc_t meshtastic_ModuleConfig_TelemetryConfig_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_CannedMessageConfig_msg;
|
extern const pb_msgdesc_t meshtastic_ModuleConfig_CannedMessageConfig_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_AmbientLightingConfig_msg;
|
extern const pb_msgdesc_t meshtastic_ModuleConfig_AmbientLightingConfig_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_StatusMessageConfig_msg;
|
|
||||||
extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
||||||
|
|
||||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||||
@@ -926,7 +905,6 @@ extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
|||||||
#define meshtastic_ModuleConfig_TelemetryConfig_fields &meshtastic_ModuleConfig_TelemetryConfig_msg
|
#define meshtastic_ModuleConfig_TelemetryConfig_fields &meshtastic_ModuleConfig_TelemetryConfig_msg
|
||||||
#define meshtastic_ModuleConfig_CannedMessageConfig_fields &meshtastic_ModuleConfig_CannedMessageConfig_msg
|
#define meshtastic_ModuleConfig_CannedMessageConfig_fields &meshtastic_ModuleConfig_CannedMessageConfig_msg
|
||||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_fields &meshtastic_ModuleConfig_AmbientLightingConfig_msg
|
#define meshtastic_ModuleConfig_AmbientLightingConfig_fields &meshtastic_ModuleConfig_AmbientLightingConfig_msg
|
||||||
#define meshtastic_ModuleConfig_StatusMessageConfig_fields &meshtastic_ModuleConfig_StatusMessageConfig_msg
|
|
||||||
#define meshtastic_RemoteHardwarePin_fields &meshtastic_RemoteHardwarePin_msg
|
#define meshtastic_RemoteHardwarePin_fields &meshtastic_RemoteHardwarePin_msg
|
||||||
|
|
||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
@@ -943,7 +921,6 @@ extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
|||||||
#define meshtastic_ModuleConfig_RangeTestConfig_size 12
|
#define meshtastic_ModuleConfig_RangeTestConfig_size 12
|
||||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96
|
#define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96
|
||||||
#define meshtastic_ModuleConfig_SerialConfig_size 28
|
#define meshtastic_ModuleConfig_SerialConfig_size 28
|
||||||
#define meshtastic_ModuleConfig_StatusMessageConfig_size 81
|
|
||||||
#define meshtastic_ModuleConfig_StoreForwardConfig_size 24
|
#define meshtastic_ModuleConfig_StoreForwardConfig_size 24
|
||||||
#define meshtastic_ModuleConfig_TelemetryConfig_size 50
|
#define meshtastic_ModuleConfig_TelemetryConfig_size 50
|
||||||
#define meshtastic_ModuleConfig_size 227
|
#define meshtastic_ModuleConfig_size 227
|
||||||
|
|||||||
@@ -91,11 +91,6 @@ typedef enum _meshtastic_PortNum {
|
|||||||
This module is specifically for Native Linux nodes, and provides a Git-style
|
This module is specifically for Native Linux nodes, and provides a Git-style
|
||||||
chain of messages. */
|
chain of messages. */
|
||||||
meshtastic_PortNum_STORE_FORWARD_PLUSPLUS_APP = 35,
|
meshtastic_PortNum_STORE_FORWARD_PLUSPLUS_APP = 35,
|
||||||
/* Node Status module
|
|
||||||
ENCODING: protobuf
|
|
||||||
This module allows setting an extra string of status for a node.
|
|
||||||
Broadcasts on change and on a timer, possibly once a day. */
|
|
||||||
meshtastic_PortNum_NODE_STATUS_APP = 36,
|
|
||||||
/* Provides a hardware serial interface to send and receive from the Meshtastic network.
|
/* Provides a hardware serial interface to send and receive from the Meshtastic network.
|
||||||
Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic
|
Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic
|
||||||
network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network.
|
network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network.
|
||||||
|
|||||||
@@ -361,8 +361,6 @@ typedef struct _meshtastic_LocalStats {
|
|||||||
uint32_t heap_free_bytes;
|
uint32_t heap_free_bytes;
|
||||||
/* Number of packets that were dropped because the transmit queue was full. */
|
/* Number of packets that were dropped because the transmit queue was full. */
|
||||||
uint16_t num_tx_dropped;
|
uint16_t num_tx_dropped;
|
||||||
/* Noise floor value measured in dBm */
|
|
||||||
int32_t noise_floor;
|
|
||||||
} meshtastic_LocalStats;
|
} meshtastic_LocalStats;
|
||||||
|
|
||||||
/* Health telemetry metrics */
|
/* Health telemetry metrics */
|
||||||
@@ -460,7 +458,7 @@ extern "C" {
|
|||||||
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_HealthMetrics_init_default {false, 0, false, 0, false, 0}
|
#define meshtastic_HealthMetrics_init_default {false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_HostMetrics_init_default {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
#define meshtastic_HostMetrics_init_default {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
||||||
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
||||||
@@ -469,7 +467,7 @@ extern "C" {
|
|||||||
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_HealthMetrics_init_zero {false, 0, false, 0, false, 0}
|
#define meshtastic_HealthMetrics_init_zero {false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_HostMetrics_init_zero {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
#define meshtastic_HostMetrics_init_zero {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
||||||
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
||||||
@@ -558,7 +556,6 @@ extern "C" {
|
|||||||
#define meshtastic_LocalStats_heap_total_bytes_tag 12
|
#define meshtastic_LocalStats_heap_total_bytes_tag 12
|
||||||
#define meshtastic_LocalStats_heap_free_bytes_tag 13
|
#define meshtastic_LocalStats_heap_free_bytes_tag 13
|
||||||
#define meshtastic_LocalStats_num_tx_dropped_tag 14
|
#define meshtastic_LocalStats_num_tx_dropped_tag 14
|
||||||
#define meshtastic_LocalStats_noise_floor_tag 15
|
|
||||||
#define meshtastic_HealthMetrics_heart_bpm_tag 1
|
#define meshtastic_HealthMetrics_heart_bpm_tag 1
|
||||||
#define meshtastic_HealthMetrics_spO2_tag 2
|
#define meshtastic_HealthMetrics_spO2_tag 2
|
||||||
#define meshtastic_HealthMetrics_temperature_tag 3
|
#define meshtastic_HealthMetrics_temperature_tag 3
|
||||||
@@ -681,8 +678,7 @@ X(a, STATIC, SINGULAR, UINT32, num_tx_relay, 10) \
|
|||||||
X(a, STATIC, SINGULAR, UINT32, num_tx_relay_canceled, 11) \
|
X(a, STATIC, SINGULAR, UINT32, num_tx_relay_canceled, 11) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, heap_total_bytes, 12) \
|
X(a, STATIC, SINGULAR, UINT32, heap_total_bytes, 12) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, heap_free_bytes, 13) \
|
X(a, STATIC, SINGULAR, UINT32, heap_free_bytes, 13) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, num_tx_dropped, 14) \
|
X(a, STATIC, SINGULAR, UINT32, num_tx_dropped, 14)
|
||||||
X(a, STATIC, SINGULAR, INT32, noise_floor, 15)
|
|
||||||
#define meshtastic_LocalStats_CALLBACK NULL
|
#define meshtastic_LocalStats_CALLBACK NULL
|
||||||
#define meshtastic_LocalStats_DEFAULT NULL
|
#define meshtastic_LocalStats_DEFAULT NULL
|
||||||
|
|
||||||
@@ -759,7 +755,7 @@ extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
|||||||
#define meshtastic_EnvironmentMetrics_size 113
|
#define meshtastic_EnvironmentMetrics_size 113
|
||||||
#define meshtastic_HealthMetrics_size 11
|
#define meshtastic_HealthMetrics_size 11
|
||||||
#define meshtastic_HostMetrics_size 264
|
#define meshtastic_HostMetrics_size 264
|
||||||
#define meshtastic_LocalStats_size 87
|
#define meshtastic_LocalStats_size 76
|
||||||
#define meshtastic_Nau7802Config_size 16
|
#define meshtastic_Nau7802Config_size 16
|
||||||
#define meshtastic_PowerMetrics_size 81
|
#define meshtastic_PowerMetrics_size 81
|
||||||
#define meshtastic_Telemetry_size 272
|
#define meshtastic_Telemetry_size 272
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ void handleAPIv1FromRadio(HTTPRequest *req, HTTPResponse *res)
|
|||||||
|
|
||||||
if (req->getMethod() == "OPTIONS") {
|
if (req->getMethod() == "OPTIONS") {
|
||||||
res->setStatusCode(204); // Success with no content
|
res->setStatusCode(204); // Success with no content
|
||||||
res->print("");
|
// res->print(""); @todo remove
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ void handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res)
|
|||||||
|
|
||||||
if (req->getMethod() == "OPTIONS") {
|
if (req->getMethod() == "OPTIONS") {
|
||||||
res->setStatusCode(204); // Success with no content
|
res->setStatusCode(204); // Success with no content
|
||||||
res->print("");
|
// res->print(""); @todo remove
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -460,15 +460,12 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
|
|||||||
}
|
}
|
||||||
|
|
||||||
meshtastic_NodeInfoLite *sender = nodeDB->getMeshNode(mp.from);
|
meshtastic_NodeInfoLite *sender = nodeDB->getMeshNode(mp.from);
|
||||||
|
bool mutedNode = false;
|
||||||
|
if (sender) {
|
||||||
|
mutedNode = (sender->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK);
|
||||||
|
}
|
||||||
meshtastic_Channel ch = channels.getByIndex(mp.channel ? mp.channel : channels.getPrimaryIndex());
|
meshtastic_Channel ch = channels.getByIndex(mp.channel ? mp.channel : channels.getPrimaryIndex());
|
||||||
|
|
||||||
// If we receive a broadcast message, apply channel mute setting
|
|
||||||
// If we receive a direct message and the receipent is us, apply DM mute setting
|
|
||||||
// Else we just handle it as not muted.
|
|
||||||
const bool directToUs = !isBroadcast(mp.to) && isToUs(&mp);
|
|
||||||
bool is_muted = directToUs ? (sender && ((sender->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK) != 0))
|
|
||||||
: (ch.settings.has_module_settings && ch.settings.module_settings.is_muted);
|
|
||||||
|
|
||||||
if (moduleConfig.external_notification.alert_bell) {
|
if (moduleConfig.external_notification.alert_bell) {
|
||||||
if (containsBell) {
|
if (containsBell) {
|
||||||
LOG_INFO("externalNotificationModule - Notification Bell");
|
LOG_INFO("externalNotificationModule - Notification Bell");
|
||||||
@@ -519,7 +516,8 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moduleConfig.external_notification.alert_message && !is_muted) {
|
if (moduleConfig.external_notification.alert_message && !mutedNode &&
|
||||||
|
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
|
||||||
LOG_INFO("externalNotificationModule - Notification Module");
|
LOG_INFO("externalNotificationModule - Notification Module");
|
||||||
isNagging = true;
|
isNagging = true;
|
||||||
setExternalState(0, true);
|
setExternalState(0, true);
|
||||||
@@ -530,7 +528,8 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moduleConfig.external_notification.alert_message_vibra && !is_muted) {
|
if (moduleConfig.external_notification.alert_message_vibra && !mutedNode &&
|
||||||
|
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
|
||||||
LOG_INFO("externalNotificationModule - Notification Module (Vibra)");
|
LOG_INFO("externalNotificationModule - Notification Module (Vibra)");
|
||||||
isNagging = true;
|
isNagging = true;
|
||||||
setExternalState(1, true);
|
setExternalState(1, true);
|
||||||
@@ -541,7 +540,8 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moduleConfig.external_notification.alert_message_buzzer && !is_muted) {
|
if (moduleConfig.external_notification.alert_message_buzzer && !mutedNode &&
|
||||||
|
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
|
||||||
LOG_INFO("externalNotificationModule - Notification Module (Buzzer)");
|
LOG_INFO("externalNotificationModule - Notification Module (Buzzer)");
|
||||||
if (config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY ||
|
if (config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY ||
|
||||||
(!isBroadcast(mp.to) && isToUs(&mp))) {
|
(!isBroadcast(mp.to) && isToUs(&mp))) {
|
||||||
|
|||||||
@@ -50,10 +50,9 @@ int StatusLEDModule::handleStatusUpdate(const meshtastic::Status *arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case meshtastic::BluetoothStatus::ConnectionState::CONNECTED: {
|
case meshtastic::BluetoothStatus::ConnectionState::CONNECTED: {
|
||||||
if (ble_state != connected) {
|
ble_state = connected;
|
||||||
ble_state = connected;
|
PAIRING_LED_starttime = millis();
|
||||||
PAIRING_LED_starttime = millis();
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ extern void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y, const c
|
|||||||
#include "Sensor/LTR390UVSensor.h"
|
#include "Sensor/LTR390UVSensor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __has_include(<bsec2.h>) || __has_include(<Adafruit_BME680.h>)
|
#if __has_include(MESHTASTIC_BME680_HEADER)
|
||||||
#include "Sensor/BME680Sensor.h"
|
#include "Sensor/BME680Sensor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ void EnvironmentTelemetryModule::i2cScanFinished(ScanI2C *i2cScanner)
|
|||||||
#if __has_include(<Adafruit_LTR390.h>)
|
#if __has_include(<Adafruit_LTR390.h>)
|
||||||
addSensor<LTR390UVSensor>(i2cScanner, ScanI2C::DeviceType::LTR390UV);
|
addSensor<LTR390UVSensor>(i2cScanner, ScanI2C::DeviceType::LTR390UV);
|
||||||
#endif
|
#endif
|
||||||
#if __has_include(<bsec2.h>) || __has_include(<Adafruit_BME680.h>)
|
#if __has_include(MESHTASTIC_BME680_HEADER)
|
||||||
addSensor<BME680Sensor>(i2cScanner, ScanI2C::DeviceType::BME_680);
|
addSensor<BME680Sensor>(i2cScanner, ScanI2C::DeviceType::BME_680);
|
||||||
#endif
|
#endif
|
||||||
#if __has_include(<Adafruit_BMP280.h>)
|
#if __has_include(<Adafruit_BMP280.h>)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && (__has_include(<bsec2.h>) || __has_include(<Adafruit_BME680.h>))
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(MESHTASTIC_BME680_HEADER)
|
||||||
|
|
||||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||||
#include "BME680Sensor.h"
|
#include "BME680Sensor.h"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
BME680Sensor::BME680Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BME680, "BME680") {}
|
BME680Sensor::BME680Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BME680, "BME680") {}
|
||||||
|
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
int32_t BME680Sensor::runOnce()
|
int32_t BME680Sensor::runOnce()
|
||||||
{
|
{
|
||||||
if (!bme680.run()) {
|
if (!bme680.run()) {
|
||||||
@@ -18,13 +18,13 @@ int32_t BME680Sensor::runOnce()
|
|||||||
}
|
}
|
||||||
return 35;
|
return 35;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // defined(MESHTASTIC_BME680_BSEC2_SUPPORTED)
|
||||||
|
|
||||||
bool BME680Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
|
bool BME680Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
|
||||||
{
|
{
|
||||||
status = 0;
|
status = 0;
|
||||||
|
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
if (!bme680.begin(dev->address.address, *bus))
|
if (!bme680.begin(dev->address.address, *bus))
|
||||||
checkStatus("begin");
|
checkStatus("begin");
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ bool BME680Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
|
|||||||
|
|
||||||
status = 1;
|
status = 1;
|
||||||
|
|
||||||
#endif
|
#endif // MESHTASTIC_BME680_BSEC2_SUPPORTED
|
||||||
|
|
||||||
initI2CSensor();
|
initI2CSensor();
|
||||||
return status;
|
return status;
|
||||||
@@ -64,7 +64,7 @@ bool BME680Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
|
|||||||
|
|
||||||
bool BME680Sensor::getMetrics(meshtastic_Telemetry *measurement)
|
bool BME680Sensor::getMetrics(meshtastic_Telemetry *measurement)
|
||||||
{
|
{
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
if (bme680.getData(BSEC_OUTPUT_RAW_PRESSURE).signal == 0)
|
if (bme680.getData(BSEC_OUTPUT_RAW_PRESSURE).signal == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -98,11 +98,11 @@ bool BME680Sensor::getMetrics(meshtastic_Telemetry *measurement)
|
|||||||
measurement->variant.environment_metrics.barometric_pressure = bme680->readPressure() / 100.0F;
|
measurement->variant.environment_metrics.barometric_pressure = bme680->readPressure() / 100.0F;
|
||||||
measurement->variant.environment_metrics.gas_resistance = bme680->readGas() / 1000.0;
|
measurement->variant.environment_metrics.gas_resistance = bme680->readGas() / 1000.0;
|
||||||
|
|
||||||
#endif
|
#endif // MESHTASTIC_BME680_BSEC2_SUPPORTED
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
void BME680Sensor::loadState()
|
void BME680Sensor::loadState()
|
||||||
{
|
{
|
||||||
#ifdef FSCom
|
#ifdef FSCom
|
||||||
@@ -179,6 +179,6 @@ void BME680Sensor::checkStatus(const char *functionName)
|
|||||||
else if (bme680.sensor.status > BME68X_OK)
|
else if (bme680.sensor.status > BME68X_OK)
|
||||||
LOG_WARN("%s BME68X code: %d", functionName, bme680.sensor.status);
|
LOG_WARN("%s BME68X code: %d", functionName, bme680.sensor.status);
|
||||||
}
|
}
|
||||||
#endif
|
#endif // MESHTASTIC_BME680_BSEC2_SUPPORTED
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && (__has_include(<bsec2.h>) || __has_include(<Adafruit_BME680.h>))
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(MESHTASTIC_BME680_HEADER)
|
||||||
|
|
||||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||||
#include "TelemetrySensor.h"
|
#include "TelemetrySensor.h"
|
||||||
|
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
#include <bme68xLibrary.h>
|
#include <bme68xLibrary.h>
|
||||||
#include <bsec2.h>
|
#include <bsec2.h>
|
||||||
#else
|
#else
|
||||||
#include <Adafruit_BME680.h>
|
#include <Adafruit_BME680.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
#endif // MESHTASTIC_BME680_BSEC2_SUPPORTED
|
||||||
|
|
||||||
#define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // That's 6 hours worth of millis()
|
#define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // That's 6 hours worth of millis()
|
||||||
|
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
const uint8_t bsec_config[] = {
|
const uint8_t bsec_config[] = {
|
||||||
#include "config/bme680/bme680_iaq_33v_3s_4d/bsec_iaq.txt"
|
#include "config/bme680/bme680_iaq_33v_3s_4d/bsec_iaq.txt"
|
||||||
};
|
};
|
||||||
#endif
|
#endif // MESHTASTIC_BME680_BSEC2_SUPPORTED
|
||||||
class BME680Sensor : public TelemetrySensor
|
class BME680Sensor : public TelemetrySensor
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
Bsec2 bme680;
|
Bsec2 bme680;
|
||||||
#else
|
#else
|
||||||
using BME680Ptr = std::unique_ptr<Adafruit_BME680>;
|
using BME680Ptr = std::unique_ptr<Adafruit_BME680>;
|
||||||
@@ -31,10 +31,10 @@ class BME680Sensor : public TelemetrySensor
|
|||||||
static BME680Ptr makeBME680(TwoWire *bus) { return std::make_unique<Adafruit_BME680>(bus); }
|
static BME680Ptr makeBME680(TwoWire *bus) { return std::make_unique<Adafruit_BME680>(bus); }
|
||||||
|
|
||||||
BME680Ptr bme680;
|
BME680Ptr bme680;
|
||||||
#endif
|
#endif // MESHTASTIC_BME680_BSEC2_SUPPORTED
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
const char *bsecConfigFileName = "/prefs/bsec.dat";
|
const char *bsecConfigFileName = "/prefs/bsec.dat";
|
||||||
uint8_t bsecState[BSEC_MAX_STATE_BLOB_SIZE] = {0};
|
uint8_t bsecState[BSEC_MAX_STATE_BLOB_SIZE] = {0};
|
||||||
uint8_t accuracy = 0;
|
uint8_t accuracy = 0;
|
||||||
@@ -51,13 +51,13 @@ class BME680Sensor : public TelemetrySensor
|
|||||||
void loadState();
|
void loadState();
|
||||||
void updateState();
|
void updateState();
|
||||||
void checkStatus(const char *functionName);
|
void checkStatus(const char *functionName);
|
||||||
#endif
|
#endif // MESHTASTIC_BME680_BSEC2_SUPPORTED
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BME680Sensor();
|
BME680Sensor();
|
||||||
#if __has_include(<bsec2.h>)
|
#if MESHTASTIC_BME680_BSEC2_SUPPORTED == 1
|
||||||
virtual int32_t runOnce() override;
|
virtual int32_t runOnce() override;
|
||||||
#endif
|
#endif // MESHTASTIC_BME680_BSEC2_SUPPORTED
|
||||||
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
||||||
virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;
|
virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ void cpuDeepSleep(uint32_t msecs)
|
|||||||
void updateBatteryLevel(uint8_t level) NOT_IMPLEMENTED("updateBatteryLevel");
|
void updateBatteryLevel(uint8_t level) NOT_IMPLEMENTED("updateBatteryLevel");
|
||||||
|
|
||||||
int TCPPort = SERVER_API_DEFAULT_PORT;
|
int TCPPort = SERVER_API_DEFAULT_PORT;
|
||||||
bool checkConfigPort = true;
|
|
||||||
|
|
||||||
static error_t parse_opt(int key, char *arg, struct argp_state *state)
|
static error_t parse_opt(int key, char *arg, struct argp_state *state)
|
||||||
{
|
{
|
||||||
@@ -64,7 +63,6 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
|
|||||||
if (sscanf(arg, "%d", &TCPPort) < 1)
|
if (sscanf(arg, "%d", &TCPPort) < 1)
|
||||||
return ARGP_ERR_UNKNOWN;
|
return ARGP_ERR_UNKNOWN;
|
||||||
else
|
else
|
||||||
checkConfigPort = false;
|
|
||||||
printf("Using config file %d\n", TCPPort);
|
printf("Using config file %d\n", TCPPort);
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
@@ -872,14 +870,6 @@ bool loadConfig(const char *configPath)
|
|||||||
std::cout << "Cannot set both MACAddress and MACAddressSource!" << std::endl;
|
std::cout << "Cannot set both MACAddress and MACAddressSource!" << std::endl;
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
if (checkConfigPort) {
|
|
||||||
portduino_config.api_port = (yamlConfig["General"]["APIPort"]).as<int>(-1);
|
|
||||||
if (portduino_config.api_port != -1 &&
|
|
||||||
portduino_config.api_port > 1023 &&
|
|
||||||
portduino_config.api_port < 65536) {
|
|
||||||
TCPPort = (portduino_config.api_port);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
portduino_config.mac_address = (yamlConfig["General"]["MACAddress"]).as<std::string>("");
|
portduino_config.mac_address = (yamlConfig["General"]["MACAddress"]).as<std::string>("");
|
||||||
if (portduino_config.mac_address != "") {
|
if (portduino_config.mac_address != "") {
|
||||||
portduino_config.mac_address_explicit = true;
|
portduino_config.mac_address_explicit = true;
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ extern struct portduino_config_struct {
|
|||||||
std::string mac_address = "";
|
std::string mac_address = "";
|
||||||
bool mac_address_explicit = false;
|
bool mac_address_explicit = false;
|
||||||
std::string mac_address_source = "";
|
std::string mac_address_source = "";
|
||||||
int api_port = -1;
|
|
||||||
std::string config_directory = "";
|
std::string config_directory = "";
|
||||||
std::string available_directory = "/etc/meshtasticd/available.d/";
|
std::string available_directory = "/etc/meshtasticd/available.d/";
|
||||||
int maxtophone = 100;
|
int maxtophone = 100;
|
||||||
@@ -509,8 +508,6 @@ extern struct portduino_config_struct {
|
|||||||
out << YAML::Key << "General" << YAML::Value << YAML::BeginMap;
|
out << YAML::Key << "General" << YAML::Value << YAML::BeginMap;
|
||||||
if (config_directory != "")
|
if (config_directory != "")
|
||||||
out << YAML::Key << "ConfigDirectory" << YAML::Value << config_directory;
|
out << YAML::Key << "ConfigDirectory" << YAML::Value << config_directory;
|
||||||
if (api_port != -1)
|
|
||||||
out << YAML::Key << "TCPPort" << YAML::Value << api_port;
|
|
||||||
if (mac_address_explicit)
|
if (mac_address_explicit)
|
||||||
out << YAML::Key << "MACAddress" << YAML::Value << mac_address;
|
out << YAML::Key << "MACAddress" << YAML::Value << mac_address;
|
||||||
if (mac_address_source != "")
|
if (mac_address_source != "")
|
||||||
@@ -522,4 +519,4 @@ extern struct portduino_config_struct {
|
|||||||
out << YAML::EndMap; // General
|
out << YAML::EndMap; // General
|
||||||
return out.c_str();
|
return out.c_str();
|
||||||
}
|
}
|
||||||
} portduino_config;
|
} portduino_config;
|
||||||
@@ -7,22 +7,3 @@ custom_esp32_kind = esp32
|
|||||||
build_flags =
|
build_flags =
|
||||||
${esp32_common.build_flags}
|
${esp32_common.build_flags}
|
||||||
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
||||||
; Override lib_deps to use environmental_extra_no_bsec instead of environmental_extra
|
|
||||||
; BSEC library uses ~3.5KB DRAM which causes overflow on original ESP32 targets
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
${networking_base.lib_deps}
|
|
||||||
${networking_extra.lib_deps}
|
|
||||||
${environmental_base.lib_deps}
|
|
||||||
${environmental_extra_no_bsec.lib_deps}
|
|
||||||
${radiolib_base.lib_deps}
|
|
||||||
# renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master
|
|
||||||
https://github.com/meshtastic/esp32_https_server/archive/3223704846752e6d545139204837bdb2a55459ca.zip
|
|
||||||
# renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino
|
|
||||||
h2zero/NimBLE-Arduino@^1.4.3
|
|
||||||
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
|
|
||||||
https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
|
|
||||||
# renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
|
|
||||||
https://github.com/lewisxhe/XPowersLib/archive/v0.3.2.zip
|
|
||||||
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
|
|
||||||
rweather/Crypto@0.4.0
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
; Russell is a board designed to mount on an ER34615/IFR32700 cell and go Up! on a balloon
|
|
||||||
; Hardware repository: https://github.com/Meshtastic-Malaysia/russell
|
|
||||||
; - RAK3172 STM32WLE5CCU6 MCU + integrated SX1262 LoRa
|
|
||||||
; - CDtop CD-PA1010D GPS
|
|
||||||
; - Bosch Sensortec BME280 sensor
|
|
||||||
; - Consonance CN3158 LiFePO4 solar charger
|
|
||||||
[env:russell]
|
|
||||||
extends = stm32_base
|
|
||||||
board = wiscore_rak3172
|
|
||||||
board_level = extra
|
|
||||||
board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
|
|
||||||
build_flags =
|
|
||||||
${stm32_base.build_flags}
|
|
||||||
-Ivariants/stm32/russell
|
|
||||||
-DPRIVATE_HW
|
|
||||||
lib_deps =
|
|
||||||
${stm32_base.lib_deps}
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit BME280 packageName=adafruit/library/Adafruit BME280 Library
|
|
||||||
adafruit/Adafruit BME280 Library@2.3.0
|
|
||||||
|
|
||||||
upload_port = stlink
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
// Pins from https://forum.rakwireless.com/t/rak3172-internal-schematic/4557/2
|
|
||||||
// PB8, PC13
|
|
||||||
|
|
||||||
static const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PB8, PC13, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};
|
|
||||||
|
|
||||||
static const Module::RfSwitchMode_t rfswitch_table[4] = {
|
|
||||||
{STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
#ifndef _VARIANT_RUSSELL_
|
|
||||||
#define _VARIANT_RUSSELL_
|
|
||||||
|
|
||||||
#define USE_STM32WLx
|
|
||||||
|
|
||||||
// I/O
|
|
||||||
#define LED_PIN PA0 // Red LED
|
|
||||||
#define LED_STATE_ON 1
|
|
||||||
#define BUTTON_PIN PH3 // Shared with BOOT0
|
|
||||||
#define BUTTON_NEED_PULLUP
|
|
||||||
// Charger IC charge/standby pins are open-drain with no hardware pull-up:
|
|
||||||
// Internal pull-up is needed on STM32 (TODO)
|
|
||||||
// #define EXT_CHRG_DETECT PA5
|
|
||||||
// #define EXT_PWR_DETECT PA4
|
|
||||||
|
|
||||||
// Bosch Sensortec BME280
|
|
||||||
#define HAS_SENSOR 1
|
|
||||||
|
|
||||||
// CDtop CD-PA1010D
|
|
||||||
#define ENABLE_HWSERIAL1
|
|
||||||
#define PIN_SERIAL1_RX PB7
|
|
||||||
#define PIN_SERIAL1_TX PB6
|
|
||||||
#define HAS_GPS 1
|
|
||||||
#define PIN_GPS_STANDBY PA15
|
|
||||||
#define GPS_RX_PIN PB7
|
|
||||||
#define GPS_TX_PIN PB6
|
|
||||||
|
|
||||||
// LoRa
|
|
||||||
/*
|
|
||||||
* RAK3172 (-20–85°C) -> No TCXO
|
|
||||||
* RAK3172-T (-40–85°C) -> 3.0V TCXO
|
|
||||||
* https://github.com/RAKWireless/RAK-STM32-RUI/blob/e5a28be8fab1a492bd9223dd425ca33a8a297d90/variants/WisDuo_RAK3172-T_Board/radio_conf.h#L91
|
|
||||||
*/
|
|
||||||
#define TCXO_OPTIONAL
|
|
||||||
#define SX126X_DIO3_TCXO_VOLTAGE 3.0
|
|
||||||
|
|
||||||
// Required to avoid Serial1 conflicts due to board definition here:
|
|
||||||
// https://github.com/stm32duino/Arduino_Core_STM32/blob/main/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_RAK3172_MODULE.h
|
|
||||||
#define RAK3172
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user