summaryrefslogtreecommitdiff
path: root/gpsd.php.in
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2011-10-12 14:24:15 -0700
committerGary E. Miller <gem@rellim.com>2011-10-12 14:24:15 -0700
commit414bfaa20edf8e7642b9393881edabe1ea2f8531 (patch)
tree372eb8ac69ae0616792723bd08bfa2a04b81c81a /gpsd.php.in
parent071229a69da1bd0a1294812c8c7b4cfa4a195d8b (diff)
downloadgpsd-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.in4
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;