Skip to content

Commit 079dc24

Browse files
committed
docs: broken links, formatting, improvements
1 parent ee191ea commit 079dc24

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@
2121

2222
## Repository Structure
2323

24-
Here's an overview on the structure of this repository, which is designed to be as simple as possible to use
25-
2624
- `example/`
2725
- `aircraft/` includes a base aircraft to test in the sim
2826
- `gauge/` includes a very simple TypeScript instrument to communicate with the WASM module
2927
- `src/`
30-
- `ts` Includes source code for the JS interface for using the sdk
28+
- `ts` includes source code for the JS interface for interfacing with the WASM module
3129
- `wasm` includes the Rust source code for the WASM module which handles the downloading of the database file, and interfacing with the database
3230

3331
## Including in Your Aircraft
@@ -46,9 +44,9 @@ Here's an overview on the structure of this repository, which is designed to be
4644

4745
- Note that if you already have a `VCockpit` with `NO_TEXTURE` you can just add another `htmlgauge` to it, while making sure to increase the index
4846

49-
4. **Optional**: Create a `Navigraph/config.json` file to assist with Sentry reports. This info will be reported to us should any error occur in the library. We will use this to directly reach out to you (the developer) for these errors.
47+
4. **Optional**: Create a `Navigraph/config.json` file to provide additional metadata at runtime. This info will be reported to us should any error occur in the library, enabling us to directly reach out to you (the developer) to help track down the issue.
5048

51-
- The file must look like
49+
- The file must follow this format:
5250

5351
```json
5452
{
@@ -61,23 +59,25 @@ Here's an overview on the structure of this repository, which is designed to be
6159

6260
## Dealing with Bundled Navigation Data
6361

64-
If you bundle outdated navigation data in your aircraft and you want this module to handle updating it for users with subscriptions, place the navigation data into the `Navigraph/BundledData` directory in `PackageSources`. You can see an example [here](examples/aircraft/PackageSources/Navigraph/BundledData/)
62+
If you bundle outdated navigation data in your aircraft and you want this module to handle updating it for users with subscriptions, place the navigation data into the `Navigraph/BundledData` directory in `PackageSources`. You can see an example [here](example/aircraft/PackageSources/Navigraph/BundledData/)
63+
64+
The navigation data interface will automatically use this database by default, making it immediately available on startup.
6565

6666
## Where is the Navigation Data Stored?
6767

6868
The default location for navigation data is `work/NavigationData`.
6969

7070
## Building the Sample Aircraft (MSFS2020)
7171

72-
Before building, make sure you have properly created and set an `.env` file in `examples/gauge`! An example can be found in the `.env.example` file in that directory. Replace with your credentials
72+
Before building, make sure you have properly created and set an `.env` file in `example/gauge`! An example can be found in the `.env.example` file in that directory. Replace with your credentials
7373

7474
1. Download and install [Bun](https://bun.sh/docs/installation)
7575
2. Open the `msfs-navigation-data-interface` folder in a terminal
7676
3. Run `bun i` the first time you build, in order to install dependencies
77-
4. Change directory to `examples/gauge` using `cd example/gauge`
77+
4. Change directory to `example/gauge` using `cd example/gauge`
7878
5. Run `bun run build` to build into the `PackageSources` folder of the aircraft sample (or `bun run dev` to build into the `Packages` folder of the aircraft and listen to changes in the source).
79-
6. Make sure the WASM module is included in the [`panel`](examples/aircraft/PackageSources/SimObjects/Airplanes/Navigraph_Navigation_Data_Interface_Aircraft/panel) folder! Look at either [Including in Your Aircraft](#including-in-your-aircraft) or [Building the WASM Module Yourself](#building-the-wasm-module-yourself) for info on that
80-
7. Open the `examples/aircraft/NavigationDataInterfaceAircraftProject.xml` file in the simulator and build there
79+
6. Make sure the WASM module is included in the [`panel`](example/aircraft/PackageSources/SimObjects/Airplanes/Navigraph_Navigation_Data_Interface_Aircraft/panel) folder! Look at either [Including in Your Aircraft](#including-in-your-aircraft) or [Building the WASM Module Yourself](#building-the-wasm-module-yourself) for info on that
80+
7. Open the `example/aircraft/NavigationDataInterfaceAircraftProject.xml` file in the simulator and build there
8181

8282
## Building the WASM Module Yourself
8383

@@ -92,13 +92,16 @@ The navigation data interface acts as its own WASM gauge in sim, so in order to
9292

9393
The gauge communicates using the following event names (all types referenced can be found [here](src/ts)):
9494

95-
- `NAVIGRAPH_CallFunction`: This event is received by the interface and is used to trigger one of the interfaces functions. It takes in arguments of type `CallFunction`. The available functions and their expected parameters can be found in the `json_structs.rs` file
95+
- `NAVIGRAPH_CallFunction`: This event is received by the interface and is used to trigger one of the interfaces functions. It takes in arguments of type `CallFunction`. The available functions and their expected parameters can be found in the [`src/ts`](src/ts) file
9696
- `NAVIGRAPH_FunctionResult`: This event is sent by the interface as a response to a previously triggered function. Its result will have the type `FunctionResult`, with the data field containing the expected return type of the function.
9797
- `NAVIGRAPH_Event`: This event is sent by the interface to give indications of progress or that the interface is running correctly.
9898

9999
### Example
100100

101-
Below is an example of communicating with the interface in JS. (We provide a JS wrapper, the code below is just a basic example to show how it works). Please read the CommBus documentation to determine how to interface with CommBus in your chosen language. `src/js` contains our JS wrapper, it is also a useful example for implementing a fully fleshed out wrapper.
101+
Below is an example of communicating with the interface in JS. Please read the CommBus documentation to determine how to interface with CommBus in your chosen language. [`src/ts`](src/ts) contains our JS wrapper, it is also a useful example for implementing a fully fleshed out wrapper.
102+
103+
> [!IMPORTANT]
104+
> We provide a JS wrapper that handles this for you. The below is just a quick look at how it works.
102105
103106
```js
104107
const queue = [];

0 commit comments

Comments
 (0)