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
Torsten Dreyer
4b4f5c9e9a
httpd: some code cleanup for JsonUriHandler.
...
no functional change
2014-11-11 08:59:41 +01:00
Torsten Dreyer
aeb1eedba8
Allow property set on the /json/ uri handler
2014-11-10 14:23:12 +01:00
Torsten Dreyer
d46aa5114f
httpd: upgrade to latest mongoose 5.5
2014-11-06 22:21:22 +01:00
Torsten Dreyer
0376ab3f28
Fix #1579 : Handle special characters in html property browser
2014-11-04 22:21:44 +01:00
Torsten Dreyer
e786b1a54e
httpd: expose airport id to geojson properties
2014-10-16 13:09:43 +02:00
Torsten Dreyer
cc526174c1
httpd: fix mjpeg encoding
2014-10-02 11:13:12 +02:00
Torsten Dreyer
c0c82f4f7b
Fix (1st try) absolute paths for httpd url_rewrites
...
Thanks to Alan Teeder for guiding me into the right direction
2014-09-24 20:50:10 +02:00
Torsten Dreyer
2859400336
Some debug stuff for the mongoose httpd
...
- add a config-dump on log-level=info
- add an access-log option
use --prop:string:/sim/http/options/access-log-file="/path/to/access.log"
2014-09-24 17:40:04 +02:00
Torsten Dreyer
996a46536d
httpd: fix log message typos
...
no functional change
2014-09-21 22:29:10 +02:00
Torsten Dreyer
e8d851d236
Allow user defined mime types for the internal httpd
2014-09-20 01:48:32 +02:00
Torsten Dreyer
c9d159e71f
httpd: downgrade log message
2014-09-15 10:54:00 +02:00
Torsten Dreyer
512ec61e8e
Expose the running-state of the internal webserver
2014-09-12 22:58:30 +02:00
Torsten Dreyer
b50b1a778b
httpd: expose the aircraft dir to the web server
...
add a (currently) hard coded url rewrite to access the
currently used aircraft by
http://localhost:8080/aircraft-dir/
2014-09-10 22:43:06 +02:00
Thomas Geymayer
486ef5b06c
pkg: retrieve existing install (or register callback).
2014-06-30 18:15:31 +02:00
James Turner
7e8d713b28
Pkg: initial support for Variants
...
- aircraft init code can deal with a variant ID
- Nasal API can return a hash with variant IDs and names
2014-06-15 20:10:24 +02:00
Thomas Geymayer
33d23026c4
pkg: allow 'installed' as filter criterion.
2014-06-15 16:36:02 +02:00
Thomas Geymayer
e1eb9e4418
Enable package system API
2014-06-13 16:08:26 +02:00
James Turner
8f754a1673
Type-correct decoding of JSON to props.
2014-06-12 19:58:13 +01:00
James Turner
d1a477324e
Websocket get/set props and exec commands.
2014-06-12 17:57:25 +01:00
James Turner
ee627b8652
Expose package file size to Nasal.
2014-06-12 17:51:19 +01:00
James Turner
7a5b729052
Pkg: nicer Nasal syntax for tags in queries.
2014-06-12 08:17:05 +01:00
Thomas Geymayer
53c0454931
Package: warn for unknown filter term and use Hash::iterator.
2014-06-11 18:19:13 +02:00
Thomas Geymayer
0e286717a6
pkg: Expose install callbacks to Nasal.
2014-06-10 23:53:57 +02:00
James Turner
afa45240b0
Packages: search from Nasal
...
- also allow direct uninstallation.
2014-06-10 22:12:27 +01:00
Thomas Geymayer
1af3ad2525
Nasal: extend pkg API.
2014-06-04 17:50:25 +02:00
James Turner
d1fd5756f6
Initial package-system integration.
...
- disabled by default
- incomplete, adding so Thomas can see the API
2014-05-31 18:04:56 +01:00
Torsten Dreyer
2e76a2c72a
Update of the httpd implementation
...
- Add a screenshot uri handler
- Enable persistent http connections
- Simple CORS implementatation for the
JSON property uri handler
many changes for the httpd
2014-05-22 10:28:54 +02:00
Torsten Dreyer
390f6dd32d
fix wrong computation of delta-t in jpg-httpd
...
this lead to a screenshot taken on each frame instead of
the defined interval
2014-03-29 11:22:34 +01:00
Torsten Dreyer
75f9d7e66e
add nChildren to json properties
2014-03-26 15:06:24 +01:00
Torsten Dreyer
0dcc8aa34d
Add a timestamp to JSON properties
...
add special attribute 'ts' to a JSON property reflecting
/sim/time/elapsed-sec
always add timestamp for listener properties
add timestamp for json requests if req param t=y is set
2014-03-26 08:51:15 +01:00
Torsten Dreyer
f68ae55068
Don't return invalid JSON if node not found
2014-03-25 21:43:08 +01:00
Torsten Dreyer
e7dec994b8
httpd: provide more airport information in geojson
...
- provide runways as polygon geometry
- provide longest runway lenght, heading and surface type
- some code cleanup
2014-03-23 21:19:04 +01:00
Torsten Dreyer
527eb9d444
httpd navdb: report ils/loc as geojson multilinestring
2014-03-21 13:00:59 +01:00
Torsten Dreyer
3d33aff7bc
Add a http handler to access the nav database
...
see the browsermap for an example
2014-03-19 17:23:53 +01:00
Torsten Dreyer
efcc89480d
httpd: don't spam the console with debug messages
2014-03-17 16:38:53 +01:00
Torsten Dreyer
1867ccb4a8
httpd: better handling of first-time notifications
...
ensure new listeners get notified on first update loop
also cleanup the PropertyChangeObserver on reset
2014-03-17 16:22:42 +01:00
Torsten Dreyer
a830708252
PropertyChangeWebsocket: fire change after subscribe
2014-03-14 21:36:29 +01:00
Torsten Dreyer
95d4c5898d
httpd: handle url-rewrites
2014-03-14 16:39:16 +01:00
Torsten Dreyer
7132947d16
httpd: update mongoose and websockets
...
* mongoose updated to 5.3
* first stab at implementing websockets, here a property change listener
websocket. This websocket is at ws://yourhost:yourport/PropertyListener
see FGDATA/Docs/gui/radio.html for an example
2014-03-12 22:39:37 +01:00
Torsten Dreyer
64c393d022
http property browser: don't crash on invalid nodes
...
Don't expect users to always pass valid node names
or paths
2014-03-10 23:40:42 +01:00
Torsten Dreyer
7c2ce9acf7
allow binding of arguments for fg-commands thru run.cgi
...
to run a fg-command with args, POST run.cgi?value=my-command
and post the args node as JSON content like this:
{
name: '',
children: [
{
name: 'property',
index: 0,
value: 'first-value is here'
},
{
name: 'property',
index: 1,
value: 'first-value is here'
}
]
}
or whatever arguments the requested command takes
2014-03-10 22:58:52 +01:00
Torsten Dreyer
dac3b45892
Some fixes for the httpd
...
- Set encoding of the property browser to utf-8
- add the properties index to the json
2014-03-08 14:47:13 +01:00
Torsten Dreyer
ed8ec8f092
JSON: make the response configurable, set encoding
...
add request parameter 'i' and 'd'
if i=y, indent the output to make it human readable
if i is missing or anything else, send the output unformatted to save bandwith
'd' defines recursion depth with a default of 1 to show the requested node
and the immediate childs (if it has any)
call /json/?i=y&d=999 for a complete property tree backup (use with caution!)
Also set the encoding to UTF-8 as required per RFC 4627
2014-03-07 21:58:33 +01:00
Torsten Dreyer
b84026ce84
httpd: fix ignored port on --httpd=nnnn
...
also fix unconditional startup of the daemon
2014-03-06 21:19:49 +01:00
Torsten Dreyer
7602089460
Use the short xml name for properties in JSON
2014-03-06 18:00:11 +01:00
Torsten Dreyer
63e9cbed40
Initial commit for mongoose httpd
2014-03-06 13:19:15 +01:00
Torsten Dreyer
c519b9262d
Add simple breadcrumb navigation to the httpd
2014-02-27 22:21:45 +01:00
Clément de l'Hamaide
d9e8abcc99
FGCom: change default silence threshold
2014-02-04 12:18:50 +01:00
James Turner
1a372d9366
Update image-server logic.
...
- no dependency on libJpeg or Simgear
- no duplicate rendering of the scene (uses a draw callback)
- supports other image types, eg PNG
- threaded so doesn't block the main loop ever
2014-01-27 09:08:34 +00:00
Clément de l'Hamaide
3254f54f9e
FGCom: add silence threshold setting
...
Require commit 1396848dcf31d181ab740c8eb728cff02f06fd3d from fgdata
2014-01-26 16:38:48 +01:00
Clément de l'Hamaide
c0c8158ca1
FGCom: force 8.33KHz to be handled even if the frequency doesn't exist
2014-01-16 18:15:58 +01:00
Clément de l'Hamaide
606643a199
FGCom: update special_frq for built-in/standalone sync
2014-01-12 21:17:57 +01:00
Rebecca Palmer
617e638242
Stop --native-ctrls option from breaking JSBSim
...
Remove unused instance of FGControls from FGNativeCtrls, as it was
binding to the property tree in place of the globals->get_controls
that JSBSim reads input from, blocking all input
2013-12-15 21:32:40 +00:00
Clément de l'Hamaide
2d145e072e
FGCom built-in: restore speaker volume settings
2013-11-17 23:37:37 +01:00
Torsten Dreyer
35dad8c4c4
generic binary protocol: add 'word' datatype
...
this patch adds support for binary datatype word (aka int16)
now we have int (32bit), word (16bit) and byte (8bit) integer types
2013-10-28 22:57:22 +01:00
Clément de l'Hamaide
1970a8e0a8
FGCom: allow ulaw codec too
2013-10-28 21:56:27 +01:00
Thomas Geymayer
8a582e6376
Update/refactor for simgear HTTP changes.
2013-10-27 19:39:22 +01:00
janodesbois
ecfdf354f1
considering u,v,wbody-fps are the ECEF velocity expressed in body axis, change in all functions/variables name dealing with them, wrongly named with wind, or even north, east, down.
2013-10-27 13:24:54 +01:00
Clément de l'Hamaide
d5b70e98e0
FGCom[-sa]: add IAX denoiser and auto gain + set silence threshold
2013-10-26 13:18:08 +02:00
Clément de l'Hamaide
3952ab6fe5
FGCom: remove unecessary assignation value
2013-10-26 01:48:31 +02:00
Clément de l'Hamaide
428f9031aa
FGCom: make COM1 and COM2 switchable with Shift+Space
2013-10-26 01:28:05 +02:00
Clément de l'Hamaide
6332693ae5
FGCom: use Speex codec instead of GSM codec
2013-10-24 12:14:31 +02:00
James Turner
2f51052860
FGCom: initialise some variables.
...
Avoid a crash on re-init where _initialized member was never set.
2013-10-23 09:38:16 +01:00
Torsten Dreyer
60575c3b8c
generic protocol: another attempt to make MSVC smile
2013-10-22 21:02:06 +02:00
Torsten Dreyer
6b75b23309
generic protocol: don't rely on GNU extension
2013-10-22 14:17:35 +02:00
Torsten Dreyer
baebc9b64c
Add protocol wrappers to the generic protocol
...
This adds two wrappers to the generic protocol to help interfacing
small microcontrollers (arduino et. al.)
When receiving binary data over a sequential link, it's hard to tell where a packet
starts and where it ends. Two existing solutions gets implemented with this patch:
KISS (http://www.ka9q.net/papers/kiss.html ) originally developed for ham radio
packet radio devices and STX/ETX byte stuffing.
This adds only the OUT direction, IN will be implemented over the next weeks.
For implementation details on the client (microcontroller's) side, check out
http://gitorious.org/flightgear-pmpt/cmpt/
This implementation is used in the c172fg project to be presented at FSweekend 2013.
2013-10-21 20:43:22 +02:00
ThorstenB
7ce2107336
Add support for IGC logging protocol.
...
Many light aircraft include GPS loggers capable of recording the flight
path using IGC records. Lots of third party utilities are available to
analyze, process and convert igc files.
Usage: "fgfs --igc=file,out,1,OutputFile.igc"
2013-10-14 22:13:31 +02:00
Clément de l'Hamaide
c022bb8d51
Move IAXClient library into 3rdparty directory
...
Remove ENABLE_IAX option
Add an improved FGCom standalone as part of FG in utils directory
2013-09-27 16:05:45 +02:00
Clément de l'Hamaide
639c7b82ee
remove unused #define
2013-09-22 17:42:24 +02:00
Clément de l'Hamaide
d948e34af8
Implement IAX callerID feature
2013-09-22 17:38:47 +02:00
James Turner
fda64d840e
Use helper to validate printf formats.
...
Simgear contains a new helper to validate format
strings for potentially dangerous replacements, use
it to fix the issues raised by Debian bug trackers.
2013-09-15 19:17:54 +01:00
James Turner
0c8d84aad1
Fix crash on re-position with FGCom.
...
Don't assume valueChanged firing means the value has actually
changed; various operations (eg, copyProperties) can also
cause the signals to fire.
2013-08-29 22:12:00 +01:00
Clément de l'Hamaide
0eef683af5
FGCom: implement a callback function and handle IAX text event
2013-08-28 18:09:22 +02:00
Clément de l'Hamaide
2bf62464cf
FGCom: Add a different max range for ground and tower frequencies
2013-08-27 20:32:31 +02:00
Clément de l'Hamaide
467783bd45
Clean FGCom logging and fix IAX input level
2013-08-24 17:51:03 +02:00
Clément de l'Hamaide
a215bc0625
Fix segFault on reset by checking IAX has been initialized
2013-08-22 14:12:06 +02:00
Clément de l'Hamaide
0e5b794a4a
FGCom: Should fix continous mic ON by checking state in main loop instead of listener
2013-08-21 20:24:07 +02:00
James Turner
206053722e
Fix crash on exit when FGCom is not being used.
2013-08-19 18:21:51 +01:00
Clément de l'Hamaide
7827e28ff3
Fix range calculation for special frequencies
...
Range for special freq was computed with previous freq, now they are always in range
Use a global variable (_currentFreqKhz) in order to avoid a <static_cast> in main loop; now it's only on frequency change
Fix a .size() > 0 for !.empty()
2013-08-19 16:08:29 +02:00
Tom Paoletti
81cd33e2fa
Performance optimization: empty() instead of size()>0
...
empty() is guaranteed to be constant complexity for both vectors and lists, while size() has linear complexity for lists.
2013-08-19 09:01:59 +01:00
f-jjth
d03b44b662
FGCom integrated into FlightGear.
...
Disabled by default at build time.
2013-08-16 17:02:47 +01:00
James Turner
948aa70af7
Fix native protocol crashes.
...
As part of this, kill off the evil global FDM state, and avoid us
copying FGInterfaces (which is bad since it contains TiedProperties
and an FGGroundCache, neither of which are especially keen on being
copied). Will probably disable copy/assignment on TiedProperties in
a future commit.
2013-07-18 12:01:36 +01:00
James Turner
5d9faee463
More unused vars caught by Xcode.
2013-07-04 20:56:04 +01:00
James Turner
2ec4b6ecc2
Fix warnings identified by updated XCode.
...
Mostly unused private vars, for various reasons.
2013-06-21 18:39:24 +01:00
James Turner
acddd0b0cf
Fix JPEG-factory build
2013-06-12 22:12:31 +02:00
Thomas Geymayer
dfa583c014
Use SGPath helpers and unescape from simgear
2013-06-10 21:42:53 +02:00
James Turner
0d6cd11dd4
Work with revised NetChannel poll() API.
2013-06-09 22:57:45 +01:00
James Turner
8551b010e9
Fix another compile fail.
...
No idea why I don't need this on Mac, hmm.
2013-02-09 16:38:34 +00:00
Christian Schmitt
2013f7149d
Some headers missing... ;)
2013-02-07 19:00:54 +01:00
Michał Gawron
e27be6ee92
Return double precision float as requested in generic/binary protocol.
2013-01-28 17:08:31 +00:00
James Turner
379e7a2fd5
Make HTTPClient a proper subsystem.
...
Avoid some statics, and incidentally make the proxy host/port settings dynamic (re-init the subsystem to update proxy settings, woo).
2012-11-19 11:30:12 +00:00