Add AS3935 lightning sensor telemetry fields#981
Draft
ndoo wants to merge 1 commit into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This was referenced Jul 7, 2026
Adds lightning_strike_count_1h and lightning_distance_km to EnvironmentMetrics (reset on a rolling ~1h window, matching the rainfall_1h precedent), and an AS3935 entry to TelemetrySensorType, to support meshtastic/firmware#10774. Assisted-by: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo
force-pushed
the
feat/as3935-lightning-sensor
branch
from
July 7, 2026 18:57
83a364c to
f10075c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds the schema needed to support an AS3935 lightning-detection sensor in
meshtastic/firmware(companion firmware PR: meshtastic/firmware#10931, branchfeat/as3935-lightning-sensoronmesh-malaysia/meshtastic-firmware).In
meshtastic/telemetry.proto:EnvironmentMetrics.lightning_strike_count_1h(uint32, field 24) — lightning strikes detected in the last hour, matching therainfall_1hnaming convention.EnvironmentMetrics.lightning_distance_km(float, field 25) — estimated distance to the leading edge of the storm for the most recently detected strike in the current window, valid only when a genuine strike (not noise/disturber) was classified.TelemetrySensorType.AS3935(enum value 55).Field numbers were the next free slots in both
EnvironmentMetrics(last used: 23,one_wire_temperature) andTelemetrySensorType(last used: 54,SPA06).Checklist before merging
Note: this repo's
developbranch (notmaster) is whatmeshtastic/firmware's owndevelopbranch submodule-pins to — this PR targetsdevelopaccordingly.