diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-17 08:56:27 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-12-17 08:56:27 +0545 |
commit | 20db3e1adb437d8e094077e33e402ff805122a82 (patch) | |
tree | f6804fef026b9cae9c7391d897f220a84cf203e4 /src/usr/local/www/services_ntpd_gps.php | |
parent | 8152403354e59b40c518414523383c11fdc1a155 (diff) | |
download | pfsense-20db3e1adb437d8e094077e33e402ff805122a82.zip pfsense-20db3e1adb437d8e094077e33e402ff805122a82.tar.gz |
Code style services
Diffstat (limited to 'src/usr/local/www/services_ntpd_gps.php')
-rw-r--r-- | src/usr/local/www/services_ntpd_gps.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/usr/local/www/services_ntpd_gps.php b/src/usr/local/www/services_ntpd_gps.php index 7bfbde7..5afc183 100644 --- a/src/usr/local/www/services_ntpd_gps.php +++ b/src/usr/local/www/services_ntpd_gps.php @@ -208,12 +208,14 @@ function build_nmea_list() { $nmealist['options'][4] = 'GLL'; $nmealist['options'][8] = 'ZDA or ZDG'; - if(!$pconfig['nmea']) + if (!$pconfig['nmea']) { array_push($nmealist['selected'], 0); + } - foreach($nmealist['options'] as $val => $opt) { - if($pconfig['nmea'] & $val) + foreach ($nmealist['options'] as $val => $opt) { + if ($pconfig['nmea'] & $val) { array_push($nmealist['selected'], $val); + } } return($nmealist); @@ -261,7 +263,7 @@ if (!empty($serialports)) { $splist = array(); foreach ($serialports as $port) { - $shortport = substr($port,5); + $shortport = substr($port, 5); $splist[$shortport] = $shortport; } @@ -424,13 +426,13 @@ print($form); <script type="text/javascript"> //<![CDATA[ -events.push(function(){ +events.push(function() { function NMEAChecksum(cmd) { // Compute the checksum by XORing all the character values in the string. var checksum = 0; - for(var i = 0; i < cmd.length; i++) { + for (var i = 0; i < cmd.length; i++) { checksum = checksum ^ cmd.charCodeAt(i); } // Convert it to hexadecimal (base-16, upper case, most significant byte first). |