From 9e2d63332650914371ff8fee2f572b30ccdeb343 Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Tue, 18 Feb 2025 18:54:32 +0100 Subject: [PATCH] [Cat API] Added CWU and CWL --- application/controllers/Api.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/application/controllers/Api.php b/application/controllers/Api.php index 797cbbeea..83588a608 100644 --- a/application/controllers/Api.php +++ b/application/controllers/Api.php @@ -600,11 +600,17 @@ class API extends CI_Controller { $operator = $user_id; } - // 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'; + // Special Case: Yaesu Radio's use CW-U and CW-L which aren't official ADIF Modes. Flex 3000 uses CWU and CWL. We override this here to CW + switch (strtoupper($obj['mode'] ?? '')) { + case 'CW-U': + case 'CW-L': + case 'CWU': + case 'CWL': + $obj['mode'] = 'CW'; + break; } + // Store Result to Database $this->cat->update($obj, $user_id, $operator);