From f28f6a86831b03911180dfa03ff602d8cadd3992 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 3 Aug 2024 07:36:38 +0200 Subject: [PATCH 1/4] set 599 also for CW-* modes --- assets/js/sections/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index 634dfe733..7c9346a96 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -5,7 +5,7 @@ function setRst(mode) { } else if (mode == 'FSK441' || mode == 'JT6M') { $('#rst_sent').val('26'); $('#rst_rcvd').val('26'); - } else if (mode == 'CW' || mode == 'RTTY' || mode == 'PSK31' || mode == 'PSK63') { + } else if (mode == 'CW' || mode.startsWith('CW-') || mode == 'RTTY' || mode == 'PSK31' || mode == 'PSK63') { $('#rst_sent').val('599'); $('#rst_rcvd').val('599'); } else { From b32228e69911d2bbcfb78607bbd736d516543aaa Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 3 Aug 2024 13:31:45 +0200 Subject: [PATCH 2/4] revert "set 599 also for CW-* modes" --- assets/js/sections/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index 7c9346a96..634dfe733 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -5,7 +5,7 @@ function setRst(mode) { } else if (mode == 'FSK441' || mode == 'JT6M') { $('#rst_sent').val('26'); $('#rst_rcvd').val('26'); - } else if (mode == 'CW' || mode.startsWith('CW-') || mode == 'RTTY' || mode == 'PSK31' || mode == 'PSK63') { + } else if (mode == 'CW' || mode == 'RTTY' || mode == 'PSK31' || mode == 'PSK63') { $('#rst_sent').val('599'); $('#rst_rcvd').val('599'); } else { From 3c8bdd3b8a54e1e5d05353696a1cfa5838c5a1c1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 3 Aug 2024 13:32:02 +0200 Subject: [PATCH 3/4] map CW-U and CW-L to CW --- application/controllers/Api.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/controllers/Api.php b/application/controllers/Api.php index ef31f0e5e..9de659785 100644 --- a/application/controllers/Api.php +++ b/application/controllers/Api.php @@ -552,6 +552,12 @@ class API extends CI_Controller { $user_id = $this->api_model->key_userid($obj['key']); + // Special Case: Yaesu Radio's use CW-U and CW-L which aren't official ADIF Modes. We override this here to CW + if (isset($obj['mode']) && (strtoupper($obj['mode']) == 'CW-U' || strtoupper($obj['mode']) == 'CW-L')) { + $obj['mode'] = 'CW'; + log_message('info', 'CW-U and CW-L are not official adif modes. Therefore the mode is overwritten to CW'); + } + // Store Result to Database $this->cat->update($obj, $user_id); From e71e9ffc385022ba50bb4a8d177f51f5df759f55 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 4 Aug 2024 08:17:20 +0200 Subject: [PATCH 4/4] remove logging --- application/controllers/Api.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/controllers/Api.php b/application/controllers/Api.php index 9de659785..a2bdd5a83 100644 --- a/application/controllers/Api.php +++ b/application/controllers/Api.php @@ -555,7 +555,6 @@ class API extends CI_Controller { // Special Case: Yaesu Radio's use CW-U and CW-L which aren't official ADIF Modes. We override this here to CW if (isset($obj['mode']) && (strtoupper($obj['mode']) == 'CW-U' || strtoupper($obj['mode']) == 'CW-L')) { $obj['mode'] = 'CW'; - log_message('info', 'CW-U and CW-L are not official adif modes. Therefore the mode is overwritten to CW'); } // Store Result to Database