Project

General

Profile

« Previous | Next » 

Revision 6c07db48

Added by Phil Davis about 10 years ago

Code spacing

and other random stuff I noticed.
I think this finishes messing with code style. The codebase should match
the developer style guide closely enough that 99.9% of changes will not
feel the need to also massage the formatting.

View differences:

usr/local/www/status_ntpd.php
108 108
			$tmp = $tmp[1];
109 109
			if (substr($tmp, 0, 6) == '$GPRMC') {
110 110
				$gps_vars = explode(",", $tmp);
111
				$gps_ok  = ($gps_vars[2] == "A");
111
				$gps_ok = ($gps_vars[2] == "A");
112 112
				$gps_lat_deg = substr($gps_vars[3], 0, 2);
113 113
				$gps_lat_min = substr($gps_vars[3], 2) / 60.0;
114 114
				$gps_lon_deg = substr($gps_vars[5], 0, 3);
......
119 119
				$gps_lon = $gps_lon * (($gps_vars[6] == "E") ? 1 : -1);
120 120
			} elseif (substr($tmp, 0, 6) == '$GPGGA') {
121 121
				$gps_vars = explode(",", $tmp);
122
				$gps_ok  = $gps_vars[6];
122
				$gps_ok = $gps_vars[6];
123 123
				$gps_lat_deg = substr($gps_vars[2], 0, 2);
124 124
				$gps_lat_min = substr($gps_vars[2], 2) / 60.0;
125 125
				$gps_lon_deg = substr($gps_vars[4], 0, 3);
......
133 133
				$gps_sat = $gps_vars[7];
134 134
			} elseif (substr($tmp, 0, 6) == '$GPGLL') {
135 135
				$gps_vars = explode(",", $tmp);
136
				$gps_ok  = ($gps_vars[6] == "A");
136
				$gps_ok = ($gps_vars[6] == "A");
137 137
				$gps_lat_deg = substr($gps_vars[1], 0, 2);
138 138
				$gps_lat_min = substr($gps_vars[1], 2) / 60.0;
139 139
				$gps_lon_deg = substr($gps_vars[3], 0, 3);
......
153 153
	$gpsport = fopen("/dev/gps0", "r+");
154 154
	while ($gpsport) {
155 155
		$buffer = fgets($gpsport);
156
		if (substr($buffer, 0, 6)=='$GPGSV') {
156
		if (substr($buffer, 0, 6) == '$GPGSV') {
157 157
			//echo $buffer."\n";
158
			$gpgsv = explode(',',$buffer);
158
			$gpgsv = explode(',', $buffer);
159 159
			$gps_satview = $gpgsv[3];
160 160
			break;
161 161
		}
162 162
	}
163 163
}
164 164

  
165
$pgtitle = array(gettext("Status"),gettext("NTP"));
165
$pgtitle = array(gettext("Status"), gettext("NTP"));
166 166
$shortcut_section = "ntp";
167 167
include("head.inc");
168 168
?>

Also available in: Unified diff