kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
added timeout for live.json request
rodzic
2ef70eaab3
commit
ce4e0d7162
|
@ -218,7 +218,7 @@ headtxt = function(data,stat) {
|
||||||
|
|
||||||
get_data = function() {
|
get_data = function() {
|
||||||
$('#status').html('🔴');
|
$('#status').html('🔴');
|
||||||
$.get('live.json', function( data ) {
|
$.ajax({url: 'live.json', success: (function( data ) {
|
||||||
if (typeof data != "object") { data = $.parseJSON(data); }
|
if (typeof data != "object") { data = $.parseJSON(data); }
|
||||||
if (data.sonde) {
|
if (data.sonde) {
|
||||||
draw(data.sonde);
|
draw(data.sonde);
|
||||||
|
@ -228,7 +228,9 @@ headtxt = function(data,stat) {
|
||||||
if (data.gps) {
|
if (data.gps) {
|
||||||
gps(data.gps);
|
gps(data.gps);
|
||||||
}
|
}
|
||||||
});
|
}),
|
||||||
|
timeout: 1000}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
storage = (typeof(Storage) !== "undefined")?true:false;
|
storage = (typeof(Storage) !== "undefined")?true:false;
|
||||||
|
|
Ładowanie…
Reference in New Issue