Skip to content

Commit 9c91f01

Browse files
committed
feat: allow absolute download folder setting
1 parent 40a56b0 commit 9c91f01

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

DOCS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ Callable events are to be actively invoked to interact with the WASM module.
5151

5252
- **Type**: Callable
5353
- **Description**: Triggers the download of a navdata package. **Note: there will be a temporary freeze and drop in frames (this can be mitigated by setting download options) due to the downloading and unzipping process. Once it's complete, performance returns to normal**
54-
- **Data**: JSON string with "url" (package URL) and "folder" (target extraction directory under `work/navdata/`) keys.
54+
- **Data**: JSON string with "url" (package URL) and "folder" (target extraction directory under `work/{FOLDER}`) keys.
5555
- **Example**:
5656
```json
5757
{
5858
"url": "totallyvalidpackageurl",
59-
"folder": "avionics"
59+
"folder": "navdata/avionics"
6060
}
6161
```
6262

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project Version="2" Name="NavdataInterfaceAircraftProject" FolderName="Packages"
3-
PublishingGroupFolderName="PublishingGroupsContent" MetadataFolderName="PackagesMetadata"
4-
PublishingGroupMetadataFolderName="PublishingGroupsMetadata">
2+
<Project Version="2" Name="NavdataInterfaceAircraftProject" FolderName="Packages" PublishingGroupFolderName="PublishingGroupsContent" MetadataFolderName="PackagesMetadata" PublishingGroupMetadataFolderName="PublishingGroupsMetadata">
53
<OutputDirectory>.</OutputDirectory>
64
<TemporaryOutputDirectory>_PackageInt</TemporaryOutputDirectory>
75
<PublishingGroupTemporaryOutputDirectory>_PublishingGroupInt</PublishingGroupTemporaryOutputDirectory>
86
<Packages>
97
<Package>PackageDefinitions\navigraph-aircraft-navdata-interface-sample.xml</Package>
108
</Packages>
11-
<PublishingGroups />
12-
</Project>
9+
<PublishingGroups/>
10+
</Project>
11+

examples/aircraft/PackageDefinitions/navigraph-aircraft-navdata-interface-sample.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
<OutputDir>html_ui\</OutputDir>
4545
</AssetGroup>
4646
</AssetGroups>
47-
</AssetPackage>
47+
</AssetPackage>
48+

src/wasm_navdata_interface/src/download/downloader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ impl NavdataDownloader {
213213
return;
214214
}
215215

216-
let path = PathBuf::from(format!("\\work/navdata/{}", folder));
216+
let path = PathBuf::from(format!("\\work/{}", folder));
217217
// If the directory exists, delete it
218218
if util::path_exists(&path) {
219219
match util::delete_folder_recursively(&path) {

0 commit comments

Comments
 (0)