Clarify that outputDrive controls only the composite signal path while PlutoSDR hardware gain stays fixed at 0 dB. Relax outputDrive validation to allow stronger composite drive during hardware tuning and update the Pluto example config accordingly.tags/v0.7.0-pre
| @@ -147,11 +147,12 @@ func runTXMode(cfg cfgpkg.Config, driver platform.SoapyDriver, autoStart bool) { | |||||
| defer cancel() | defer cancel() | ||||
| // Configure driver | // Configure driver | ||||
| // Gain mapping: outputDrive 1.0 = max power (0 dB atten), 0.0 = min (-89 dB) | |||||
| // OutputDrive controls composite signal level, NOT hardware gain. | |||||
| // Hardware TX gain is always 0 dB (max power). Use external attenuator for power control. | |||||
| soapyCfg := platform.SoapyConfig{ | soapyCfg := platform.SoapyConfig{ | ||||
| Driver: cfg.Backend.Device, | Driver: cfg.Backend.Device, | ||||
| CenterFreqHz: cfg.FM.FrequencyMHz * 1e6, | CenterFreqHz: cfg.FM.FrequencyMHz * 1e6, | ||||
| GainDB: (1.0 - cfg.FM.OutputDrive) * 89, // 1.0→0dB(max), 0.5→44.5dB atten, 0.0→89dB(min) | |||||
| GainDB: 0, // 0 dB = max TX power on PlutoSDR | |||||
| } | } | ||||
| soapyCfg.SampleRateHz = cfg.EffectiveDeviceRate() | soapyCfg.SampleRateHz = cfg.EffectiveDeviceRate() | ||||
| @@ -19,7 +19,7 @@ | |||||
| "pilotLevel": 0.1, | "pilotLevel": 0.1, | ||||
| "rdsInjection": 0.05, | "rdsInjection": 0.05, | ||||
| "preEmphasisTauUS": 50, | "preEmphasisTauUS": 50, | ||||
| "outputDrive": 1.0, | |||||
| "outputDrive": 1.8, | |||||
| "compositeRateHz": 228000, | "compositeRateHz": 228000, | ||||
| "maxDeviationHz": 75000, | "maxDeviationHz": 75000, | ||||
| "limiterEnabled": true, | "limiterEnabled": true, | ||||
| @@ -128,8 +128,8 @@ func (c Config) Validate() error { | |||||
| if c.FM.RDSInjection < 0 || c.FM.RDSInjection > 0.15 { | if c.FM.RDSInjection < 0 || c.FM.RDSInjection > 0.15 { | ||||
| return fmt.Errorf("fm.rdsInjection out of range") | return fmt.Errorf("fm.rdsInjection out of range") | ||||
| } | } | ||||
| if c.FM.OutputDrive < 0 || c.FM.OutputDrive > 1 { | |||||
| return fmt.Errorf("fm.outputDrive out of range") | |||||
| if c.FM.OutputDrive < 0 || c.FM.OutputDrive > 3 { | |||||
| return fmt.Errorf("fm.outputDrive out of range (0..3)") | |||||
| } | } | ||||
| if c.FM.CompositeRateHz < 96000 || c.FM.CompositeRateHz > 1520000 { | if c.FM.CompositeRateHz < 96000 || c.FM.CompositeRateHz > 1520000 { | ||||
| return fmt.Errorf("fm.compositeRateHz out of range") | return fmt.Errorf("fm.compositeRateHz out of range") | ||||