From a33a094f3bc91abf621e536f2b96dc618005a699 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 18 Mar 2021 17:06:21 +0000 Subject: [PATCH] [LoTW] Creates a map_mode function for converting ADIF modes to lotw modes LoTW has a weird habbit of using on standard modes this matches those to ADIF modes --- application/controllers/Lotw.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index ea5688c8..21a73b7b 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -910,4 +910,20 @@ class Lotw extends CI_Controller { return array_search(strtoupper($satname),$arr,true); } + /* + | Function: mode_map + | Requires: mode as $mode + | + | This converts ADIF modes to the mode that LoTW expects if its non standard + */ + function mode_map($mode) { + switch ($mode): + case "PKT": + return "PACKET" + break; + default: + return $mode + endswitch; + } + } // end class