fixed detection of cw rst if 3 digits are given

This commit is contained in:
HB9HIL 2023-10-31 10:26:15 +01:00
parent e6c485fc27
commit 4c9241e4c8

View File

@ -117,7 +117,7 @@ function handleInput() {
)
) {
callsign = item.toUpperCase();
} else if (itemNumber > 0 && item.match(/^\d{1,2}$/)) {
} else if (itemNumber > 0 && item.match(/^\d{1,3}$/)) {
if (rst_s === null) {
rst_s = item;
} else {
@ -527,6 +527,9 @@ function getReportByMode(rst, mode) {
if (rst.length === 1) {
return "5" + rst;
}
if (rst.length === 3) {
return rst.slice(0, 2);
}
return rst;
}