mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-22 16:56:53 +00:00
Merge branch 'master' into crowpanel
This commit is contained in:
commit
de66f439cc
32
.github/workflows/release_channels.yml
vendored
32
.github/workflows/release_channels.yml
vendored
@ -46,11 +46,14 @@ jobs:
|
||||
|
||||
# Create a PR to bump version when a release is Published
|
||||
bump-version:
|
||||
if: ${{ github.event.release.published }}
|
||||
if: github.event.action == 'published'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -63,29 +66,42 @@ jobs:
|
||||
- name: Get release version string
|
||||
run: |
|
||||
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||
echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT
|
||||
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||
id: version
|
||||
env:
|
||||
BUILD_LOCATION: local
|
||||
|
||||
- name: Bump version.properties
|
||||
run: >-
|
||||
bin/bump_version.py
|
||||
run: |
|
||||
# Bump version.properties
|
||||
chmod +x ./bin/bump_version.py
|
||||
./bin/bump_version.py
|
||||
|
||||
- name: Ensure debian deps are installed
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update -y --fix-missing
|
||||
sudo apt-get install -y devscripts
|
||||
|
||||
- name: Update debian changelog
|
||||
run: >-
|
||||
debian/ci_changelog.sh
|
||||
run: |
|
||||
# Update debian changelog
|
||||
chmod +x ./debian/ci_changelog.sh
|
||||
./debian/ci_changelog.sh
|
||||
|
||||
- name: Create version.properties pull request
|
||||
- name: Bump org.meshtastic.meshtasticd.metainfo.xml
|
||||
run: |
|
||||
# Bump org.meshtastic.meshtasticd.metainfo.xml
|
||||
pip install -r bin/bump_metainfo/requirements.txt -q
|
||||
chmod +x ./bin/bump_metainfo/bump_metainfo.py
|
||||
./bin/bump_metainfo/bump_metainfo.py --file bin/org.meshtastic.meshtasticd.metainfo.xml "${{ steps.version.outputs.short }}"
|
||||
|
||||
- name: Create Bumps pull request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
title: Bump version.properties
|
||||
title: Bump release version
|
||||
commit-message: automated bumps
|
||||
add-paths: |
|
||||
version.properties
|
||||
debian/changelog
|
||||
bin/org.meshtastic.meshtasticd.metainfo.xml
|
||||
|
@ -8,7 +8,7 @@ plugins:
|
||||
uri: https://github.com/trunk-io/plugins
|
||||
lint:
|
||||
enabled:
|
||||
- renovate@39.238.1
|
||||
- renovate@39.243.0
|
||||
- prettier@3.5.3
|
||||
- trufflehog@3.88.23
|
||||
- yamllint@1.37.0
|
||||
@ -28,7 +28,7 @@ lint:
|
||||
- shellcheck@0.10.0
|
||||
- black@25.1.0
|
||||
- git-diff-check
|
||||
- gitleaks@8.24.2
|
||||
- gitleaks@8.24.3
|
||||
- clang-format@16.0.3
|
||||
ignore:
|
||||
- linters: [ALL]
|
||||
|
72
bin/bump_metainfo/bump_metainfo.py
Executable file
72
bin/bump_metainfo/bump_metainfo.py
Executable file
@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import xml.etree.ElementTree as ET
|
||||
from defusedxml.ElementTree import parse
|
||||
from datetime import datetime, timezone
|
||||
|
||||
|
||||
# Indent by 2 spaces to align with xml formatting.
|
||||
def indent(elem, level=0):
|
||||
i = "\n" + level * " "
|
||||
if len(elem):
|
||||
if not elem.text or not elem.text.strip():
|
||||
elem.text = i + " "
|
||||
for child in elem:
|
||||
indent(child, level + 1)
|
||||
if not child.tail or not child.tail.strip():
|
||||
child.tail = i
|
||||
if level and (not elem.tail or not elem.tail.strip()):
|
||||
elem.tail = i
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Prepend new release entry to metainfo.xml file.")
|
||||
parser.add_argument("--file", help="Path to the metainfo.xml file",
|
||||
default="org.meshtastic.meshtasticd.metainfo.xml")
|
||||
parser.add_argument("version", help="Version string (e.g. 2.6.4)")
|
||||
parser.add_argument("--date", help="Release date (YYYY-MM-DD), defaults to today",
|
||||
default=datetime.now(timezone.utc).date().isoformat())
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
tree = parse(args.file)
|
||||
root = tree.getroot()
|
||||
|
||||
releases = root.find('releases')
|
||||
if releases is None:
|
||||
raise RuntimeError("<releases> element not found in XML.")
|
||||
|
||||
existing_versions = {
|
||||
release.get('version'): release
|
||||
for release in releases.findall('release')
|
||||
}
|
||||
existing_release = existing_versions.get(args.version)
|
||||
|
||||
if existing_release is not None:
|
||||
if not existing_release.get('date'):
|
||||
print(f"Version {args.version} found without date. Adding date...")
|
||||
existing_release.set('date', args.date)
|
||||
else:
|
||||
print(
|
||||
f"Version {args.version} is already present with date, skipping insertion.")
|
||||
else:
|
||||
new_release = ET.Element('release', {
|
||||
'version': args.version,
|
||||
'date': args.date
|
||||
})
|
||||
url = ET.SubElement(new_release, 'url', {'type': 'details'})
|
||||
url.text = f"https://github.com/meshtastic/firmware/releases?q=tag%3Av{args.version}"
|
||||
|
||||
releases.insert(0, new_release)
|
||||
|
||||
indent(releases, level=1)
|
||||
releases.tail = "\n"
|
||||
|
||||
print(f"Inserted new release: {args.version}")
|
||||
|
||||
tree.write(args.file, encoding='UTF-8', xml_declaration=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
1
bin/bump_metainfo/requirements.txt
Normal file
1
bin/bump_metainfo/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
defusedxml==0.7.1
|
11
bin/config.d/lora-piggystick-lr1121.yaml
Normal file
11
bin/config.d/lora-piggystick-lr1121.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
Lora:
|
||||
Module: lr1121
|
||||
CS: 0
|
||||
IRQ: 6
|
||||
Reset: 2
|
||||
Busy: 4
|
||||
spidev: ch341
|
||||
DIO3_TCXO_VOLTAGE: 1.8
|
||||
# USB_Serialnum: 12345678
|
||||
USB_PID: 0x5512
|
||||
USB_VID: 0x1A86
|
@ -87,8 +87,14 @@
|
||||
</screenshots>
|
||||
|
||||
<releases>
|
||||
<release version="v2.6.4.b89355f" date="2025-04-10">
|
||||
<url type="details">https://github.com/meshtastic/firmware/releases/tag/v2.6.4.b89355f</url>
|
||||
<release version="2.6.6">
|
||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.6</url>
|
||||
</release>
|
||||
<release version="2.6.5" date="2025-04-09">
|
||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.5</url>
|
||||
</release>
|
||||
<release version="2.6.4" date="2025-03-29">
|
||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.4</url>
|
||||
</release>
|
||||
</releases>
|
||||
</component>
|
@ -1,54 +1,53 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "nrf52840_s140_v6.ld"
|
||||
},
|
||||
"core": "nRF5",
|
||||
"cpu": "cortex-m4",
|
||||
"extra_flags": "-DNRF52840_XXAA",
|
||||
"f_cpu": "64000000L",
|
||||
"hwids": [
|
||||
["0x239A", "0x4405"],
|
||||
["0x239A", "0x0029"],
|
||||
["0x239A", "0x002A"]
|
||||
],
|
||||
"usb_product": "HT-n5262",
|
||||
"mcu": "nrf52840",
|
||||
"variant": "heltec_mesh_pocket",
|
||||
"variants_dir": "variants",
|
||||
"bsp": {
|
||||
"name": "adafruit"
|
||||
},
|
||||
"softdevice": {
|
||||
"sd_flags": "-DS140",
|
||||
"sd_name": "s140",
|
||||
"sd_version": "6.1.1",
|
||||
"sd_fwid": "0x00B6"
|
||||
},
|
||||
"bootloader": {
|
||||
"settings_addr": "0xFF000"
|
||||
}
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "nrf52840_s140_v6.ld"
|
||||
},
|
||||
"connectivity": ["bluetooth"],
|
||||
"debug": {
|
||||
"jlink_device": "nRF52840_xxAA",
|
||||
"onboard_tools": ["jlink"],
|
||||
"svd_path": "nrf52840.svd",
|
||||
"openocd_target": "nrf52840-mdk-rs"
|
||||
"core": "nRF5",
|
||||
"cpu": "cortex-m4",
|
||||
"extra_flags": "-DNRF52840_XXAA",
|
||||
"f_cpu": "64000000L",
|
||||
"hwids": [
|
||||
["0x239A", "0x4405"],
|
||||
["0x239A", "0x0029"],
|
||||
["0x239A", "0x002A"]
|
||||
],
|
||||
"usb_product": "HT-n5262",
|
||||
"mcu": "nrf52840",
|
||||
"variant": "heltec_mesh_pocket",
|
||||
"variants_dir": "variants",
|
||||
"bsp": {
|
||||
"name": "adafruit"
|
||||
},
|
||||
"frameworks": ["arduino"],
|
||||
"name": "Heltec nrf (Adafruit BSP)",
|
||||
"upload": {
|
||||
"maximum_ram_size": 248832,
|
||||
"maximum_size": 815104,
|
||||
"speed": 115200,
|
||||
"protocol": "nrfutil",
|
||||
"protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"],
|
||||
"use_1200bps_touch": true,
|
||||
"require_upload_port": true,
|
||||
"wait_for_upload_port": true
|
||||
"softdevice": {
|
||||
"sd_flags": "-DS140",
|
||||
"sd_name": "s140",
|
||||
"sd_version": "6.1.1",
|
||||
"sd_fwid": "0x00B6"
|
||||
},
|
||||
"url": "https://heltec.org/project/meshpocket/",
|
||||
"vendor": "Heltec"
|
||||
}
|
||||
|
||||
"bootloader": {
|
||||
"settings_addr": "0xFF000"
|
||||
}
|
||||
},
|
||||
"connectivity": ["bluetooth"],
|
||||
"debug": {
|
||||
"jlink_device": "nRF52840_xxAA",
|
||||
"onboard_tools": ["jlink"],
|
||||
"svd_path": "nrf52840.svd",
|
||||
"openocd_target": "nrf52840-mdk-rs"
|
||||
},
|
||||
"frameworks": ["arduino"],
|
||||
"name": "Heltec nrf (Adafruit BSP)",
|
||||
"upload": {
|
||||
"maximum_ram_size": 248832,
|
||||
"maximum_size": 815104,
|
||||
"speed": 115200,
|
||||
"protocol": "nrfutil",
|
||||
"protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"],
|
||||
"use_1200bps_touch": true,
|
||||
"require_upload_port": true,
|
||||
"wait_for_upload_port": true
|
||||
},
|
||||
"url": "https://heltec.org/project/meshpocket/",
|
||||
"vendor": "Heltec"
|
||||
}
|
||||
|
4
debian/ci_pack_sdeb.sh
vendored
4
debian/ci_pack_sdeb.sh
vendored
@ -5,8 +5,8 @@ export PLATFORMIO_PACKAGES_DIR=pio/packages
|
||||
export PLATFORMIO_CORE_DIR=pio/core
|
||||
|
||||
# Download libraries to `pio`
|
||||
platformio pkg install -e native
|
||||
platformio pkg install -e native -t platformio/tool-scons@4.40502.0
|
||||
platformio pkg install -e native-tft
|
||||
platformio pkg install -e native-tft -t platformio/tool-scons@4.40502.0
|
||||
# Compress `pio` directory to prevent dh_clean from sanitizing it
|
||||
tar -cf pio.tar pio/
|
||||
rm -rf pio
|
||||
|
5
debian/control
vendored
5
debian/control
vendored
@ -21,7 +21,10 @@ Build-Depends: debhelper-compat (= 13),
|
||||
openssl,
|
||||
libssl-dev,
|
||||
libulfius-dev,
|
||||
liborcania-dev
|
||||
liborcania-dev,
|
||||
libx11-dev,
|
||||
libinput-dev,
|
||||
libxkbcommon-x11-dev
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://github.com/meshtastic/firmware
|
||||
Rules-Requires-Root: no
|
||||
|
10
debian/meshtasticd.install
vendored
10
debian/meshtasticd.install
vendored
@ -1,8 +1,8 @@
|
||||
.pio/build/native/meshtasticd usr/sbin
|
||||
.pio/build/native-tft/meshtasticd usr/sbin
|
||||
|
||||
bin/config.yaml etc/meshtasticd
|
||||
bin/config.d/* etc/meshtasticd/available.d
|
||||
bin/config.yaml etc/meshtasticd
|
||||
bin/config.d/* etc/meshtasticd/available.d
|
||||
|
||||
bin/meshtasticd.service lib/systemd/system
|
||||
bin/meshtasticd.service lib/systemd/system
|
||||
|
||||
web/* usr/share/meshtasticd/web
|
||||
web/* usr/share/meshtasticd/web
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -26,7 +26,7 @@ override_dh_auto_build:
|
||||
mkdir -p web && tar -xf web.tar -C web
|
||||
gunzip web/ -r
|
||||
# Build with platformio
|
||||
$(PIO_ENV) platformio run -e native
|
||||
$(PIO_ENV) platformio run -e native-tft
|
||||
# Move the binary and default config to the correct name
|
||||
mv .pio/build/native/program .pio/build/native/meshtasticd
|
||||
mv .pio/build/native-tft/program .pio/build/native-tft/meshtasticd
|
||||
cp bin/config-dist.yaml bin/config.yaml
|
||||
|
@ -93,8 +93,8 @@ build_src_filter = ${env.build_src_filter} -<platform/portduino/> -<graphics/nic
|
||||
; Common libs for communicating over TCP/IP networks such as MQTT
|
||||
[networking_base]
|
||||
lib_deps =
|
||||
# renovate: datasource=custom.pio depName=PubSubClient packageName=knolleary/library/PubSubClient
|
||||
knolleary/PubSubClient@2.8
|
||||
# renovate: datasource=custom.pio depName=TBPubSubClient packageName=thingsboard/library/TBPubSubClient
|
||||
thingsboard/TBPubSubClient@2.12.1
|
||||
# renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient
|
||||
arduino-libraries/NTPClient@3.2.1
|
||||
# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit f9aa5cfd08cf14917fce54e5ebc0441b35ce32b3
|
||||
Subproject commit b982b36dfab2e96b8f8be90af891c68ebf8790c2
|
@ -13,6 +13,9 @@
|
||||
"git-submodules": {
|
||||
"enabled": true
|
||||
},
|
||||
"pip_requirements": {
|
||||
"fileMatch": ["bin/bump_metainfo/requirements.txt"]
|
||||
},
|
||||
"commitMessageTopic": "{{depName}}",
|
||||
"labels": ["dependencies"],
|
||||
"customDatasources": {
|
||||
|
@ -219,7 +219,7 @@ bool EInkDisplay::connect()
|
||||
}
|
||||
#elif defined(HELTEC_MESH_POCKET)
|
||||
{
|
||||
spi1=&SPI1;
|
||||
spi1 = &SPI1;
|
||||
spi1->begin();
|
||||
// VExt already enabled in setup()
|
||||
// RTC GPIO hold disabled in setup()
|
||||
|
@ -23,16 +23,16 @@ void LCMEN2R13ECC1::configScanning()
|
||||
void LCMEN2R13ECC1::configWaveform()
|
||||
{
|
||||
switch (updateType) {
|
||||
case FAST:
|
||||
sendCommand(0x3C); // Border waveform:
|
||||
sendData(0x85);
|
||||
break;
|
||||
|
||||
case FULL:
|
||||
default:
|
||||
// From OTP memory
|
||||
break;
|
||||
}
|
||||
case FAST:
|
||||
sendCommand(0x3C); // Border waveform:
|
||||
sendData(0x85);
|
||||
break;
|
||||
|
||||
case FULL:
|
||||
default:
|
||||
// From OTP memory
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void LCMEN2R13ECC1::configUpdateSequence()
|
||||
@ -65,4 +65,4 @@ void LCMEN2R13ECC1::detachFromUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|
||||
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|
@ -28,13 +28,13 @@ class LCMEN2R13ECC1 : public SSD16XX
|
||||
static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);
|
||||
|
||||
public:
|
||||
LCMEN2R13ECC1() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte
|
||||
LCMEN2R13ECC1() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte
|
||||
|
||||
protected:
|
||||
virtual void configScanning() override;
|
||||
virtual void configWaveform() override;
|
||||
virtual void configUpdateSequence() override;
|
||||
void detachFromUpdate() override;
|
||||
virtual void configScanning() override;
|
||||
virtual void configWaveform() override;
|
||||
virtual void configUpdateSequence() override;
|
||||
void detachFromUpdate() override;
|
||||
};
|
||||
|
||||
} // namespace NicheGraphics::Drivers
|
||||
|
@ -11,10 +11,19 @@ InkHUD::LogoApplet::LogoApplet() : concurrency::OSThread("LogoApplet")
|
||||
OSThread::setIntervalFromNow(8 * 1000UL);
|
||||
OSThread::enabled = true;
|
||||
|
||||
textLeft = "";
|
||||
textRight = "";
|
||||
textTitle = xstr(APP_VERSION_SHORT);
|
||||
fontTitle = fontSmall;
|
||||
// During onboarding, show the default short name as well as the version string
|
||||
// This behavior assists manufacturers during mass production, and should not be modified without good reason
|
||||
if (!settings->tips.safeShutdownSeen) {
|
||||
fontTitle = fontLarge;
|
||||
textLeft = xstr(APP_VERSION_SHORT);
|
||||
textRight = owner.short_name;
|
||||
textTitle = "Meshtastic";
|
||||
} else {
|
||||
fontTitle = fontSmall;
|
||||
textLeft = "";
|
||||
textRight = "";
|
||||
textTitle = xstr(APP_VERSION_SHORT);
|
||||
}
|
||||
|
||||
bringToForeground();
|
||||
// This is then drawn with a FULL refresh by Renderer::begin
|
||||
|
@ -181,7 +181,7 @@ void TwoButton::isrSecondary()
|
||||
void TwoButton::startThread()
|
||||
{
|
||||
if (!OSThread::enabled) {
|
||||
OSThread::setInterval(50);
|
||||
OSThread::setInterval(10);
|
||||
OSThread::enabled = true;
|
||||
}
|
||||
}
|
||||
|
@ -1330,7 +1330,7 @@ extern meshtastic_DeviceMetadata getDeviceMetadata()
|
||||
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AUDIO_CONFIG;
|
||||
#endif
|
||||
// Option to explicitly include canned messages for edge cases, e.g. niche graphics
|
||||
#if (!HAS_SCREEN && NO_EXT_GPIO) && !MESHTASTIC_INCLUDE_CANNEDMSG
|
||||
#if (!HAS_SCREEN || NO_EXT_GPIO) || MESHTASTIC_EXCLUDE_CANNEDMESSAGES
|
||||
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_CANNEDMSG_CONFIG;
|
||||
#endif
|
||||
#if NO_EXT_GPIO
|
||||
@ -1338,11 +1338,11 @@ extern meshtastic_DeviceMetadata getDeviceMetadata()
|
||||
#endif
|
||||
// Only edge case here is if we apply this a device with built in Accelerometer and want to detect interrupts
|
||||
// We'll have to macro guard against those targets potentially
|
||||
#if NO_EXT_GPIO
|
||||
#if NO_EXT_GPIO || MESHTASTIC_EXCLUDE_DETECTIONSENSOR
|
||||
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG;
|
||||
#endif
|
||||
// If we don't have any GPIO and we don't have GPS, no purpose in having serial config
|
||||
#if NO_EXT_GPIO && NO_GPS
|
||||
// If we don't have any GPIO and we don't have GPS OR we don't want too - no purpose in having serial config
|
||||
#if NO_EXT_GPIO && NO_GPS || MESHTASTIC_EXCLUDE_SERIAL
|
||||
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_SERIAL_CONFIG;
|
||||
#endif
|
||||
#ifndef ARCH_ESP32
|
||||
|
@ -210,6 +210,14 @@ bool RadioLibInterface::canSleep()
|
||||
return res;
|
||||
}
|
||||
|
||||
/** Allow other firmware components to ask whether we are currently sending a packet
|
||||
Initially implemented to protect T-Echo's capacitive touch button from spurious presses during tx
|
||||
*/
|
||||
bool RadioLibInterface::isSending()
|
||||
{
|
||||
return sendingPacket != NULL;
|
||||
}
|
||||
|
||||
/** Attempt to cancel a previously sent packet. Returns true if a packet was found we could cancel */
|
||||
bool RadioLibInterface::cancelSending(NodeNum from, PacketId id)
|
||||
{
|
||||
|
@ -132,6 +132,11 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified
|
||||
*/
|
||||
virtual bool isActivelyReceiving() = 0;
|
||||
|
||||
/** Are we are currently sending a packet?
|
||||
* This method is public, intending to expose this information to other firmware components
|
||||
*/
|
||||
virtual bool isSending();
|
||||
|
||||
/** Attempt to cancel a previously sent packet. Returns true if a packet was found we could cancel */
|
||||
virtual bool cancelSending(NodeNum from, PacketId id) override;
|
||||
|
||||
|
@ -241,6 +241,8 @@ typedef enum _meshtastic_HardwareModel {
|
||||
meshtastic_HardwareModel_RESERVED_FRIED_CHICKEN = 93,
|
||||
/* Heltec Magnetic Power Bank with Meshtastic compatible */
|
||||
meshtastic_HardwareModel_HELTEC_MESH_POCKET = 94,
|
||||
/* Seeed Solar Node */
|
||||
meshtastic_HardwareModel_SEEED_SOLAR_NODE = 95,
|
||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||
|
@ -281,7 +281,7 @@ struct PubSubConfig {
|
||||
#if HAS_NETWORKING
|
||||
bool connectPubSub(const PubSubConfig &config, PubSubClient &pubSub, Client &client)
|
||||
{
|
||||
pubSub.setBufferSize(1024);
|
||||
pubSub.setBufferSize(1024, 1024);
|
||||
pubSub.setClient(client);
|
||||
pubSub.setServer(config.serverAddr.c_str(), config.serverPort);
|
||||
|
||||
|
@ -34,7 +34,7 @@ void setupNicheGraphics()
|
||||
|
||||
// SPI
|
||||
// -----------------------------
|
||||
SPIClass *spi1=&SPI1;
|
||||
SPIClass *spi1 = &SPI1;
|
||||
spi1->begin();
|
||||
// Display is connected to SPI1
|
||||
|
||||
|
@ -9,5 +9,3 @@ const uint32_t g_ADigitalPinMap[] = {
|
||||
|
||||
// P1
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
|
||||
|
||||
|
||||
|
@ -49,16 +49,16 @@ No longer populated on PCB
|
||||
*/
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
#define PIN_WIRE_SDA (32+15)
|
||||
#define PIN_WIRE_SCL (32+13)
|
||||
#define PIN_WIRE_SDA (32 + 15)
|
||||
#define PIN_WIRE_SCL (32 + 13)
|
||||
|
||||
/*
|
||||
* Lora radio
|
||||
*/
|
||||
|
||||
#define USE_SX1262
|
||||
#define SX126X_CS (0 + 26) // FIXME - we really should define LORA_CS instead
|
||||
#define LORA_CS (0 + 26)
|
||||
#define SX126X_CS (0 + 26) // FIXME - we really should define LORA_CS instead
|
||||
#define LORA_CS (0 + 26)
|
||||
#define SX126X_DIO1 (0 + 16)
|
||||
// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching
|
||||
// #define SX1262_DIO3 (0 + 21)
|
||||
@ -72,25 +72,23 @@ No longer populated on PCB
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
// Display (E-Ink)
|
||||
#define PIN_EINK_CS 24
|
||||
#define PIN_EINK_BUSY 32+6
|
||||
#define PIN_EINK_DC 31
|
||||
#define PIN_EINK_RES 32+4
|
||||
#define PIN_EINK_CS 24
|
||||
#define PIN_EINK_BUSY 32 + 6
|
||||
#define PIN_EINK_DC 31
|
||||
#define PIN_EINK_RES 32 + 4
|
||||
#define PIN_EINK_SCLK 22
|
||||
#define PIN_EINK_MOSI 20
|
||||
|
||||
|
||||
#define PIN_SPI1_MISO -1
|
||||
#define PIN_SPI1_MOSI PIN_EINK_MOSI
|
||||
#define PIN_SPI1_SCK PIN_EINK_SCLK
|
||||
|
||||
|
||||
/*
|
||||
* GPS pins
|
||||
*/
|
||||
|
||||
#define PIN_SERIAL1_RX 32+5
|
||||
#define PIN_SERIAL1_TX 32+7
|
||||
#define PIN_SERIAL1_RX 32 + 5
|
||||
#define PIN_SERIAL1_TX 32 + 7
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
@ -112,7 +110,7 @@ No longer populated on PCB
|
||||
// it is defined in the anlaolgue pin section of this file
|
||||
// and has 12 bit resolution
|
||||
|
||||
#define ADC_CTRL 32+2
|
||||
#define ADC_CTRL 32 + 2
|
||||
#define ADC_CTRL_ENABLED HIGH
|
||||
#define BATTERY_PIN 29
|
||||
#define ADC_RESOLUTION 14
|
||||
@ -124,12 +122,11 @@ No longer populated on PCB
|
||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||
#define ADC_MULTIPLIER (4.90F)
|
||||
|
||||
#undef HAS_GPS
|
||||
#undef HAS_GPS
|
||||
#define HAS_GPS 0
|
||||
#define HAS_RTC 0
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
@ -29,6 +29,12 @@
|
||||
#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h"
|
||||
#include <Fonts/FreeSans9pt7b.h>
|
||||
|
||||
// Special case - fix T-Echo's touch button
|
||||
// ----------------------------------------
|
||||
// On a handful of T-Echos, LoRa TX triggers the capacitive touch
|
||||
// To avoid this, we lockout the button during TX
|
||||
#include "mesh/RadioLibInterface.h"
|
||||
|
||||
void setupNicheGraphics()
|
||||
{
|
||||
using namespace NicheGraphics;
|
||||
@ -115,13 +121,22 @@ void setupNicheGraphics()
|
||||
buttons->setWiring(TOUCH_BUTTON, PIN_BUTTON_TOUCH);
|
||||
buttons->setTiming(TOUCH_BUTTON, 50, 5000); // 5 seconds before latch - limited by T-Echo's capacitive touch IC
|
||||
buttons->setHandlerDown(TOUCH_BUTTON, [backlight]() {
|
||||
// Discard the button press if radio is active
|
||||
// Rare hardware fault: LoRa activity triggers touch button
|
||||
if (!RadioLibInterface::instance || RadioLibInterface::instance->isSending())
|
||||
return;
|
||||
|
||||
// Backlight on (while held)
|
||||
backlight->peek();
|
||||
InkHUD::InkHUD::getInstance()->persistence->settings.optionalMenuItems.backlight =
|
||||
false; // We've proved user still has the button. No need to make backlight togglable via the menu.
|
||||
|
||||
// Handler has run, which confirms touch button wasn't removed as part of DIY build.
|
||||
// No longer need the fallback backlight toggle in menu.
|
||||
InkHUD::InkHUD::getInstance()->persistence->settings.optionalMenuItems.backlight = false;
|
||||
});
|
||||
buttons->setHandlerLongPress(TOUCH_BUTTON, [backlight]() { backlight->latch(); });
|
||||
buttons->setHandlerShortPress(TOUCH_BUTTON, [backlight]() { backlight->off(); });
|
||||
|
||||
// Begin handling button events
|
||||
buttons->start();
|
||||
}
|
||||
|
||||
|
@ -3,4 +3,5 @@ board_level = extra
|
||||
extends = esp32_base
|
||||
board = ttgo-lora32-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags} -D TLORA_V1 -I variants/tlora_v1
|
||||
${esp32_base.build_flags} -D TLORA_V1 -I variants/tlora_v1
|
||||
upload_speed = 115200
|
@ -3,4 +3,5 @@ board_level = extra
|
||||
extends = esp32_base
|
||||
board = ttgo-lora32-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags} -D TLORA_V1_3 -I variants/tlora_v1_3
|
||||
${esp32_base.build_flags} -D TLORA_V1_3 -I variants/tlora_v1_3
|
||||
upload_speed = 115200
|
@ -4,4 +4,5 @@ board = ttgo-lora32-v21
|
||||
board_check = true
|
||||
build_flags =
|
||||
${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/tlora_v2_1_16
|
||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
upload_speed = 115200
|
@ -7,4 +7,5 @@ build_flags =
|
||||
-D TLORA_V2_1_16
|
||||
-I variants/tlora_v2_1_16
|
||||
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
-D LORA_TCXO_GPIO=33
|
||||
-D LORA_TCXO_GPIO=33
|
||||
upload_speed = 115200
|
@ -5,6 +5,10 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/tracker-t1000-e -Isrc/plat
|
||||
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
||||
-DGPS_POWER_TOGGLE
|
||||
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL=1
|
||||
-DMESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
|
||||
-DMESHTASTIC_EXCLUDE_SCREEN=1
|
||||
-DMESHTASTIC_EXCLUDE_DETECTIONSENSOR=1
|
||||
-DMESHTASTIC_EXCLUDE_WIFI=1
|
||||
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
|
||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/tracker-t1000-e>
|
||||
lib_deps =
|
||||
@ -12,4 +16,4 @@ lib_deps =
|
||||
https://github.com/meshtastic/QMA6100P_Arduino_Library/archive/14c900b8b2e4feaac5007a7e41e0c1b7f0841136.zip
|
||||
debug_tool = jlink
|
||||
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
|
||||
upload_protocol = nrfutil
|
||||
upload_protocol = nrfutil
|
||||
|
@ -152,6 +152,8 @@ extern "C" {
|
||||
#define T1000X_NTC_PIN (0 + 31) // P0.31/AIN7
|
||||
#define T1000X_LUX_PIN (0 + 29) // P0.29/AIN5
|
||||
|
||||
#define HAS_SCREEN 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@ -160,4 +162,4 @@ extern "C" {
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#endif // _VARIANT_TRACKER_T1000_E_
|
||||
#endif // _VARIANT_TRACKER_T1000_E_
|
||||
|
@ -1,4 +1,4 @@
|
||||
[VERSION]
|
||||
major = 2
|
||||
minor = 6
|
||||
build = 5
|
||||
build = 6
|
||||
|
Loading…
Reference in New Issue
Block a user