Project

General

Profile

Feature #6569 » jupiter.patch

Bruce Simpson, 07/02/2016 07:12 PM

View differences:

/etc/inc/system.inc 2016-07-02 23:35:45.215545000 +0000
1647 1647
	    system_ntp_setup_gps($config['ntpd']['gps']['port'])) {
1648 1648
		$ntpcfg .= "\n";
1649 1649
		$ntpcfg .= "# GPS Setup\n";
1650
		$ntpcfg .= 'server 127.127.20.0 mode ';
1650
                if ($config['ntpd']['gps']['type'] == "Jupiter") {
1651
			$refclock = '127.127.31.0';
1652
		} else {
1653
			$refclock = '127.127.20.0';
1654
		}
1655
		$ntpcfg .= 'server ';
1656
		$ntpcfg .= $refclock;
1657
		$ntpcfg .= ' mode ';
1651 1658
		if (!empty($config['ntpd']['gps']['nmea']) || !empty($config['ntpd']['gps']['speed']) || !empty($config['ntpd']['gps']['subsec'])) {
1652 1659
			if (!empty($config['ntpd']['gps']['nmea'])) {
1653 1660
				$ntpmode = (int) $config['ntpd']['gps']['nmea'];
......
1670 1677
			$ntpcfg .= ' noselect ';
1671 1678
		}
1672 1679
		$ntpcfg .= "\n";
1673
		$ntpcfg .= 'fudge 127.127.20.0';
1680
		$ntpcfg .= 'fudge ';
1681
		$ntpcfg .= $refclock;
1674 1682
		if (!empty($config['ntpd']['gps']['fudge1'])) {
1675 1683
			$ntpcfg .= ' time1 ';
1676 1684
			$ntpcfg .= $config['ntpd']['gps']['fudge1'];
1677
-- /usr/local/www/services_ntpd_gps.php.orig	2016-07-02 17:12:45.721851000 +0000
1685
++ /usr/local/www/services_ntpd_gps.php	2016-07-02 20:27:59.960274000 +0000
......
246 246
	' to minimize clock drift if the GPS data is not valid over time. Otherwise ntpd may only use values from the unsynchronized local clock when providing time to clients.'
247 247
));
248 248

  
249
$gpstypes = array(gettext('Custom'), gettext('Default'), 'Generic', 'Garmin', 'MediaTek', 'SiRF', 'U-Blox', 'SureGPS');
249
$gpstypes = array(gettext('Custom'), gettext('Default'), 'Generic', 'Garmin', 'MediaTek', 'SiRF', 'U-Blox', 'SureGPS', 'Jupiter');
250 250

  
251 251
$section->addInput(new Form_Select(
252 252
	'gpstype',
......
479 479
			case "SureGPS":
480 480
				return "JFBNVEsyMjUsMCoyQg0KJFBNVEszMTQsMSwxLDAsMSwwLDUsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDEsMCoyRA0KJFBNVEszMDEsMioyRQ0KJFBNVEszOTcsMCoyMw0KJFBNVEsxMDIqMzENCiRQTVRLMzEzLDEqMkUNCiRQTVRLNTEzLDEqMjgNCiRQTVRLMzE5LDAqMjUNCiRQTVRLNTI3LDAuMDAqMDANCiRQTVRLMjUxLDk2MDAqMTcNCg==";
481 481
				break;
482
			case "Jupiter":
483
				return "JFBSV0lJUFJPLCxSQklXSUlOSVQsQSwsLDUwMDAuNjUwLE4sMC4wLFcsNjQuMTMxLDAuMCxNLDAuMCxULDIxMjUwMCwwMjA3MTYNCiRQUldJSVBSTywsUkJJTg0K";
484
				break;
482 485
			default:
483 486
				return "";
484 487
		}
......
526 529
				$('#gpsspeed').val(16);
527 530
				$('#gpsfudge2').val("0.407");
528 531
				break;
532
			case "Jupiter":
533
				$('#gpsfudge1').val("0.155");
534
				$('#gpsfudge2').val("");
535
				break;
529 536
			default:
530 537
				return;
531 538
		}
(1-1/9)