ew8bakandClaude Sonnet 4.6 d823106366 Add VHF XVTR PA calibration; fix TX drive formula and stale FDriveLevel
PA calibration per band (HF and VHF):
- Add VHFBandCal[0..7] in TGlobalSettings (saved as vhf_cal_0..7 in JSON)
- Default HF cal updated to Thetis HERMES defaults (38.8-41.3 dB per band)
- Default VHF cal = 56.2 dB (Thetis HERMES XVTR default)
- SettingsForm: second group in PA tab "VHF Calibration (Transverters)" with
  8 spinboxes VHF0..VHF7; labels dynamically show XVTR slot ButtonText
  when LoadXvtrSettings is called (e.g. "VHF0 (2m):")

TX drive formula (CalcDriveByte) rewritten to match Thetis exactly:
  drive_byte = min(sqrt(10^((10*log10(pwr_W*1000) - Cal)/10) * 0.05) / 0.8, 1.0) * 1.02 * 255
  Cal = PA gain in dB (not a percentage); matches Thetis verified output
  (Cal=63.1 + slider=100% + PAMax=100W → drive_byte=16, verified against Thetis)
  Old formula Pos/100*Cal/100*255 was wrong: treated dB gain as linear percent

Fix stale FDriveLevel not updated on band/XVTR switch:
- Startup: FCurrentBand must be set before CalcDriveByte (was reversed)
- RestoreBand: recalculate FDriveLevel before ApplyVfoA network update
- ActivateXvtrBand: recalculate after FCurrentXvtr changes
- ApplyVfoA: recalculate when VFO crosses HF band boundary
- FreqDispBChanged: same for VFO-B band changes
- ApplyMOX(True): safety recalculate at PTT engage time

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 11:49:12 +03:00
2026-03-26 22:50:55 +03:00
2026-03-09 18:48:24 +03:00
2026-04-22 22:09:42 +03:00
2026-03-09 18:48:24 +03:00
2026-05-07 22:49:52 +03:00
2026-05-02 13:39:46 +03:00
2026-05-02 13:39:46 +03:00
2026-05-11 18:57:26 +03:00
2026-03-09 18:48:24 +03:00
2026-03-09 18:48:24 +03:00
2026-03-05 16:19:26 +03:00
2026-03-05 16:19:26 +03:00
2026-03-05 16:19:26 +03:00
2026-03-05 16:19:26 +03:00
S
Description
No description provided
Readme GPL-2.0
13 MiB
Languages
Pascal 96.4%
Python 2.9%
Shell 0.6%