diff --git a/.github/meshtastic_logo.png b/.github/meshtastic_logo.png
new file mode 100644
index 000000000..11c5db18c
Binary files /dev/null and b/.github/meshtastic_logo.png differ
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index e249823a7..7a35e2b99 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -4,9 +4,11 @@ on:
- cron: 0 8 * * 1-5
workflow_dispatch: {}
+permissions: read-all
+
jobs:
trunk_check:
- name: Trunk Check Upload
+ name: Trunk Check and Upload
runs-on: ubuntu-latest
steps:
@@ -14,6 +16,20 @@ jobs:
uses: actions/checkout@v4
- name: Trunk Check
- uses: trunk-io/trunk-action@782e83f803ca6e369f035d64c6ba2768174ba61b
+ uses: trunk-io/trunk-action@v1
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}
+
+ trunk_upgrade:
+ name: Trunk Upgrade (PR)
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write # For trunk to create PRs
+ pull-requests: write # For trunk to create PRs
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ # See https://github.com/trunk-io/trunk-action/blob/v1/readme.md#automatic-upgrades
+ - name: Trunk Upgrade
+ uses: trunk-io/trunk-action/upgrade@v1
diff --git a/.github/workflows/trunk_annotate.pr.yml b/.github/workflows/trunk_annotate.pr.yml
new file mode 100644
index 000000000..ac5cdc0d5
--- /dev/null
+++ b/.github/workflows/trunk_annotate.pr.yml
@@ -0,0 +1,26 @@
+name: Annotate PR with trunk issues
+# See: https://github.com/trunk-io/trunk-action/blob/v1/readme.md#getting-inline-annotations-for-fork-prs
+
+on:
+ workflow_run:
+ workflows: [Pull Request] # Name from `trunk_check.yml`
+ types: [completed]
+
+permissions: read-all
+
+jobs:
+ trunk_check:
+ name: Trunk Code Quality Annotate
+ runs-on: ubuntu-latest
+ permissions:
+ checks: write # For trunk to post annotations
+ contents: read # For repo checkout
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Trunk Check
+ uses: trunk-io/trunk-action@v1
+ with:
+ post-annotations: true
diff --git a/.github/workflows/trunk-check.yml b/.github/workflows/trunk_check.yml
similarity index 100%
rename from .github/workflows/trunk-check.yml
rename to .github/workflows/trunk_check.yml
diff --git a/README.md b/README.md
index ca8a924fd..f34bf1839 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,7 @@
-# Meshtastic Firmware
+
+
+

+
Meshtastic Firmware

[](https://github.com/meshtastic/firmware/actions/workflows/ci.yml)
@@ -6,13 +9,31 @@
[](https://opencollective.com/meshtastic/)
[](https://vercel.com?utm_source=meshtastic&utm_campaign=oss)
+

+
+
+
+
+
+
+
## Overview
-This repository contains the device firmware for the Meshtastic project.
+This repository contains the official device firmware for Meshtastic, an open-source LoRa mesh networking project designed for long-range, low-power communication without relying on internet or cellular infrastructure. The firmware supports various hardware platforms, including ESP32, nRF52, RP2040/RP2350, and Linux-based devices.
-- **[Building Instructions](https://meshtastic.org/docs/development/firmware/build)**
-- **[Flashing Instructions](https://meshtastic.org/docs/getting-started/flashing-firmware/)**
+Meshtastic enables text messaging, location sharing, and telemetry over a decentralized mesh network, making it ideal for outdoor adventures, emergency preparedness, and remote operations.
+
+### Get Started
+
+- 🔧 **[Building Instructions](https://meshtastic.org/docs/development/firmware/build)** – Learn how to compile the firmware from source.
+- ⚡ **[Flashing Instructions](https://meshtastic.org/docs/getting-started/flashing-firmware/)** – Install or update the firmware on your device.
+
+Join our community and help improve Meshtastic! 🚀
## Stats
-
+
diff --git a/src/mesh/compression/unishox2.h b/src/mesh/compression/unishox2.h
index 5e2cc8b4c..823128f02 100644
--- a/src/mesh/compression/unishox2.h
+++ b/src/mesh/compression/unishox2.h
@@ -291,8 +291,8 @@ extern int unishox2_decompress_simple(const char *in, int len, char *out);
* @param[in] olen length of 'out' buffer in bytes. Can be omitted if sufficient buffer is provided
* @param[in] usx_hcodes Horizontal codes (array of bytes). See macro section for samples.
* @param[in] usx_hcode_lens Length of each element in usx_hcodes array
- * @param[in] usx_freq_seq Frequently occuring sequences. See USX_FREQ_SEQ_* macros for samples
- * @param[in] usx_templates Templates of frequently occuring patterns. See USX_TEMPLATES macro.
+ * @param[in] usx_freq_seq Frequently occurring sequences. See USX_FREQ_SEQ_* macros for samples
+ * @param[in] usx_templates Templates of frequently occurring patterns. See USX_TEMPLATES macro.
*/
extern int unishox2_compress(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen),
const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[], const char *usx_freq_seq[],
@@ -310,8 +310,8 @@ extern int unishox2_compress(const char *in, int len, UNISHOX_API_OUT_AND_LEN(ch
* @param[in] olen length of 'out' buffer in bytes. Can be omitted if sufficient buffer is provided
* @param[in] usx_hcodes Horizontal codes (array of bytes). See macro section for samples.
* @param[in] usx_hcode_lens Length of each element in usx_hcodes array
- * @param[in] usx_freq_seq Frequently occuring sequences. See USX_FREQ_SEQ_* macros for samples
- * @param[in] usx_templates Templates of frequently occuring patterns. See USX_TEMPLATES macro.
+ * @param[in] usx_freq_seq Frequently occurring sequences. See USX_FREQ_SEQ_* macros for samples
+ * @param[in] usx_templates Templates of frequently occurring patterns. See USX_TEMPLATES macro.
*/
extern int unishox2_decompress(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen),
const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[], const char *usx_freq_seq[],
@@ -344,4 +344,4 @@ extern int unishox2_decompress_lines(const char *in, int len, UNISHOX_API_OUT_AN
const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[],
const char *usx_freq_seq[], const char *usx_templates[], struct us_lnk_lst *prev_lines);
-#endif
\ No newline at end of file
+#endif
diff --git a/src/serialization/MeshPacketSerializer.cpp b/src/serialization/MeshPacketSerializer.cpp
index 2f0d881f2..2c1dc0ca7 100644
--- a/src/serialization/MeshPacketSerializer.cpp
+++ b/src/serialization/MeshPacketSerializer.cpp
@@ -220,7 +220,11 @@ std::string MeshPacketSerializer::JsonSerialize(const meshtastic_MeshPacket *mp,
if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_RouteDiscovery_msg,
&scratch)) {
decoded = &scratch;
- JSONArray route; // Route this message took
+ JSONArray route; // Route this message took
+ JSONArray routeBack; // Route this message took back
+ JSONArray snrTowards; // Snr for forward route
+ JSONArray snrBack; // Snr for reverse route
+
// Lambda function for adding a long name to the route
auto addToRoute = [](JSONArray *route, NodeNum num) {
char long_name[40] = "Unknown";
@@ -236,7 +240,24 @@ std::string MeshPacketSerializer::JsonSerialize(const meshtastic_MeshPacket *mp,
}
addToRoute(&route, mp->from); // Ended at the original destination (source of response)
+ addToRoute(&routeBack, mp->from); // Started at the original destination (source of response)
+ for (uint8_t i = 0; i < decoded->route_back_count; i++) {
+ addToRoute(&routeBack, decoded->route_back[i]);
+ }
+ addToRoute(&routeBack, mp->to); // Ended at the original transmitter (destination of response)
+
+ for (uint8_t i = 0; i < decoded->snr_back_count; i++) {
+ snrBack.push_back(new JSONValue((float)decoded->snr_back[i] / 4));
+ }
+
+ for (uint8_t i = 0; i < decoded->snr_towards_count; i++) {
+ snrTowards.push_back(new JSONValue((float)decoded->snr_towards[i] / 4));
+ }
+
msgPayload["route"] = new JSONValue(route);
+ msgPayload["route_back"] = new JSONValue(routeBack);
+ msgPayload["snr_back"] = new JSONValue(snrBack);
+ msgPayload["snr_towards"] = new JSONValue(snrTowards);
jsonObj["payload"] = new JSONValue(msgPayload);
} else if (shouldLog) {
LOG_ERROR(errStr, msgType.c_str());