Commit Graph

3910 Commits

Author SHA1 Message Date
Stanislaw Halik
0186cbb7b7 cmake: prevent Boost barfing out too many warns 2013-10-03 21:49:38 +01:00
Stanislaw Halik
fa36e94c4b fix static build with recent GNU binutils
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
2013-10-03 21:49:38 +01:00
James Turner
ad83e70cf5 Extend built-in Nasal math.
- rename mod() to fmod() to prevent collisions with the
version in math.nas (which has different handling of negatives)
- implement pow, tan, acos and asin natively
- add round(x, [p]), which rounds away from 0.0, and takes an
option precision. I.e you can round(479, 50) and get '500'; useful
in many digital cockpit displays.
2013-10-03 17:40:17 +01:00
James Turner
4a0377c0a1 Rename WaitingSyncItem -> SyncItem.
More accurate name (we have these for items which are not waiting),
and also shorter.
2013-09-30 21:59:18 +01:00
James Turner
83a3241830 Fix a signed/unsigned compare warning 2013-09-30 16:44:04 +01:00
James Turner
f299b351e3 Expose active tiles via API, sync by SGBucket.
Provide an API to query which tiles are currently being synced. This
allows the higher levels (TileManager in FlightGear) to safely wait on
TerraSync before loading tiles.

Doing this exposed some bugs in scheduling tiles to sync by integer
lat/lon, related to round-towards-zero with -ve values (western /
souther hemispheres). To resolve these, and also reduce spurious
syncs, switch to an explicit API for requesting tiles by SGBucket.
This keeps TerraSync fully aligned with the TileManager queue, which
has many benefits for both high and low visibility situations.
2013-09-30 16:35:45 +01:00
James Turner
3880e4ef47 Say which ocean tile we generated. 2013-09-30 12:08:10 +01:00
James Turner
f205e918d9 sprintf -> snprintf in bucket code. 2013-09-30 12:07:57 +01:00
James Turner
42b0b9306b Make code quieter at log-level=DEBUG. 2013-09-28 14:45:30 +01:00
James Turner
483659c319 HTTP: adjust request-connection assignment.
Prefer existing, idle connections to creating new connections,
even when below the max-connection limit. Gives much better re-use
and pipeline-ing, and hence reduced setup time/trips.
2013-09-28 14:03:39 +01:00
James Turner
add14dd27c Reposition hook for terrasync.
When re-init-ing the sim, tell TerraSync what's going on (we don't want
to actually reset it, since that would disturb in-flight downloads).
Add an explicit method so it can reset its last lon/lat, and hence do
the initial sync at the new location correctly.
2013-09-27 20:28:43 +01:00
James Turner
61516a5e97 Terrasync: Expose transfer rate as a property. 2013-09-27 18:23:51 +01:00
James Turner
17418039e1 HTTP bugfix + enhancement.
Track 'waiting for response' state explicitly, so we don't
falsely report IDLE when waiting for a response.

Expose bytes-per-second download rate as metric.
2013-09-27 18:20:03 +01:00
James Turner
25cae61211 Allow TerraSync to be inited early.
Add explicit subsystem state tracking so we can safely init()
terrasync very early during startup, and hence overlap lengthy operations
(Shared Models sync and initial NavCache build)
2013-09-26 12:11:48 +01:00
James Turner
db98c7440e Parallel sync of items.
When using built-in sync code, separate items into distinct slots.
Slots process items sequentially, but each slot works in parallel (using 
a single shared HTTP engine). This allows tiles to be synced in parallel
with airports/shared models data, greatly increasing responsiveness
to get tiles synced on initial launch.
2013-09-25 16:31:10 +01:00
James Turner
3783ae2234 Rename WaitingTile to WaitingSyncItem.
We already synchronise other things besides tiles, and will soon want different
behaviour based on the type of item we're syncing (so we can synchronize some items in parallel). Rename the struct to be clearer, and add an enum encoding the type of item for future use.
2013-09-23 18:20:16 +01:00
James Turner
3e8732b230 Libsvn / APR dependency is removed.
Remove any use of libsubversion / API in Simgear, and always
compile the built-in SVN client code.
2013-09-23 18:05:37 +01:00
James Turner
b39bca9458 Fix no-svn build (Win64 only at present) 2013-09-20 09:18:43 +01:00
James Turner
d263334030 Attempting to fix import/export linkage on Windows.
Hopefully this tells the Expat headers not to do any clever
declspec(import) or export stuff, which we don't want since we only
use the symbols within SimGearCore, and don't export them.
2013-09-19 22:07:41 +01:00
James Turner
b2cea62189 Even more forcing of include file names.
(It's a good thing Windows doesn't ship Expat, since apparently
every other platform does)
2013-09-19 21:58:23 +01:00
James Turner
d6b886c69b Change got lost in the move/rename, not good. 2013-09-19 21:47:40 +01:00
James Turner
38fb9ea41e Intermediate static libs have issues.
Switch back to including the bundled expat sources directly in the
targets, since transitive linking of static libs is very awkward.
Makes static build happy again (let's see what else breaks)
2013-09-19 21:42:28 +01:00
James Turner
a922aaa68e Move bundled Expat to new home.
Renamed bundled Expat headers to avoid any
possibility of accidental including system headers when
using bundled Expat, or vice-versa. Should help with SVN
crashes reported by Thomas.
2013-09-19 20:12:32 +01:00
James Turner
4f2e36ca46 rand(), not random(), for Windows. 2013-09-19 08:57:34 +01:00
James Turner
f367627cac Fix HTTP unit test.
Also fix a signed/unsigned warning I caused.
2013-09-18 22:55:11 +01:00
James Turner
7a7fcf10ad Fix missing include for non-Mac 2013-09-18 22:13:04 +01:00
James Turner
b9bd2734eb Persistent SVN update cache.
Make the already present cache of updated URLs persistent, with a
definable lifetime, currently 24 hours. This ensures terrasync-ed
resources are checked less often (max once per day) instead of each
FGFS launch, which should greatly cut down requests to the backend.
2013-09-18 21:40:35 +01:00
James Turner
9c7bd4f5d5 HTTP Client improvements
- max connections limit, and parallel connections to a single host where possible.
  (Will permit updating terrain and Models / Airports / data in parallel)
- add LGPL headers
- give HTTP::Client a private impl class, to keep header simple.
2013-09-18 12:17:38 +01:00
James Turner
362d47f91f Kill legacy PPM support in screen-dump 2013-09-18 12:17:29 +01:00
James Turner
a18792c397 Printf format sanitising.
Refactored version for next, use a new helper in
simgear::strutils.
2013-09-15 13:30:12 +01:00
James Turner
0e2ddb2f16 Bah, tested on the wrong compiler, so missed a file. 2013-09-14 18:05:53 +01:00
James Turner
bcfadd6657 Prefix GCC version constant.
From: Markus Wanner <markus@bluegap.ch>
2013-09-14 17:29:59 +01:00
Thomas Geymayer
021cf1a2b4 Remove temporary file and add to .gitignore 2013-09-07 14:28:46 +02:00
James Turner
acf86be516 Rename MD5 code.
Linux crashes with this code seem to relate
to multiple instances of these symbols. Prefix
the SimGear versions to prove/disprove this.
2013-09-04 08:45:06 +01:00
James Turner
dd93eb88f2 Ensure sglog() singleton is threadsafe.
Slightly simplistic, but definitiely correct, method
for ensuring singleton creation is threadsafe. Can
be optimised if lock contention is ever an issue.
2013-09-04 08:45:06 +01:00
James Turner
e06f9e35b3 Tweak for 64-bit Linux linkage. 2013-09-04 08:45:06 +01:00
James Turner
c0424aba7e SG part of fix for TerraSync models.
Ensure we search the TerraSync models tree before the FG_ROOT one,
since the TerraSync one contains newer files and updates to the base
one.
2013-08-29 22:13:43 +01:00
Thomas Geymayer
b468254d73 Fix #1163 2013-08-17 17:47:23 +02:00
Tom Paoletti
15e3e92ec2 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-16 16:48:35 +01:00
James Turner
ee403fd83a No need to deal with OSG versions pre 3.0 2013-07-29 22:53:31 +01:00
James Turner
05f266ac10 HTTP SVN fixes, cap max update-report depth. 2013-07-28 21:07:40 +01:00
James Turner
f52c0026dd Better reporting when an HTTP request fails. 2013-07-28 21:06:17 +01:00
Thomas Geymayer
a284107249 Canvas: ensure render order equals order in property tree.
Prevents also changing the render order if changing eg. the size
of a Canvas.
2013-07-26 23:31:46 +02:00
James Turner
a2e25e7940 Fix for #587, crash on break/continue.
Look for use of break/continue outside of a loop context,
and report a parser error instead of crashed. Thanks to
Philosopher for the patch.
2013-07-23 21:58:38 +01:00
James Turner
d45a0161cf Initialise token precedence rule.
Thanks to Philosopher for the catch.
2013-07-23 21:51:47 +01:00
James Turner
c7a5d15e7a Bug 585, assignment to multiple l-values.
Disambiguate multiple-values from function invocation. Will merge
to release branch after testing.
2013-07-23 09:45:22 +01:00
James Turner
3cb2241b1d Bug 737, crash parsing default args.
Reject function evaluation explicitly when building
default arguments.
2013-07-23 09:45:22 +01:00
Thomas Geymayer
b236821661 Canvas: Ensure all element types are initialized before first usage.
If setting properties on a group a check is performed if
this property exists on any possible child element, and
only if this is the case the property is stored in the
groups style.

Previously elements have been only initialized during
their first usage, leading to ignored styles if they
have been set on a parent element before instantiating
an instance of the actual element type.
2013-07-20 15:45:02 +02:00
Thomas Geymayer
fc75b0bd21 Canvas::Text: add line-height property. 2013-07-19 23:38:08 +02:00
Thomas Geymayer
a9fc84d568 Canvas: clip region rounding and catch negative size. 2013-07-19 23:37:04 +02:00