fix: padlocks unclickable, From-radio level inert, callsign field too narrow
Padlocks. LockBtn was declared INSIDE the App component, so every render gave React a new component type and the button was unmounted and rebuilt — about four times a second while the CAT polls. It flickered under the pointer and swallowed clicks, because the node being clicked no longer existed when the click landed. The padlock now lives at module level and is passed its state. From-radio level. It reached the QSO recorder and nothing else, so an operator listening through OpsLog heard no difference between 10% and 150% — the control was not weak, it was disconnected. It now scales the monitor too, applied on the captured chunk so the network-fed path keeps its own levels, and a running monitor picks up a change immediately: making someone restart the monitor to hear the slider is how a working control gets reported as broken. Callsign field widened to w-56, the room coming from the RST pair which never needs more than five characters. It is the one field always typed into, it carries the REC badges, and a long portable call has to stay readable.
This commit is contained in:
@@ -1220,6 +1220,15 @@ func (a *App) startup(ctx context.Context) {
|
||||
}
|
||||
})
|
||||
a.qsoRec = audio.NewRecorder()
|
||||
if a.audioMgr != nil {
|
||||
// A running monitor picks the new level up immediately: the operator is
|
||||
// listening while they move the slider, and asking them to stop and
|
||||
// restart it to hear the change is how a working control gets reported
|
||||
// as broken.
|
||||
if cfg, err := a.GetAudioSettings(); err == nil {
|
||||
a.audioMgr.SetMonitorGain(cfg.FromGain)
|
||||
}
|
||||
}
|
||||
a.startQSORecorderIfEnabled()
|
||||
|
||||
// NET Control store (global JSON, shared across logbooks).
|
||||
@@ -7051,6 +7060,12 @@ func (a *App) SaveAudioSettings(s AudioSettings) error {
|
||||
}
|
||||
// Apply device/preroll/enable changes to the running recorder.
|
||||
a.startQSORecorderIfEnabled()
|
||||
// And to a monitor ALREADY RUNNING: the operator is listening while they
|
||||
// move the slider. Making them stop and restart the monitor to hear the
|
||||
// change is how a working control gets reported as doing nothing.
|
||||
if a.audioMgr != nil {
|
||||
a.audioMgr.SetMonitorGain(s.FromGain)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -8900,6 +8915,7 @@ func (a *App) AudioStartMonitor() error {
|
||||
return fmt.Errorf(`no "From radio" capture device set — pick the rig's USB Audio CODEC in Settings → Audio`)
|
||||
}
|
||||
applog.Printf("audio: RX monitor start (from=%q → listen=%q)", cfg.FromRadio, cfg.ListeningDevice)
|
||||
a.audioMgr.SetMonitorGain(cfg.FromGain)
|
||||
return a.audioMgr.StartMonitor(cfg.FromRadio, cfg.ListeningDevice)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user