docs(lora): clarify TX power accepts signed/negative values#3459
Conversation
Users noted Meshtastic firmware permits negative TX power. Verified: config.lora.tx_power is a signed int32 and firmware applies upper-bound clamping only (no lower clamp), so negatives pass through to RadioLib and are radio-dependent (meaningful on e.g. SX126x). MeshMonitor already accepts negatives end-to-end — no UI input clamps them to 0 (the only min="0" attributes in the LoRa forms belong to channelNum/other fields, not txPower). Update the help text to document that 0 = default max and negatives are permitted but radio-dependent. No input constraints added (intentional). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review Complete ✅I've thoroughly reviewed this pull request and analyzed the documentation change for TX power values. Review Checklist:
Review Feedback✅ Excellent Documentation UpdateThis is a well-researched and helpful documentation improvement. The change accurately documents existing behavior rather than introducing new functionality. What Changed
Code Quality Assessment✅ Accurate Documentation:
✅ Consistency Check:
✅ Technical Accuracy:
Security, Performance, and Bugs✅ No Security Concerns: Pure documentation change with no code logic modifications. ✅ No Performance Impact: Localization string update only. ✅ No Bugs Introduced: The change documents existing behavior accurately. Test Coverage✅ No Tests Needed: This is a help text update that doesn't require test coverage. The underlying TX power functionality is already working as documented. Recommendations
SummaryThis is an exemplary documentation PR that:
Recommendation: ✅ APPROVE - This change enhances user understanding without introducing any risks. Job Run: |
Bump version to 4.10.3 across package.json, package-lock.json, helm/meshmonitor/Chart.yaml, desktop/package.json, and desktop/src-tauri/tauri.conf.json. Finalize the CHANGELOG: promote [Unreleased] to [4.10.3] and add the entries merged after the section was last written — MQTT NodeInfo clobber fix (#3456), Traffic Management/StatusMessage firmware-version gate (#3457), local-node module config storage (#3460), phantom channel swap fix (#3453), and the TX power help-text clarification (#3459). Add a release blog post highlighting the Traffic Management detection fix and the bug-fix round. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Context
Users reported that Meshtastic firmware permits negative TX power values. This PR verifies the claim and documents the behavior. No input constraints were added — negatives are intentionally left accepted.
Findings
Firmware (verified):
Config.LoRaConfig.tx_poweris a signedint32(on-device narrowed toint8_t). Negative values are representable on the wire.0is a documented sentinel = "use the default maximum safe power for your hardware."setOutputPower(), where behavior is chip-defined. Meaningful on radios like SX126x (down to ~-9 dBm); undefined elsewhere.MeshMonitor (verified):
LoRaConfigSection.tsx:405,RadioConfigurationSection.tsx:233,AdminCommandsTab.tsx:2716) are baretype="number"with nomin/max.Math.max(0, …)/clamp ontxPoweranywhere, and the onlymin="0"attributes in the LoRa forms belong tochannelNumand other unrelated fields — nottxPower.txPowerthrough unmodified.Change
Updates the
lora_config.tx_power_descriptionhelp text (en) to state that 0 = default max and that negative values are permitted but radio-dependent. No code/validation changes.🤖 Generated with Claude Code