fix: bugs

This commit is contained in:
2026-07-17 11:55:40 +02:00
parent cd13921322
commit 1a155e3627
4 changed files with 62 additions and 14 deletions
+18 -3
View File
@@ -7765,16 +7765,31 @@ type ConfirmationItem struct {
}
// GetSlotStats returns the worked/confirmed slot + DXCC tallies for the QSL
// Manager. Slots are counted by mode CLASS (Phone/CW/Digital); the raw-mode
// granularity (RTTY ≠ FT8) is kept only for the cluster/matrix "new slot" flag.
// Manager. It counts over the SAME data path as the DXCC award, using the
// award's confirmation test (award.Confirmed with the DXCC sources lotw+qsl),
// so the numbers agree with the DXCC award matrix. A slot is a distinct
// DXCC × band (mode-agnostic) — i.e. the award's WORKED/CONFIRMED "Grand"
// totals, NOT split per emission.
func (a *App) GetSlotStats() qso.SlotStats {
if a.qso == nil {
return qso.SlotStats{}
}
st, err := a.qso.GetSlotStats(a.ctx)
// Delegate to the exact same matrix the DXCC award draws: the "WORKED"/
// "CONFIRMED" (ALL-emission) rows give DXCC entities (Total) and slots =
// entity × band (GrandTotal). Guaranteed to equal the award's Grand column.
res, err := a.GetAwardStats("DXCC")
if err != nil {
return qso.SlotStats{}
}
var st qso.SlotStats
for _, r := range res.Rows {
switch r.Label {
case "WORKED":
st.SlotsWorked, st.DXCCWorked = r.GrandTotal, r.Total
case "CONFIRMED":
st.SlotsConfirmed, st.DXCCConfirmed = r.GrandTotal, r.Total
}
}
return st
}