1
0
Fork 0
Commit graph

625 commits

Author SHA1 Message Date
Torsten Dreyer
c3c0d25fe7 Fix Linux build 2016-12-03 22:46:31 +01:00
James Turner
47042b03f4 Expose an entire property tree via WebSockets.
Use a recursive listener to expose a property tree via a WebSocket.
Currently using a JSON-based encoding, will likely change to binary so
please don’t write code using this interface until the encoding
is stable and documented!
2016-12-03 14:23:48 +00:00
Torsten Dreyer
c4ea89dc97 Revert "temporarily add some noisy debug messages"
This reverts commit f538a6e1a1.
2016-11-20 11:39:46 +01:00
Torsten Dreyer
f538a6e1a1 temporarily add some noisy debug messages 2016-11-19 18:26:06 +01:00
Torsten Dreyer
b652758330 Merge branch 'topics/mpdiscovery-via-dns' into next 2016-11-17 14:45:40 +01:00
Torsten Dreyer
994ea1674b replace many auto_ptr by unique_ptr 2016-11-14 22:20:46 +01:00
Torsten Dreyer
09949ff3e3 Some logging cleanup and ignore SRV records with port #0 2016-11-14 21:57:50 +01:00
Torsten Dreyer
979010de4d Initial commit of mpserver discovery via DNS 2016-11-10 11:14:49 +01:00
Torsten Dreyer
65b51b8d91 Limit the update rate of the property change websocket
Of fast systems with 60fps sending many properties to web clients
may overrun the rendering capabilities of the browser. At some point
the web socket client halts the simulation by throtteling the network
connection.

Update rate is settable at startup setting to a double value
/sim/http/property-websocket/update-interval-secs
(default: 0.05 aka 20Hz)
2016-10-26 11:02:24 +02:00
Curtis L. Olson
7da08db463 Update default aircraft hangar catalog.xml url. 2016-09-07 11:39:37 -05:00
James Turner
9cffcf63ae Further SGPath encoding fixes. 2016-07-01 04:54:29 -05:00
James Turner
6d0c2070fd Use future-proof SGPath APIs.
Remove uses of .str(), .c_str() and some other methods of SGPath.
Pass SGPath directly where possible, or explicitly convert to the
appropriate 8-bit encoding.
2016-06-28 10:08:38 +01:00
James Turner
5d624b4882 Fallback URL when official catalog is not found.
Tolerate the case where a URL matching the exact FG version is
not found; lookup a generic URL, in the hope it supports our
version (additional changes will make this more likely)
2016-05-26 17:37:26 +01:00
James Turner
733e3b3f0c HTTP subsystem has a default name.
Switch to using type-safe accessors now.
2016-03-24 15:08:38 +00:00
James Turner
bb9fd9defe Fix a bug with updating packages.
- always refresh the catalogs each launch, so we don’t get mismatches
  between the cached copy the and package zips.
2016-01-26 16:46:58 +00:00
Torsten Dreyer
6f09b9e31e httpd: expose /fg-home and /fg-root 2016-01-13 13:25:16 +01:00
James Turner
e5fa1a5ab1 Merge /u/userid-1550991/flightgear/ branch next into next
http://sourceforge.net/p/flightgear/flightgear/merge-requests/31/
2015-12-14 14:57:18 +00:00
www2
2da5541901 Add feedback if prompt mode is use 2015-12-13 15:57:53 +01:00
www2
95e3d00a17 Add new commands to telnet protocall
New comands:
setb set a Boolean value
setd set a Floaring point value
seti set a integer value
del delete a node
2015-12-12 15:43:00 +01:00
James Turner
8877b442f8 ATC/Traffic doesn’t crash reset.
- remove some global headers from AI headers, to avoid pollution
- change how ATC owns the ‘player’ FGAIAircraft so reset works
- ensure AIAircraft controllers are cleared on unbind for reset
2015-12-11 12:11:59 -06:00
James Turner
be1291f689 Change handling of default hangar / catalog.
- no longer re-add it on startup, add an explicit button in the UI

(will add a more obvious item to the aircraft list in a follow-up
commit)
2015-11-23 22:58:00 +00:00
James Turner
5f0e347c60 Keep in sync with SimGear Package API 2015-09-27 19:44:39 -05:00
James Turner
18a898f5f9 Lots of work on aircraft package support 2015-09-20 19:46:35 -05:00
Torsten Dreyer
36113bf69d Cleanup: remove unused code and includes
no functional change
jpg-httpd functionality was moved into httpd with 3.4
cmd-line option still spits out a warning
2015-07-08 17:24:13 +02:00
Torsten Dreyer
cd0f0b9856 Fix some warnings 2015-06-12 11:51:11 +02:00
Torsten Dreyer
93f03f5f2e property browser: group radio-button elements
This allows to better render bool properties
2015-04-15 10:41:31 +02:00
Torsten Dreyer
8f9df6940f httpd: extend the NavDbUriHandler
- add more details for airports
- add "q=airports" query to get the airport list
- add "q=airport&id=abcd" query to get airport details
2015-03-28 00:34:28 +01:00
James Turner
f2d6b76b13 Portability: Fix compile errors on MSVC (cmath)
From Scott (xDraconian)
2015-03-24 11:11:42 -05:00
Torsten Dreyer
3ee36a7143 PropertyChangeWebsocket: sanitize property names 2015-03-17 09:27:03 +01:00
Torsten Dreyer
f5f82c461f RunUriHandler: add some INFO logging for the requests 2015-03-11 22:28:23 +01:00
Torsten Dreyer
f7d476c856 extract RemoteXMLRequest to make it reusable 2015-03-11 18:50:11 +01:00
James Turner
11c2623dec Start wiring package manager into the launcher. 2015-03-11 17:09:59 +00:00
James Turner
68efa84b3a Remove obsolete #ifdef check 2015-03-11 17:09:59 +00:00
Torsten Dreyer
f32f1fba59 Fix recently introduced bug in json-to-prop conversion 2015-03-11 16:59:58 +01:00
Torsten Dreyer
fced50f480 JSON Properties: encode NaN as null
JSON doesn't know about NaN, probably null matches best
2015-03-09 16:17:20 +01:00
Torsten Dreyer
8b141025cd httpd: expose if airport has metar in navdb uri handler 2015-03-09 14:53:40 +01:00
James Turner
bfeb41858d Cmake always generates version.h
- simplify some code as a result
2015-03-08 00:42:39 +00:00
Torsten Dreyer
0f72564140 Use the pagedPathForHistory in the FlightHistoryUriHandler 2015-03-03 17:10:16 +01:00
Torsten Dreyer
2e5db3ce85 httpd: fix misplaced warning message 2015-03-02 20:39:23 +01:00
Torsten Dreyer
0fcfbe9221 wrap the json flight history as a feature
this allows to attach properties later
2015-02-27 15:54:28 +01:00
Torsten Dreyer
146efcafa4 JsonUriHandler: allow POST updates without child
updates to properties used to be
POST /json/some/property/path
{
  name: 'somechild',
  value: 'somevalue'
}

which required some ugly path hacking when directly updating a node.
now, this works too (and in a probably more intuitive way)
POST /json/some/property/path/somechild
{
  value: 'somevalue'
}
2015-02-27 11:07:25 +01:00
Torsten Dreyer
4b5dec2cae HTML Property Browser: use radiobuttons for bools 2015-02-26 18:14:09 +01:00
Torsten Dreyer
0034d6b59a flighthistory service: use GeoJSON instead of own invention
Track now comes as a LineString object
{
  "type":"LineString",
  "coordinates": [ [lon,lat,alt], [lon,lat,alt], ... ]
}

ref: http://geojson.org/geojson-spec.html#linestring
2015-02-25 10:38:22 +01:00
Torsten Dreyer
cc6178a9f3 Expose FlightHistory as a http service
usage:
GET http://localhost:8080/flighthistory/track.json
retrieves track as JSON data
{
  flightHistory: [
    {
      latitude: (number),
      longitude: (number),
      altitude: (number)
    }
  ]
}

GET http://localhost:8080/flighthistory/track.kml
retrieves track as KML path
optional request parameter:
LineColor=(hex encoded rgba color)
LineWidth=(line width in pixel)
PolyColor=(hex encoded rgba color)
interval=(number of seconds to auto-refresh)
2015-02-23 16:33:58 +01:00
Torsten Dreyer
6ecbca9e01 package system: de-hardcode default catalog id and url
make default catalog id and url configurable through properties
on startup. Provide defaults to preserve current functionality.

/sim/package-system/default-catalog/id
/sim/package-system/default-catalog/url
2015-02-17 12:41:18 +01:00
Torsten Dreyer
828f14c4f7 Ooops... 2015-02-17 12:09:22 +01:00
Torsten Dreyer
ae91b9cede Initial work for a PKG http service 2015-02-17 12:06:50 +01:00
Torsten Dreyer
6e3486349b PropertyBrowser: Add a JSON link and the path 2015-02-13 11:42:45 +01:00
Torsten Dreyer
6970ea69a8 httpd/json: send as correct typ for bools and numbers 2015-02-11 11:34:16 +01:00
Rebecca N. Palmer
fe0015bda0 Fix typo, thanks to Markus Wanner 2015-01-18 22:23:49 +00:00