Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for FT4 #955

Merged
merged 1 commit into from
Mar 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions application/controllers/Lotw.php
Original file line number Diff line number Diff line change
Expand Up @@ -912,15 +912,23 @@ function lotw_satellite_map($satname) {

/*
| Function: mode_map
| Requires: mode as $mode
| Requires: mode as $mode, submode as $submode
|
| This converts ADIF modes to the mode that LoTW expects if its non standard
*/
function mode_map($mode) {
function mode_map($mode, $submode) {
switch ($mode):
case "PKT":
return "PACKET";
break;
case "MFSK":
if ($submode == "FT4") {
return "FT4";
break;
} else {
return "MFSK";
break;
}
default:
return $mode;
endswitch;
Expand Down
2 changes: 1 addition & 1 deletion application/models/Logbook_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,7 @@ function find_correct_station_id($station_callsign, $my_gridsquare) {

function get_lotw_qsos_to_upload($station_id, $start_date, $end_date) {

$this->db->select('COL_PRIMARY_KEY,COL_CALL, COL_BAND, COL_BAND_RX, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_FREQ, COL_FREQ_RX, COL_GRIDSQUARE, COL_SAT_NAME, COL_PROP_MODE, COL_LOTW_QSL_SENT, station_id');
$this->db->select('COL_PRIMARY_KEY,COL_CALL, COL_BAND, COL_BAND_RX, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_FREQ, COL_FREQ_RX, COL_GRIDSQUARE, COL_SAT_NAME, COL_PROP_MODE, COL_LOTW_QSL_SENT, station_id');

$this->db->where("station_id", $station_id);
$this->db->where('COL_LOTW_QSL_SENT !=', "Y");
Expand Down
4 changes: 2 additions & 2 deletions application/views/lotw_views/adif_views/adif_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

<BAND:<?php echo strlen($qso->COL_BAND); ?>><?php echo strtoupper($qso->COL_BAND); ?>

<MODE:<?php echo strlen($CI->mode_map($qso->COL_MODE)); ?>><?php echo strtoupper($CI->mode_map(strtoupper($qso->COL_MODE))); ?>
<MODE:<?php echo strlen($CI->mode_map($qso->COL_MODE, $qso->COL_SUBMODE)); ?>><?php echo strtoupper($CI->mode_map(strtoupper($qso->COL_MODE), strtoupper($qso->COL_SUBMODE))); ?>

<?php if($qso->COL_FREQ != "" || $qso->COL_FREQ != "0") { ?><?php $freq_in_mhz = $qso->COL_FREQ / 1000000; ?><FREQ:<?php echo strlen($freq_in_mhz); ?>><?php echo $freq_in_mhz; ?><?php } ?>

Expand Down Expand Up @@ -134,7 +134,7 @@
}

if($qso->COL_MODE) {
$sign_string .= strtoupper($CI->mode_map($qso->COL_MODE));
$sign_string .= strtoupper($CI->mode_map($qso->COL_MODE, $qso->COL_SUBMODE));
}


Expand Down