mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-12 16:41:04 +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
|
# Create a PR to bump version when a release is Published
|
||||||
bump-version:
|
bump-version:
|
||||||
if: ${{ github.event.release.published }}
|
if: github.event.action == 'published'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
contents: write
|
contents: write
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -63,29 +66,42 @@ jobs:
|
|||||||
- name: Get release version string
|
- name: Get release version string
|
||||||
run: |
|
run: |
|
||||||
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT
|
||||||
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
id: version
|
id: version
|
||||||
env:
|
env:
|
||||||
BUILD_LOCATION: local
|
BUILD_LOCATION: local
|
||||||
|
|
||||||
- name: Bump version.properties
|
- name: Bump version.properties
|
||||||
run: >-
|
run: |
|
||||||
bin/bump_version.py
|
# Bump version.properties
|
||||||
|
chmod +x ./bin/bump_version.py
|
||||||
|
./bin/bump_version.py
|
||||||
|
|
||||||
- name: Ensure debian deps are installed
|
- name: Ensure debian deps are installed
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y --fix-missing
|
sudo apt-get update -y --fix-missing
|
||||||
sudo apt-get install -y devscripts
|
sudo apt-get install -y devscripts
|
||||||
|
|
||||||
- name: Update debian changelog
|
- name: Update debian changelog
|
||||||
run: >-
|
run: |
|
||||||
debian/ci_changelog.sh
|
# 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
|
uses: peter-evans/create-pull-request@v7
|
||||||
with:
|
with:
|
||||||
title: Bump version.properties
|
title: Bump release version
|
||||||
|
commit-message: automated bumps
|
||||||
add-paths: |
|
add-paths: |
|
||||||
version.properties
|
version.properties
|
||||||
debian/changelog
|
debian/changelog
|
||||||
|
bin/org.meshtastic.meshtasticd.metainfo.xml
|
||||||
|
@ -8,7 +8,7 @@ plugins:
|
|||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- renovate@39.238.1
|
- renovate@39.243.0
|
||||||
- prettier@3.5.3
|
- prettier@3.5.3
|
||||||
- trufflehog@3.88.23
|
- trufflehog@3.88.23
|
||||||
- yamllint@1.37.0
|
- yamllint@1.37.0
|
||||||
@ -28,7 +28,7 @@ lint:
|
|||||||
- shellcheck@0.10.0
|
- shellcheck@0.10.0
|
||||||
- black@25.1.0
|
- black@25.1.0
|
||||||
- git-diff-check
|
- git-diff-check
|
||||||
- gitleaks@8.24.2
|
- gitleaks@8.24.3
|
||||||
- clang-format@16.0.3
|
- clang-format@16.0.3
|
||||||
ignore:
|
ignore:
|
||||||
- linters: [ALL]
|
- 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>
|
</screenshots>
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
<release version="v2.6.4.b89355f" date="2025-04-10">
|
<release version="2.6.6">
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases/tag/v2.6.4.b89355f</url>
|
<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>
|
</release>
|
||||||
</releases>
|
</releases>
|
||||||
</component>
|
</component>
|
@ -50,5 +50,4 @@
|
|||||||
},
|
},
|
||||||
"url": "https://heltec.org/project/meshpocket/",
|
"url": "https://heltec.org/project/meshpocket/",
|
||||||
"vendor": "Heltec"
|
"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
|
export PLATFORMIO_CORE_DIR=pio/core
|
||||||
|
|
||||||
# Download libraries to `pio`
|
# Download libraries to `pio`
|
||||||
platformio pkg install -e native
|
platformio pkg install -e native-tft
|
||||||
platformio pkg install -e native -t platformio/tool-scons@4.40502.0
|
platformio pkg install -e native-tft -t platformio/tool-scons@4.40502.0
|
||||||
# Compress `pio` directory to prevent dh_clean from sanitizing it
|
# Compress `pio` directory to prevent dh_clean from sanitizing it
|
||||||
tar -cf pio.tar pio/
|
tar -cf pio.tar pio/
|
||||||
rm -rf pio
|
rm -rf pio
|
||||||
|
5
debian/control
vendored
5
debian/control
vendored
@ -21,7 +21,10 @@ Build-Depends: debhelper-compat (= 13),
|
|||||||
openssl,
|
openssl,
|
||||||
libssl-dev,
|
libssl-dev,
|
||||||
libulfius-dev,
|
libulfius-dev,
|
||||||
liborcania-dev
|
liborcania-dev,
|
||||||
|
libx11-dev,
|
||||||
|
libinput-dev,
|
||||||
|
libxkbcommon-x11-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
|
||||||
|
2
debian/meshtasticd.install
vendored
2
debian/meshtasticd.install
vendored
@ -1,4 +1,4 @@
|
|||||||
.pio/build/native/meshtasticd usr/sbin
|
.pio/build/native-tft/meshtasticd usr/sbin
|
||||||
|
|
||||||
bin/config.yaml etc/meshtasticd
|
bin/config.yaml etc/meshtasticd
|
||||||
bin/config.d/* etc/meshtasticd/available.d
|
bin/config.d/* etc/meshtasticd/available.d
|
||||||
|
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
|
mkdir -p web && tar -xf web.tar -C web
|
||||||
gunzip web/ -r
|
gunzip web/ -r
|
||||||
# Build with platformio
|
# 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
|
# 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
|
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
|
; Common libs for communicating over TCP/IP networks such as MQTT
|
||||||
[networking_base]
|
[networking_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=custom.pio depName=PubSubClient packageName=knolleary/library/PubSubClient
|
# renovate: datasource=custom.pio depName=TBPubSubClient packageName=thingsboard/library/TBPubSubClient
|
||||||
knolleary/PubSubClient@2.8
|
thingsboard/TBPubSubClient@2.12.1
|
||||||
# renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient
|
# renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient
|
||||||
arduino-libraries/NTPClient@3.2.1
|
arduino-libraries/NTPClient@3.2.1
|
||||||
# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog
|
# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit f9aa5cfd08cf14917fce54e5ebc0441b35ce32b3
|
Subproject commit b982b36dfab2e96b8f8be90af891c68ebf8790c2
|
@ -13,6 +13,9 @@
|
|||||||
"git-submodules": {
|
"git-submodules": {
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
|
"pip_requirements": {
|
||||||
|
"fileMatch": ["bin/bump_metainfo/requirements.txt"]
|
||||||
|
},
|
||||||
"commitMessageTopic": "{{depName}}",
|
"commitMessageTopic": "{{depName}}",
|
||||||
"labels": ["dependencies"],
|
"labels": ["dependencies"],
|
||||||
"customDatasources": {
|
"customDatasources": {
|
||||||
|
@ -219,7 +219,7 @@ bool EInkDisplay::connect()
|
|||||||
}
|
}
|
||||||
#elif defined(HELTEC_MESH_POCKET)
|
#elif defined(HELTEC_MESH_POCKET)
|
||||||
{
|
{
|
||||||
spi1=&SPI1;
|
spi1 = &SPI1;
|
||||||
spi1->begin();
|
spi1->begin();
|
||||||
// VExt already enabled in setup()
|
// VExt already enabled in setup()
|
||||||
// RTC GPIO hold disabled in setup()
|
// RTC GPIO hold disabled in setup()
|
||||||
|
@ -11,10 +11,19 @@ InkHUD::LogoApplet::LogoApplet() : concurrency::OSThread("LogoApplet")
|
|||||||
OSThread::setIntervalFromNow(8 * 1000UL);
|
OSThread::setIntervalFromNow(8 * 1000UL);
|
||||||
OSThread::enabled = true;
|
OSThread::enabled = true;
|
||||||
|
|
||||||
|
// 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 = "";
|
textLeft = "";
|
||||||
textRight = "";
|
textRight = "";
|
||||||
textTitle = xstr(APP_VERSION_SHORT);
|
textTitle = xstr(APP_VERSION_SHORT);
|
||||||
fontTitle = fontSmall;
|
}
|
||||||
|
|
||||||
bringToForeground();
|
bringToForeground();
|
||||||
// This is then drawn with a FULL refresh by Renderer::begin
|
// This is then drawn with a FULL refresh by Renderer::begin
|
||||||
|
@ -181,7 +181,7 @@ void TwoButton::isrSecondary()
|
|||||||
void TwoButton::startThread()
|
void TwoButton::startThread()
|
||||||
{
|
{
|
||||||
if (!OSThread::enabled) {
|
if (!OSThread::enabled) {
|
||||||
OSThread::setInterval(50);
|
OSThread::setInterval(10);
|
||||||
OSThread::enabled = true;
|
OSThread::enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1330,7 +1330,7 @@ extern meshtastic_DeviceMetadata getDeviceMetadata()
|
|||||||
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AUDIO_CONFIG;
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AUDIO_CONFIG;
|
||||||
#endif
|
#endif
|
||||||
// Option to explicitly include canned messages for edge cases, e.g. niche graphics
|
// 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;
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_CANNEDMSG_CONFIG;
|
||||||
#endif
|
#endif
|
||||||
#if NO_EXT_GPIO
|
#if NO_EXT_GPIO
|
||||||
@ -1338,11 +1338,11 @@ extern meshtastic_DeviceMetadata getDeviceMetadata()
|
|||||||
#endif
|
#endif
|
||||||
// Only edge case here is if we apply this a device with built in Accelerometer and want to detect interrupts
|
// 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
|
// 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;
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG;
|
||||||
#endif
|
#endif
|
||||||
// If we don't have any GPIO and we don't have GPS, no purpose in having serial config
|
// 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
|
#if NO_EXT_GPIO && NO_GPS || MESHTASTIC_EXCLUDE_SERIAL
|
||||||
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_SERIAL_CONFIG;
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_SERIAL_CONFIG;
|
||||||
#endif
|
#endif
|
||||||
#ifndef ARCH_ESP32
|
#ifndef ARCH_ESP32
|
||||||
|
@ -210,6 +210,14 @@ bool RadioLibInterface::canSleep()
|
|||||||
return res;
|
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 */
|
/** Attempt to cancel a previously sent packet. Returns true if a packet was found we could cancel */
|
||||||
bool RadioLibInterface::cancelSending(NodeNum from, PacketId id)
|
bool RadioLibInterface::cancelSending(NodeNum from, PacketId id)
|
||||||
{
|
{
|
||||||
|
@ -132,6 +132,11 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified
|
|||||||
*/
|
*/
|
||||||
virtual bool isActivelyReceiving() = 0;
|
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 */
|
/** 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;
|
virtual bool cancelSending(NodeNum from, PacketId id) override;
|
||||||
|
|
||||||
|
@ -241,6 +241,8 @@ typedef enum _meshtastic_HardwareModel {
|
|||||||
meshtastic_HardwareModel_RESERVED_FRIED_CHICKEN = 93,
|
meshtastic_HardwareModel_RESERVED_FRIED_CHICKEN = 93,
|
||||||
/* Heltec Magnetic Power Bank with Meshtastic compatible */
|
/* Heltec Magnetic Power Bank with Meshtastic compatible */
|
||||||
meshtastic_HardwareModel_HELTEC_MESH_POCKET = 94,
|
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.
|
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
|
#if HAS_NETWORKING
|
||||||
bool connectPubSub(const PubSubConfig &config, PubSubClient &pubSub, Client &client)
|
bool connectPubSub(const PubSubConfig &config, PubSubClient &pubSub, Client &client)
|
||||||
{
|
{
|
||||||
pubSub.setBufferSize(1024);
|
pubSub.setBufferSize(1024, 1024);
|
||||||
pubSub.setClient(client);
|
pubSub.setClient(client);
|
||||||
pubSub.setServer(config.serverAddr.c_str(), config.serverPort);
|
pubSub.setServer(config.serverAddr.c_str(), config.serverPort);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ void setupNicheGraphics()
|
|||||||
|
|
||||||
// SPI
|
// SPI
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
SPIClass *spi1=&SPI1;
|
SPIClass *spi1 = &SPI1;
|
||||||
spi1->begin();
|
spi1->begin();
|
||||||
// Display is connected to SPI1
|
// Display is connected to SPI1
|
||||||
|
|
||||||
|
@ -9,5 +9,3 @@ const uint32_t g_ADigitalPinMap[] = {
|
|||||||
|
|
||||||
// P1
|
// P1
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ No longer populated on PCB
|
|||||||
*/
|
*/
|
||||||
#define WIRE_INTERFACES_COUNT 1
|
#define WIRE_INTERFACES_COUNT 1
|
||||||
|
|
||||||
#define PIN_WIRE_SDA (32+15)
|
#define PIN_WIRE_SDA (32 + 15)
|
||||||
#define PIN_WIRE_SCL (32+13)
|
#define PIN_WIRE_SCL (32 + 13)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lora radio
|
* Lora radio
|
||||||
@ -73,24 +73,22 @@ No longer populated on PCB
|
|||||||
|
|
||||||
// Display (E-Ink)
|
// Display (E-Ink)
|
||||||
#define PIN_EINK_CS 24
|
#define PIN_EINK_CS 24
|
||||||
#define PIN_EINK_BUSY 32+6
|
#define PIN_EINK_BUSY 32 + 6
|
||||||
#define PIN_EINK_DC 31
|
#define PIN_EINK_DC 31
|
||||||
#define PIN_EINK_RES 32+4
|
#define PIN_EINK_RES 32 + 4
|
||||||
#define PIN_EINK_SCLK 22
|
#define PIN_EINK_SCLK 22
|
||||||
#define PIN_EINK_MOSI 20
|
#define PIN_EINK_MOSI 20
|
||||||
|
|
||||||
|
|
||||||
#define PIN_SPI1_MISO -1
|
#define PIN_SPI1_MISO -1
|
||||||
#define PIN_SPI1_MOSI PIN_EINK_MOSI
|
#define PIN_SPI1_MOSI PIN_EINK_MOSI
|
||||||
#define PIN_SPI1_SCK PIN_EINK_SCLK
|
#define PIN_SPI1_SCK PIN_EINK_SCLK
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPS pins
|
* GPS pins
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PIN_SERIAL1_RX 32+5
|
#define PIN_SERIAL1_RX 32 + 5
|
||||||
#define PIN_SERIAL1_TX 32+7
|
#define PIN_SERIAL1_TX 32 + 7
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SPI Interfaces
|
* SPI Interfaces
|
||||||
@ -112,7 +110,7 @@ No longer populated on PCB
|
|||||||
// it is defined in the anlaolgue pin section of this file
|
// it is defined in the anlaolgue pin section of this file
|
||||||
// and has 12 bit resolution
|
// and has 12 bit resolution
|
||||||
|
|
||||||
#define ADC_CTRL 32+2
|
#define ADC_CTRL 32 + 2
|
||||||
#define ADC_CTRL_ENABLED HIGH
|
#define ADC_CTRL_ENABLED HIGH
|
||||||
#define BATTERY_PIN 29
|
#define BATTERY_PIN 29
|
||||||
#define ADC_RESOLUTION 14
|
#define ADC_RESOLUTION 14
|
||||||
@ -131,5 +129,4 @@ No longer populated on PCB
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -29,6 +29,12 @@
|
|||||||
#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h"
|
#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h"
|
||||||
#include <Fonts/FreeSans9pt7b.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()
|
void setupNicheGraphics()
|
||||||
{
|
{
|
||||||
using namespace NicheGraphics;
|
using namespace NicheGraphics;
|
||||||
@ -115,13 +121,22 @@ void setupNicheGraphics()
|
|||||||
buttons->setWiring(TOUCH_BUTTON, PIN_BUTTON_TOUCH);
|
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->setTiming(TOUCH_BUTTON, 50, 5000); // 5 seconds before latch - limited by T-Echo's capacitive touch IC
|
||||||
buttons->setHandlerDown(TOUCH_BUTTON, [backlight]() {
|
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();
|
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->setHandlerLongPress(TOUCH_BUTTON, [backlight]() { backlight->latch(); });
|
||||||
buttons->setHandlerShortPress(TOUCH_BUTTON, [backlight]() { backlight->off(); });
|
buttons->setHandlerShortPress(TOUCH_BUTTON, [backlight]() { backlight->off(); });
|
||||||
|
|
||||||
|
// Begin handling button events
|
||||||
buttons->start();
|
buttons->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,3 +4,4 @@ extends = esp32_base
|
|||||||
board = ttgo-lora32-v1
|
board = ttgo-lora32-v1
|
||||||
build_flags =
|
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
|
@ -4,3 +4,4 @@ extends = esp32_base
|
|||||||
board = ttgo-lora32-v1
|
board = ttgo-lora32-v1
|
||||||
build_flags =
|
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
|
@ -5,3 +5,4 @@ board_check = true
|
|||||||
build_flags =
|
build_flags =
|
||||||
${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/tlora_v2_1_16
|
${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
|
@ -8,3 +8,4 @@ build_flags =
|
|||||||
-I variants/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 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"
|
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
||||||
-DGPS_POWER_TOGGLE
|
-DGPS_POWER_TOGGLE
|
||||||
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL=1
|
-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
|
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
|
||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/tracker-t1000-e>
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/tracker-t1000-e>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
@ -152,6 +152,8 @@ extern "C" {
|
|||||||
#define T1000X_NTC_PIN (0 + 31) // P0.31/AIN7
|
#define T1000X_NTC_PIN (0 + 31) // P0.31/AIN7
|
||||||
#define T1000X_LUX_PIN (0 + 29) // P0.29/AIN5
|
#define T1000X_LUX_PIN (0 + 29) // P0.29/AIN5
|
||||||
|
|
||||||
|
#define HAS_SCREEN 0
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[VERSION]
|
[VERSION]
|
||||||
major = 2
|
major = 2
|
||||||
minor = 6
|
minor = 6
|
||||||
build = 5
|
build = 6
|
||||||
|
Loading…
Reference in New Issue
Block a user