diff options
author | Gary E. Miller <gem@rellim.com> | 2011-10-12 14:24:15 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2011-10-12 14:24:15 -0700 |
commit | 414bfaa20edf8e7642b9393881edabe1ea2f8531 (patch) | |
tree | 372eb8ac69ae0616792723bd08bfa2a04b81c81a /gpsd.php.in | |
parent | 071229a69da1bd0a1294812c8c7b4cfa4a195d8b (diff) | |
download | gpsd-414bfaa20edf8e7642b9393881edabe1ea2f8531.tar.gz |
Get gpsd.php running again, thanks to Romain Gobinet
the usleep() is prolly too ugly to stand, but required for me.
Diffstat (limited to 'gpsd.php.in')
-rw-r--r-- | gpsd.php.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gpsd.php.in b/gpsd.php.in index adb749a6..29dc120b 100644 --- a/gpsd.php.in +++ b/gpsd.php.in @@ -87,9 +87,11 @@ if (isset($_GET['imgdata']) && $op == 'view'){ if ($testmode){ $sock = @fsockopen($server, $port, $errno, $errstr, 2); + @fwrite($sock, "?WATCH={\"enable\":true}\n"); + usleep(100); @fwrite($sock, "?POLL;\n"); for($tries = 0; $tries < 10; $tries++){ - $resp = @fread($sock, 1536); # SKY can be pretty big + $resp = @fread($sock, 2000); # SKY can be pretty big if (preg_match('/{"class":"POLL".+}/i', $resp, $m)){ $resp = $m[0]; break; |