Correct FT4 mode designation for ADIF v3.1.0 and later

FT4 -> <mode:4>MFSK <submode:3>FT4

When reading ADIF records <mode:3>FT4 is acceptable as well.
This commit is contained in:
Bill Somerville 2019-05-22 02:23:04 +01:00
parent 350391d66e
commit 6507fedec3
2 changed files with 14 additions and 2 deletions

View File

@ -332,10 +332,15 @@ namespace
// will parse a record
{
auto const& entity = prefixes->lookup (call);
auto mode = extractField (record, "MODE").toUpper ();
if (!mode.size () || "MFSK" == mode)
{
mode = extractField (record, "SUBMODE").toUpper ();
}
worked.emplace (call.toUpper ()
, extractField (record, "GRIDSQUARE").left (4).toUpper () // not interested in 6-digit grids
, extractField (record, "BAND").toUpper ()
, extractField (record, "MODE").toUpper ()
, mode
, entity.entity_name
, entity.continent
, entity.CQ_zone

View File

@ -69,7 +69,14 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q
QString t;
t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall;
t += " <gridsquare:" + QString::number(hisGrid.length()) + ">" + hisGrid;
if (mode != "FT4")
{
t += " <mode:" + QString::number(mode.length()) + ">" + mode;
}
else
{
t += " <mode:4>MFSK <submode:" + QString::number(mode.length()) + ">" + mode;
}
t += " <rst_sent:" + QString::number(rptSent.length()) + ">" + rptSent;
t += " <rst_rcvd:" + QString::number(rptRcvd.length()) + ">" + rptRcvd;
t += " <qso_date:8>" + dateTimeOn.date().toString("yyyyMMdd");