Commit Graph

68 Commits

Author SHA1 Message Date
Klaus Basan
8bd969105a XSwiftBus install dialog (for local environment)
* can also be called from menu
* improved file check
* renamed some functions
2018-05-18 00:25:02 +02:00
Klaus Basan
42ef7c5633 Avoid long "hanging" if Windows UNC path is not reachable
Use own "isDirExisting" function checking UNC paths
2018-04-05 02:54:40 +02:00
Klaus Basan
c207d589a9 Ref T131, XPlane utility functions
* find XPL files
* newer build files
* conflicting files?
* some renamings
2018-04-05 02:53:30 +02:00
Roland Winklmeier
2ab6a96d57 Adapt to libxplanemp improvements
* XPMPMultiplayerInit API change
* New CSL command 'VERT_OFFSET'
* OBJ8 objects can have multiple textures now. Therefore use the same model
name convention as with OBJ7.
2018-04-05 02:52:24 +02:00
Klaus Basan
640ec3a573 Ref T252, send all loading status messages as list 2018-02-22 01:26:23 +01:00
Klaus Basan
b01119cc1b Ref T252, utility functions for simulator directories 2018-02-16 12:13:53 +01:00
Klaus Basan
1970ae9f9b Ref T252, formatting 2018-02-16 12:13:50 +01:00
Klaus Basan
e9e0ae1ff4 Ref T241, Ref T243 formatting and minor tweaks
* unified how we write thread_local const
* ASSERTs
* formatting
2018-02-04 08:53:48 +01:00
Klaus Basan
2f0253b3eb Ref T118, support multiple model directories
* this was recently discussed https://swift-project.slack.com/archives/C04J6J76N/p1508430536000065
* for config parser already implemented
* for XP the loading from multiple dirs still needs to be implemented (see todo)
2017-10-31 15:39:15 +01:00
Klaus Basan
e920dc77b8 Ref T118, formatting 2017-10-31 15:39:12 +01:00
Klaus Basan
65bc1c00fb Formatting, "this->m_" to "m_", comments 2017-09-24 20:29:09 +01:00
Klaus Basan
329b0512eb Ref T125, utility functions 2017-09-24 19:53:20 +01:00
Klaus Basan
65bd2d20ad Ref T125, X-Plan utility functions and moved XSwiftBus settings in own file 2017-09-24 19:53:03 +01:00
Mathew Sutcliffe
05c0d046aa Removed outdated todos. 2017-09-24 19:52:37 +01:00
Mathew Sutcliffe
bc80fd3bd5 [feature][XPlane] Set own aircraft model string when own aircraft changes.
Summary:
Refactored parts of CAircraftModelLoaderXPlane::parseFlyableAirplanes into static method extractAcfProperties that can be called by xswiftbus.

Used extractAcfProperties in xswiftbus to provide the model string to the driver. Implemented CSimulatorXPlane::ps_emitOwnAircraftModelChanged.

Implements T74.

Reviewers: rwinklmeier

Reviewed By: rwinklmeier

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D23
2017-05-14 17:21:39 +01:00
Mathew Sutcliffe
183d3f58e7 X-Plane model loader: fixed malformed model strings with spurious multiple liveries.
Each livery was being appended to the model string of the previous livery model.
Reported by Alex Beavil.
2017-05-07 21:52:14 +01:00
Mathew Sutcliffe
b1e57e28d0 Fixed QVector out-of-bounds assert in X-Plane model loader. 2017-05-06 20:22:46 +01:00
Klaus Basan
c3ed0bc394 Ref T28, removed areModelFilesUpdated and info if loading was from cache
* removed CacheUntilNewer
* did not really work and had some problems
* cache timestamp not really a good value to compare with
* too slow with remote file
2017-05-05 23:08:04 +01:00
Mathew Sutcliffe
816f3bd48e New X-Plane flyable plane model string schema
Summary:
New aircraft for XP11 should include a name, author, and studio. These can be used to generate a better model string that doesn't depend on file or directory names.

If the `.acf` contains studio, this is used as the distributor. Otherwise, we use author as distributor instead (truncated in case it is a long list of names).

Then the model string is constructed by combining distributor and model name. If the model name already contains the distributor, we just use the model name.

If the name and distributor are missing, we fall back to the old scheme based on `.acf` filename and dirname.

I have also added a space between aircraft and livery. And I have added default description strings.

After this has landed and been deployed to users, we will need to remove all flyable X-Plane planes from the database and start again with them. (These are the excluded ones.) And we can't accept mappings that use the fallback old scheme if the submitted has renamed the `.acf` file or directory name.

Reviewers: rwinklmeier, kbasan

Reviewed By: kbasan

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D16
2017-05-05 23:07:28 +01:00
Mathew Sutcliffe
fbc9c37646 X-Plane model loader: performance tweaks.
Summary:
Using `QStringRef` and `QLatin1String` to avoid unnecessary allocations and conversions.

Depends on D12.

Reviewers: rwinklmeier, kbasan

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D13
2017-05-05 23:07:27 +01:00
Mathew Sutcliffe
4e23cd1382 X-Plane model loader: support extra properties of .acf files
Summary:
There are optional fields in an X-Plane flyable aircraft that we can use if they are present:

* Description
* Name
* Distributor

If not present, the user has to edit them manually.

@kbasan Any problem with constructing a `CDistributor` with empty db key?

Reviewers: rwinklmeier, kbasan

Reviewed By: rwinklmeier

Subscribers: jenkins, kbasan

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D12
2017-05-05 23:07:25 +01:00
Mathew Sutcliffe
4a4dea8d4d Rename xbus to xswiftbus
Summary:
I wanted to rename xbus because its relation to //swift// is not immediately clear from the name.

xswiftbus seems reasonable.

Reviewers: #swift_pilot_client, kbasan

Reviewed By: kbasan

Subscribers: kbasan, jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D14
2017-05-05 23:07:11 +01:00
Mathew Sutcliffe
e3fe8ec39f refs #937 Resolved clazy warnings: miscellaneous. 2017-04-19 19:31:50 +01:00
Mathew Sutcliffe
fce1513dae refs #937 Resolved clazy warnings: unnecessary detaching of containers. 2017-04-19 19:31:38 +01:00
Mathew Sutcliffe
488f42b0a1 refs #928 Parse and load OBJ8 CSL packages. 2017-04-19 19:31:33 +01:00
Klaus Basan
0851b8c994 refs #868, added xplaneDir utility function to remove boilerplate code
and using CFileUtils::appendFilePaths to concat file paths
2017-04-17 23:58:48 +01:00
Klaus Basan
99c792dd4b Refs #868 Use CXPlaneUtil::xplaneRootDir() in the X-Plane plugin 2017-04-17 23:58:46 +01:00
Michał Garapich
f25d569ae8 refs #868 Add CXPlaneUtil::xplane11Dir() 2017-04-17 23:58:45 +01:00
Klaus Basan
5a91f561be refs #888, loadingFinished with CStatusMessage 2017-03-01 20:51:40 +01:00
Klaus Basan
8e55baaf85 Typos, QStringBuilder 2017-03-01 20:51:39 +01:00
Roland Winklmeier
d8de6bc398 Fix CXPlaneUtil::xplane10Dir() on Mac OS
Q_OS_UNIX is also defined on Mac OS, therefore the Q_OS_OSX branch
was never reached.
This concludes the test of this function on Mac OS and the todos
can be removed.
2017-02-24 00:18:20 +00:00
Mathew Sutcliffe
6c36cd202b refs #837 ICoordinateGeodetic::geodeticHeight is a CAltitude. 2017-01-10 23:44:34 +00:00
Roland Winklmeier
db6b3b07fa Ignore empty lines and comments when parsing xsb_aircraft.txt 2016-12-13 18:32:26 +00:00
Mathew Sutcliffe
78099c0ebe refs #824 X-Plane model loader: set exclude flag for flyable aircraft. 2016-12-13 19:01:59 +01:00
Klaus Basan
02798a7f2b refs #822, set file ts in parser/modelloader 2016-12-13 19:01:52 +01:00
Mathew Sutcliffe
520f593d51 refs #747 It must be possible to load CSL models from a user-supplied directory. 2016-09-02 00:57:01 +01:00
Mathew Sutcliffe
87eeac4e15 refs #710 Simple algorithms to replace several regular expressions. 2016-08-30 04:02:00 +01:00
Klaus Basan
227190ab42 Minor adjustments
* ignore empty root dir
* check for empty context
2016-08-26 21:05:43 +01:00
Klaus Basan
5789120ecc refs #555, load models from directory
* file dialog
* adjusted signatures to pass directory
2016-08-26 21:05:42 +01:00
Klaus Basan
019b623f43 refs #720, adjusted model loader
* callback function to data consolidation (so I can refer to consolidation in BlackCore)
* use status message in parser
* avoid duplicate keys (WOAI has ambiguous model strings which are to be excluded)
2016-08-26 21:04:21 +01:00
Klaus Basan
554d1add79 refs #676, allow 1..n model directories
* adjusted loaders
* changed settings
2016-06-23 20:13:29 +02:00
Klaus Basan
bc344c73fc refs #585, adjusted loaders
* use paths from settings
* no longer pass model directory and exclude directories
2016-06-15 00:11:26 +02:00
Klaus Basan
1ef1cc0021 refs #585, adjusted XP utils 2016-06-15 00:11:24 +02:00
Roland Winklmeier
3e4e49a6b6 Set last modification timestamp when loading X-Plane models
This feature was already implemented for MS Flight Simulator model
loaders and missing in the X-Plane model loader.
2016-05-24 16:59:16 +02:00
Roland Winklmeier
d0313c7524 Style 2016-05-20 01:31:26 +02:00
Roland Winklmeier
3d7a39ed00 Fix BlackMisc header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #630
2016-05-13 17:05:49 +02:00
Klaus Basan
0f5d2a29a8 refs #655, Change signature (order) of setProperty/compareProperty 2016-05-13 16:44:17 +02:00
Klaus Basan
43f9515eaa refs #641, moved last simulator selection to caches
* removed from component cache
* kept renamed component caches as stubs for later usage

refs #646, removed gui state cache as it causes build issues on Jenkins
(idea was to keep the classes as stubs for later usage)
2016-05-07 20:11:41 +02:00
Klaus Basan
5d39c906e4 refs #640, support for simulator in distributor
* changed backend (JSON) and added support for simulator data
* get distributors by simulator
* renamed to setSimulator / getSimulator
2016-05-05 20:49:18 +02:00
Klaus Basan
ddc7347927 refs #643, moved aircraft model icon loading to model class
* removed iconForModel from interface and aircraft config parser
* CPixmap support for loading pixmap from file
* Access to model of model set loader by model string
* icon path as member of CAircraftModel
2016-05-05 20:49:16 +02:00