diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/services_ntpd_gps.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/usr/local/www/services_ntpd_gps.php b/src/usr/local/www/services_ntpd_gps.php index 4305c47..40ce677 100644 --- a/src/usr/local/www/services_ntpd_gps.php +++ b/src/usr/local/www/services_ntpd_gps.php @@ -55,8 +55,8 @@ function set_default_gps() { function parse_ublox(&$nmeaset, $splitline) { $id_idx = 1; $msg_idx = 2; - $ddc_idx = 3; - if ($splitline[$id_idx] == '40' && $splitline[$ddc_idx]) { + $usart1_idx = 4; + if ($splitline[$id_idx] == '40' && $splitline[$usart1_idx]) { $nmeaset['GP' . $splitline[$msg_idx]] = 1; } } @@ -176,7 +176,7 @@ if ($_POST) { if (!empty($_POST['processpgrmf'])) { $config['ntpd']['gps']['processpgrmf'] = $_POST['processpgrmf']; - } elseif (isset($config['ntpd']['gps']['processpgrmf']) || $config['ntpd']['gps']['type'] !== 'Garmin') { + } elseif (isset($config['ntpd']['gps']['processpgrmf'])) { unset($config['ntpd']['gps']['processpgrmf']); } @@ -700,9 +700,9 @@ events.push(function() { // When the 'GPS' selector is changed, we set the gps defaults $('#gpstype').on('change', function() { set_gps_default($(this).val()); - hideInput('processpgrmf', $(this).val() !== "Garmin"); + hideInput('processpgrmf', ($(this).val() !== "Garmin" && $(this).val() !== "Custom")); }); - hideInput('processpgrmf', '<?=$pconfig['type']?>' !== "Garmin"); + hideInput('processpgrmf', ('<?=$pconfig['type']?>' !== "Garmin" && '<?=$pconfig['type']?>' !== "Custom")); if ('<?=$pconfig['initcmd']?>' == '') { set_gps_default('<?=$pconfig['type']?>'); |