diff --git a/decoder/html/Tracker.class.php b/decoder/html/Tracker.class.php
index dfd4ffb..bb6a981 100644
--- a/decoder/html/Tracker.class.php
+++ b/decoder/html/Tracker.class.php
@@ -87,7 +87,7 @@ class Tracker {
$stmt = Database::getInstance()->prepare("
SELECT *
FROM position
- WHERE (
+ WHERE ((
:from <= rxtime
AND rxtime <= :to
AND org = 'pos'
@@ -95,7 +95,8 @@ class Tracker {
:from <= gps_time
AND gps_time <= :to
AND org = 'log'
- ) AND call = :call
+ ))
+ AND call = :call
ORDER BY rxtime ASC
");
$stmt->bindValue(':call', $this->call, SQLITE3_TEXT);
diff --git a/decoder/html/header.inc.php b/decoder/html/header.inc.php
index 245167e..f4a5bc3 100644
--- a/decoder/html/header.inc.php
+++ b/decoder/html/header.inc.php
@@ -17,6 +17,9 @@ if(array_key_exists('call', $_GET)) {
}
$range = isset($_GET['range']) && is_numeric($_GET['range']) ? $_GET['range'] : 86400;
+
+if($tel->rxtime < time() - $range)
+ $range = time() - $tel->rxtime;
?>
diff --git a/decoder/html/telemetry.php b/decoder/html/telemetry.php
index 5fb72ca..7d7462d 100644
--- a/decoder/html/telemetry.php
+++ b/decoder/html/telemetry.php
@@ -201,7 +201,7 @@ function loadRecentData() {
$.each(tel, function(key, data) {
- if(last != null && data['rxtime'] - last > 300) {
+ if(last != null && data['rxtime'] - last > 1210) {
dataBattery.addRow([null, null, null, null]);
dataSolar.addRow([null, null, null, null]);
dataTemp.addRow([null,null,null,null,null,null]);