Skip to content

Fix: several rigcontrol related fixes#458

Open
ceotjoe wants to merge 7 commits intoaccius:mainfrom
ceotjoe:fix/rigcontrol_fixes
Open

Fix: several rigcontrol related fixes#458
ceotjoe wants to merge 7 commits intoaccius:mainfrom
ceotjoe:fix/rigcontrol_fixes

Conversation

@ceotjoe
Copy link
Contributor

@ceotjoe ceotjoe commented Feb 16, 2026

This PR contains a comprehensive set of fixes and improvements for rig control functionality across all panels and layouts, plus documentation for HTTPS deployment scenarios.

Summary

  • ✅ Fixed WSJT-X frequency tuning bug
  • ✅ Fixed POTA/WWFF VHF/UHF frequency handling
  • ✅ Standardized rig control across all panels
  • ✅ Preserved rig-config.json during updates
  • ✅ Added comprehensive rig control documentation

Bug Fixes

WSJT-X Frequency Calculation

Problem: WSJT-X decodes were sending delta frequency (audio offset, e.g., 1234 Hz) to rig control instead of actual operating frequency.

Solution: Calculate actual operating frequency as dialFrequency for WSJT-X decodes while preserving original behavior for other spot types.

Impact: All layouts (Modern, Classic, Dockable) now correctly tune to WSJT-X decodes.

Files Changed:

  • src/DockableApp.jsx - Added WSJT-X frequency calculation in handleSpotClick
  • src/contexts/RigContext.jsx - Added WSJT-X handling in tuneTo function

POTA/WWFF VHF/UHF Frequency Handling

Problem: High frequencies (>100 MHz) were incorrectly converted in park panels. Values like 144.300 MHz were treated as kHz, resulting in 144300 Hz instead of 144300000 Hz.

Solution:

  • Pass spot objects directly to tuneTo() which has robust frequency conversion logic
  • Convert POTA/WWFF frequencies from kHz to MHz in data processing
  • Standardize frequency display formatting with .toFixed(3) for consistency

Files Changed:

  • src/layouts/ModernLayout.jsx
  • src/layouts/ClassicLayout.jsx
  • src/hooks/usePOTASpots.js
  • src/hooks/useWWFFSpots.js
  • src/components/POTAPanel.jsx
  • src/components/WWFFPanel.jsx
  • src/components/SOTAPanel.jsx

Rig Config Preservation During Updates

Problem: User customizations to rig-config.json were lost during updates.

Solution:

  • Created rig-config.json.example as tracked template
  • Added rig-config.json to .gitignore
  • Updated update.sh to backup and restore config during updates
  • Auto-create config from example on first run

Files Changed:

  • rig-control/rig-config.json.example (new)
  • rig-control/.gitignore
  • update.sh
  • rig-control/rig-daemon.js
  • rig-control/README.md
  • UserGuide.md

Refactoring

Standardized Rig Control Pattern

Refactored all panels to use consistent callback pattern for better maintainability:

  • POTAPanel: Switched from direct useRig hook to callback pattern
  • WWFFPanel: Added rig control support (new feature)
  • All layouts: Handle frequency conversion and mode detection centrally

Benefits:

  • Better separation of concerns
  • Consistent behavior across all panels
  • Easier to maintain and debug

Documentation

Rig Control Comparison Guide

Created comprehensive RIG_CONTROL_COMPARISON.md comparing all three rig control solutions:

  • Rig Listener (standalone executable)
  • Rig Bridge (Node.js daemon with direct USB)
  • Rig Control Daemon (proxy to rigctld/flrig)

Includes:

  • Quick decision guide based on use case
  • Pros/cons for each solution
  • Setup instructions
  • Troubleshooting tips
  • USB port exclusivity warnings

HTTPS Mixed Content Documentation

Added troubleshooting section to rig-control/README.md:

  • Explains HTTPS/HTTP mixed content blocking
  • Browser-specific behavior (Safari vs Chrome/Firefox)
  • Workarounds and solutions
  • Recommends internal proxy for HTTPS deployments

Testing

All changes have been tested with:

  • ✅ POTA spots on VHF/UHF (144 MHz, 432 MHz)
  • ✅ WWFF spots on HF and VHF
  • ✅ DX Cluster spots
  • ✅ All three layouts (Modern, Classic, Dockable)

WSJT-X decodes on HF bands (FT8) need testing like I have currently no working setup to test that.

Breaking Changes

None. All changes are backward compatible.

Related Issues

Fixes frequency tuning issues reported in user testing.

- Created rig-config.json.example as tracked template
- Added rig-config.json to .gitignore to prevent tracking user customizations
- Updated update.sh to backup and restore rig-config.json during updates
- Updated rig-daemon.js to auto-create config from example on first run
- Updated README.md and UserGuide.md to document the new system

User customizations to rig-config.json will now be preserved across updates.
- Refactored POTAPanel to use callback pattern instead of direct useRig hook
- Added rig control to WWFFPanel (new feature)
- Updated PotaSotaPanel to pass onSpotClick callbacks to child panels
- Added handleParkSpotClick functions to ModernLayout and ClassicLayout
- Updated DockableApp to pass onSpotClick to POTA and WWFF panels

All panels now use consistent callback pattern for better maintainability
and separation of concerns. Layouts handle frequency conversion and mode
detection centrally.
All park panels (POTA, WWFF, SOTA) now format frequencies consistently
with DX Cluster using .toFixed(3) for 3 decimal places. This ensures
frequencies like 144.3 MHz display as 144.300 for consistency.
Fixed bug where high frequencies (>100 MHz) were incorrectly converted
in handleParkSpotClick. The manual conversion logic was flawed - it
treated values like 144.300 MHz as kHz, resulting in 144300 Hz instead
of 144300000 Hz.

Solution: Pass the spot object directly to tuneTo() which already has
robust frequency conversion logic that handles all formats correctly.
This matches how DX Cluster handles spot clicks.

Also removed unused detectMode import since tuneTo handles mode detection.
- Created RIG_CONTROL_COMPARISON.md comparing all three rig control solutions
- Includes quick decision guide based on use case
- Documents USB port exclusivity limitation for direct USB solutions
- Added Mixed Content (HTTPS/HTTP) troubleshooting to rig-control README
- Highlights Safari's strict blocking vs Chrome/Firefox workarounds
- Recommends internal proxy solution for HTTPS deployments
WSJT-X decodes contain two frequency values:
- dialFrequency: Radio VFO frequency in Hz (e.g., 14074000)
- freq: Audio delta frequency in Hz (e.g., 1234)

The delta frequency is just the audio offset within the passband where
the signal was decoded. When tuning the rig, we should use only the
dial frequency, not dial + delta.

Fixed by using dialFrequency directly for WSJT-X decodes while
preserving original behavior for other spot types (DX Cluster, POTA,
WWFF, SOTA).

Changes:
- DockableApp.jsx: Use dialFrequency only for WSJT-X spots
- RigContext.jsx: Use dialFrequency only in tuneTo function

This fix applies to all layouts (Modern, Classic, Dockable) as they
all use the tuneTo function from RigContext.

UI display unchanged - still shows delta frequency as expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant