mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 18:43:51 +00:00
d82310636689305e295a10cad1d4cd8cf09b3a1b
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>
Languages
Pascal
96.4%
Python
2.9%
Shell
0.6%