test(lotw): VUCC up to 4 grids in one contact; clarify comment

This commit is contained in:
atsunatsu committed 2026-09-08 02:51:24 +08:00
1 parent 39d4498a54
commit 2c5b1479f1
2 files changed
+14 -2

No files matched your search

@@ -194,8 +194,9 @@ class LoTWRepository : ILoTWRepository {
line.startsWith("<BAND:") && !line.startsWith("<BAND_RX:") ->
bandDown = adifValue(line).uppercase()
line.startsWith("<GRIDSQUARE:") || line.startsWith("<VUCC_GRIDS:") -> {
// VUCC_GRIDS holds a comma-separated PAIR of grids
// ("EN52en,EN53fa"); split and keep every 4-char field.
// VUCC_GRIDS holds a comma-separated list of grids
// ("EN52en,EN53fa"), up to four for contacts spanning
// several squares; split and keep every 4-char field.
adifValue(line).split(',').forEach { grid ->
val field = grid.trim().uppercase()
if (field.length >= 4) gridsInRecord.add(field.take(4))