Révision 42b5c637
Ajouté par Renato Botelho il y a presque 10 ans
usr/local/www/services_ntpd_gps.php | ||
---|---|---|
44 | 44 |
|
45 | 45 |
if (!is_array($config['ntpd'])) |
46 | 46 |
$config['ntpd'] = array(); |
47 |
if (is_array($config['ntpd']['gps']))
|
|
47 |
if (is_array($config['ntpd']['gps'])) |
|
48 | 48 |
unset($config['ntpd']['gps']); |
49 | 49 |
|
50 | 50 |
$config['ntpd']['gps'] = array(); |
... | ... | |
138 | 138 |
$config['ntpd']['gps']['refid'] = $_POST['gpsrefid']; |
139 | 139 |
elseif (isset($config['ntpd']['gps']['refid'])) |
140 | 140 |
unset($config['ntpd']['gps']['refid']); |
141 |
|
|
141 |
|
|
142 | 142 |
if (!empty($_POST['gpsinitcmd'])) |
143 | 143 |
$config['ntpd']['gps']['initcmd'] = base64_encode($_POST['gpsinitcmd']); |
144 | 144 |
elseif (isset($config['ntpd']['gps']['initcmd'])) |
... | ... | |
169 | 169 |
aodiv = document.getElementById(configvalueID); |
170 | 170 |
aodiv.style.display = "block"; |
171 | 171 |
} |
172 |
|
|
172 |
|
|
173 | 173 |
function ToggleOther(clicked, checkOff) { |
174 | 174 |
if (document.getElementById(clicked).checked) { |
175 | 175 |
document.getElementById(checkOff).checked=false; |
176 | 176 |
} |
177 | 177 |
} |
178 | 178 |
|
179 |
<?php /*
|
|
179 |
<?php /* |
|
180 | 180 |
init commands are Base64 encoded |
181 | 181 |
Default = #Sponsored, probably a Ublox |
182 | 182 |
$PUBX,40,GSV,0,0,0,0*59 |
... | ... | |
192 | 192 |
$PUBX,40,ZDA,1,1,1,1 |
193 | 193 |
|
194 | 194 |
Generic = #do nothing |
195 |
|
|
195 |
|
|
196 | 196 |
Garmin = #most Garmin |
197 | 197 |
$PGRMC,,,,,,,,,,3,,2,4*52 #enable PPS @ 100ms |
198 | 198 |
$PGRMC1,,1,,,,,,W,,,,,,,*30 #enable WAAS |
... | ... | |
212 | 212 |
$PMTK251,4800*14 #4800 baud rate |
213 | 213 |
|
214 | 214 |
SiRF = #used by many devices |
215 |
$PSRF103,00,00,01,01*25 #turn on GGA
|
|
215 |
$PSRF103,00,00,01,01*25 #turn on GGA |
|
216 | 216 |
$PSRF103,01,00,01,01*24 #turn on GLL |
217 | 217 |
$PSRF103,02,00,00,01*24 #turn off GSA |
218 | 218 |
$PSRF103,03,00,00,01*24 #turn off GSV |
... | ... | |
236 | 236 |
$PUBX,40,TXT,0,0,0,0,0,0*43 #turn off TXT all ports |
237 | 237 |
$PUBX,40,THS,0,0,0,0,0,0*54 #turn off THS all ports (U-Blox 6) |
238 | 238 |
$PUBX,41,1,0007,0003,4800,0*13 # set port 1 to 4800 baud |
239 |
|
|
239 |
|
|
240 | 240 |
SureGPS = #Sure Electronics SKG16B |
241 | 241 |
$PMTK225,0*2B |
242 | 242 |
$PMTK314,1,1,0,1,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0*2D |
... | ... | |
248 | 248 |
$PMTK319,0*25 |
249 | 249 |
$PMTK527,0.00*00 |
250 | 250 |
$PMTK251,9600*17 #really needs to work at 9600 baud |
251 |
|
|
251 |
|
|
252 | 252 |
*/ ?> |
253 | 253 |
|
254 | 254 |
function set_gps_default(form) { |
... | ... | |
275 | 275 |
gpsdef['fudge2'] = "0.600"; |
276 | 276 |
gpsdef['inittxt'] = "JFBHUk1DLCwsLCwsLCwsLDMsLDIsOCo1RQ0KJFBHUk1DMSwsMSwsLCwsLFcsLCwsLCwsKjMwDQokUEdSTU8sLDMqNzQNCiRQR1JNTyxHUFJNQywxKjNEDQokUEdSTU8sR1BHR0EsMSoyMA0KJFBHUk1PLEdQR0xMLDEqMjYNCg=="; |
277 | 277 |
break; |
278 |
|
|
278 |
|
|
279 | 279 |
case "Generic": |
280 | 280 |
gpsdef['nmea'] = 0; |
281 | 281 |
gpsdef['speed'] = 0; |
... | ... | |
359 | 359 |
<?php if ($savemsg) print_info_box($savemsg); ?> |
360 | 360 |
|
361 | 361 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="ntpd gps"> |
362 |
<tr> |
|
363 |
<td> |
|
362 |
<tr><td> |
|
364 | 363 |
<?php |
365 | 364 |
$tab_array = array(); |
366 | 365 |
$tab_array[] = array(gettext("NTP"), false, "services_ntpd.php"); |
... | ... | |
368 | 367 |
$tab_array[] = array(gettext("PPS"), false, "services_ntpd_pps.php"); |
369 | 368 |
display_top_tabs($tab_array); |
370 | 369 |
?> |
371 |
</td> |
|
372 |
</tr> |
|
373 |
<tr> |
|
374 |
<td> |
|
370 |
</td></tr> |
|
371 |
<tr><td> |
|
375 | 372 |
<div id="mainarea"> |
376 | 373 |
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> |
377 | 374 |
<tr> |
... | ... | |
569 | 566 |
</tr> |
570 | 567 |
</table> |
571 | 568 |
</div> |
572 |
</td> |
|
573 |
</tr> |
|
569 |
</td></tr> |
|
574 | 570 |
</table> |
575 | 571 |
<script type="text/javascript"> |
576 | 572 |
//<![CDATA[ |
Formats disponibles : Unified diff
Fix indent and spaces