@@ -75,11 +75,28 @@ This will setup a watch, and then automatically transpile and then copy the cont
75
75
npm run dev
76
76
```
77
77
78
- It's recommended to run this * after* you've started ACARS, or, in the ACARS configuration, disable the
79
- remote-download of configs:
78
+ ### Disable Downloading Latest Defaults
80
79
81
- > TODO: Guide on how to disable remote config downloading
80
+ Sometimes, it's just useful to disable downloading of the latest defaults, and just edit the scripts that are included
81
+ to see how they work. To do that, create a file in your ` Documents/vmsacars ` directory, called ` appsettings.local.json ` ,
82
+ and place the following:
83
+
84
+ ``` json filename="appsettings.local.json"
85
+ {
86
+ "Config" : {
87
+ "App" : {
88
+ "DownloadConfig" : false
89
+ }
90
+ },
91
+ "Serilog" : {
92
+ "MinimumLevel" : {
93
+ "Default" : " Verbose"
94
+ }
95
+ }
96
+ }
97
+ ```
82
98
99
+ You can also adjust the log level to "Information", "Debug" or "Verbose" ("Debug" is recommended)
83
100
84
101
---
85
102
@@ -104,31 +121,6 @@ It also includes other detailed type information, for example `Length`, so you c
104
121
105
122
---
106
123
107
- ## Disable Downloading Latest Defaults
108
-
109
- Sometimes, it's just useful to disable downloading of the latest defaults, and just edit the scripts that are included
110
- to see how they work. To do that, create a file in your ` Documents/vmsacars ` directory, called ` appsettings.local.json ` ,
111
- and place the following:
112
-
113
- ``` json filename="appsettings.local.json"
114
- {
115
- "Config" : {
116
- "App" : {
117
- "DownloadConfig" : false
118
- }
119
- },
120
- "Serilog" : {
121
- "MinimumLevel" : {
122
- "Default" : " Verbose"
123
- }
124
- }
125
- }
126
- ```
127
-
128
- You can also adjust the log level to "Information", "Debug" or "Verbose" ("Debug" is recommended)
129
-
130
- ---
131
-
132
124
## Aircraft Configuration:
133
125
134
126
Aircraft rules are required to inherit the ` AircraftConfig ` abstract class. An example class would look like:
@@ -180,6 +172,8 @@ The configuration is a class which has a few different components.
180
172
- ` AircraftConfigSimType.XPlane `
181
173
- ` AircraftConfigSimType.Fsuipc `
182
174
- ` AircraftConfigSimType.MsFs `
175
+ - ` AircraftConfigSimType.MsFs20 `
176
+ - ` AircraftConfigSimType.MsFs24 `
183
177
- ` enabled `
184
178
- ` priority ` - from 1 (lowest) to 10 (highest). If there are multiple rules which match this, then which one takes
185
179
priority. All the built-in rules are at a priority 1, and aircraft specifics rules are priority 2. I recommend
@@ -202,6 +196,14 @@ The configuration is a class which has a few different components.
202
196
In the above example, for the Fenix A320, the landing lights are controlled by two datarefs, both of which the
203
197
values need to be 1 or 2 for the landing lights to be considered "on".
204
198
199
+ #### Targeting MSFS
200
+
201
+ There are 3 possible values for targetting MSFS in the configs:
202
+
203
+ - `AircraftConfigSimType.MsFs` - This will apply the configuration to both 2020 and 2024
204
+ - `AircraftConfigSimType.MsFs20` - This will be for 2020 ONLY
205
+ - `AircraftConfigSimType.MsFs24` - This will be for 2024 ONLY
206
+
205
207
### Features
206
208
207
209
Features are essentially stored in a dictionary of dictionaries, of type ` FeatureAddresses ` :
@@ -266,6 +268,11 @@ export default class Example extends AircraftConfig {
266
268
}
267
269
```
268
270
271
+ ### Equality Checking
272
+
273
+ I recommend using ` == ` instead of ` === ` for equality comparisons, since the types coming from the sim
274
+ may not always match up or be casted properly (e.g, ` 1 ` being returned instead of ` true ` )
275
+
269
276
### Ignoring Features
270
277
271
278
To ignore a feature in the rules (for example, if a feature doesn't work properly), set the feature to false:
@@ -391,7 +398,7 @@ export default class BatteryOnDuringPushback implements Rule {
391
398
// First check that the battery is declared as part of the aircraft's feature set
392
399
if (AircraftFeature .Battery in data .features
393
400
// And then check its value to see if it's on or off
394
- && data .features [AircraftFeature .Battery ] === false ) {
401
+ && data .features [AircraftFeature .Battery ] == false ) {
395
402
return [' The battery must be on during pushback' ]
396
403
}
397
404
}
0 commit comments