fix(web): handle imperial altitude conversion in fixed position - #1414
fix(web): handle imperial altitude conversion in fixed position#1414RuffR1d3r wants to merge 1 commit into
Conversation
Fixes meshtastic#1051 - Add unitConversion helpers (meters<->feet) with pure functions - Position form now converts display units (feet) to canonical meters on submit and back on display, handling browser location too - Fixes: 1025 ft now correctly stores as 312m and displays as 1024 ft instead of requiring manual meter entry while label says Feet Signed-off-by: RuffR1d3r <76077201+RuffR1d3r@users.noreply.github.com>
|
@RuffR1d3r is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAltitude conversion utilities now support imperial display units. Position values convert between meters and feet when displayed or submitted. The altitude input uses whole-unit increments, with tests covering normal, round-trip, zero, and negative values. ChangesAltitude unit handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR converts fixed-position altitude between display units and canonical meters on read, submit, and browser-location updates; no actionable merge-blocking risk remains beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the problem, links issue Full details: Linked Issues checkExplanation The changes satisfy issue
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #1051
Fixed position altitude now respects Display Units.
Position.altitude int32)Position.tsxconverts meters→feet for display and feet→meters on submitunitConversion.tshelpers, 6 tests covering 1025 ft ↔ 312 m round-tripTesting:
pnpm vitest run247/247 (6 new)pnpm tsc --noEmit44/44Summary by CodeRabbit
New Features
Bug Fixes