| [d7e6e9c] | 1 | /*
|
|---|
| 2 |
|
|---|
| 3 | Copyright (C) 2016 Insitute of Mechinal Engineering, Clausthal University of Technology. All rights reserved.
|
|---|
| 4 |
|
|---|
| 5 | This library is free software; you can redistribute it and/or
|
|---|
| 6 | modify it under the terms of the GNU Lesser General Public
|
|---|
| 7 | License as published by the Free Software Foundation; either
|
|---|
| 8 | version 2.1 of the License, or (at your option) any later version.
|
|---|
| 9 |
|
|---|
| 10 | This library is distributed in the hope that it will be useful,
|
|---|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 13 | Lesser General Public License for more details.
|
|---|
| 14 |
|
|---|
| 15 | You should have received a copy of the GNU Lesser General Public
|
|---|
| 16 | License along with this library; if not, write to the Free Software
|
|---|
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|---|
| 18 | MA 02110-1301 USA.
|
|---|
| 19 |
|
|---|
| 20 | */
|
|---|
| 21 |
|
|---|
| 22 | function openLink(target){
|
|---|
| 23 | window.location=target;
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | function displayDataSet(data){
|
|---|
| 27 | $("#display #speedthroughwater #value").text(data["speedthroughwater"]);
|
|---|
| 28 | $("#display #speedoverground #value").text(data["speedoverground"]);
|
|---|
| 29 | $("#display #waterdepth #value").text(data["waterdepth"]);
|
|---|
| 30 | $("#display #watertemperature #value").text(data["watertemperature"]);
|
|---|
| 31 | $("#display #gps #value").text(data["satellites"]);
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
| 34 | function displayDataGet() {
|
|---|
| 35 | var gnuboatApi = "http://localhost/~joachim/gnuboat/webservice/";
|
|---|
| 36 | $.getJSON( gnuboatApi, displayDataSet);
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | $(document).ready(function() {
|
|---|
| 40 | displayDataGet();
|
|---|
| 41 | setInterval(displayDataGet, 5000);
|
|---|
| 42 | });
|
|---|