diff --git a/html/planeObject.js b/html/planeObject.js
index 2461ff2..96390f7 100644
--- a/html/planeObject.js
+++ b/html/planeObject.js
@@ -759,8 +759,8 @@ PlaneObject.prototype.updateData = function(now, last, data, init) {
this.dataSource = "mlat";
else if (data.type && data.type.substring(0,4) == "tisb")
this.dataSource = "tisb";
- else if (this.dataSource == "uat")
- true; // stays uat.
+ else if (!displayUATasADSB && this.receiver == "uat")
+ this.dataSource = "uat";
else if (data.lat != null && data.type == null)
this.dataSource = "adsb";
else if (data.type == "adsb_icao" || data.type == "adsb_other")
diff --git a/html/script.js b/html/script.js
index ea3a889..24c7455 100644
--- a/html/script.js
+++ b/html/script.js
@@ -158,8 +158,6 @@ function processReceiverUpdate(data, init) {
PlanesOrdered.push(plane);
if (uat) {
plane.receiver = "uat";
- if (!displayUATasADSB)
- plane.dataSource = "uat";
} else {
plane.receiver = "1090";
}
@@ -169,17 +167,11 @@ function processReceiverUpdate(data, init) {
if (uat) {
if (plane.receiver == "uat" || ac.seen_pos < 1.8 || init) {
plane.receiver = "uat";
- if (!displayUATasADSB) {
- plane.dataSource = "uat";
- }
plane.updateData(uat_now, uat_last, ac, init);
}
} else {
if (plane.receiver == "1090" || ac.seen_pos < 1.8 || init) {
plane.receiver = "1090";
- if (!displayUATasADSB) {
- plane.dataSource = "adsb";
- }
plane.updateData(now, last, ac, init);
}
}
diff --git a/web.sh b/web.sh
index a9a3d49..e457880 100755
--- a/web.sh
+++ b/web.sh
@@ -7,7 +7,7 @@ mkdir -p $ipath
mv $ipath/html/config.js /tmp/
-rm -f $ipath/html/db/*.json
+#rm -f $ipath/html/db/*.json
cp -r html $ipath
mv /tmp/config.js $ipath/html/