xp-command 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +15 -18
  2. package/package.json +32 -16
  3. package/src/config.yml +2 -2
package/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  **Quick cockpit commands for X-Plane 12** - set your radios, altimeter, autopilot, and more from the terminal while flying.
4
4
 
5
+ | ![Screenshot 1](https://private-user-images.githubusercontent.com/527049/508717737-406f9777-65fa-4e68-a567-0000ab0752ff.gif?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjIwOTU0MTgsIm5iZiI6MTc2MjA5NTExOCwicGF0aCI6Ii81MjcwNDkvNTA4NzE3NzM3LTQwNmY5Nzc3LTY1ZmEtNGU2OC1hNTY3LTAwMDBhYjA3NTJmZi5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwMlQxNDUxNThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04NDBmMmE4NjhjNDYzZTM2NGZiNjE2MzcxNGEzY2U3MjkwMDZlMmI2OWIxNGZiZjdkM2Y2MzEyNzA4OWEwZmNmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Mfno_SxgF05_L4D9t7vQnmkRsPhkbkl-APGzOsH8CL8) | ![Screenshot 2](https://private-user-images.githubusercontent.com/527049/508717738-6fe80ed3-a30e-4b0d-b368-54061fb044ae.gif?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjIwOTU0MTgsIm5iZiI6MTc2MjA5NTExOCwicGF0aCI6Ii81MjcwNDkvNTA4NzE3NzM4LTZmZTgwZWQzLWEzMGUtNGIwZC1iMzY4LTU0MDYxZmIwNDRhZS5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwMlQxNDUxNThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kMGJhM2UyMzZmMDcxMTg4MmVhMDhiYzRmY2VjYTBmMzc1ZjQxZjI0NDQwYWViODZhZWM5MDIxNThiM2VjMzYzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.zTG3-LCMrCInyRSHbkdWzARl4gpeTQtUM3oeRj9teQo) |
6
+ | ----------------- | ---------------- |
7
+
8
+
5
9
  ---
6
10
 
7
11
  ## 🎯 What does this tool do?
@@ -26,11 +30,7 @@ You need Node.js version 22 or higher installed on your system:
26
30
 
27
31
  1. **Download Node.js**: Go to https://nodejs.org/en/download/ and download the **LTS version** (Long Term Support)
28
32
  2. **Install**: Run the downloaded installer
29
- 3. **Verify**: Open Terminal and type:
30
- ```bash
31
- node --version
32
- ```
33
- You should see something like `v22.x.x`
33
+ 3. **Verify**: Open Terminal and type `node --version` (you should see something like `v22.x.x`)
34
34
 
35
35
  ### Step 2: Install xp-command globally
36
36
 
@@ -60,10 +60,7 @@ You shouldn't need to perform any extra setup steps in X-Plane. There is no plug
60
60
 
61
61
  1. **Load into an aircraft** in X-Plane 12
62
62
  2. **Open Terminal** on your machine
63
- 3. **Run**:
64
- ```bash
65
- xp-command
66
- ```
63
+ 3. **Run** `xp-command`
67
64
 
68
65
  You'll see a prompt:
69
66
  ```
@@ -90,7 +87,7 @@ Type `exit` or press `Ctrl+C`
90
87
 
91
88
  All pre-configured commands work well with most aircraft I currently fly, but you may want to adjust them for **your** aircraft (see _Aircraft-specific profiles_ section below).
92
89
 
93
- ### Barometric Pressure
90
+ ### Barometric pressure
94
91
 
95
92
  | Command | Action | Example |
96
93
  |---------|-----------------------------------------|--------------|
@@ -148,11 +145,11 @@ You can edit these YAML files to add aircraft-specific commands or modify existi
148
145
  **Example**: Add a command to set heading with 10-degree increments:
149
146
 
150
147
  ```yaml
151
- - pattern: "^hdg(\\d{2})$"
152
- type: set
153
- dataref: sim/cockpit/autopilot/heading_mag
154
- transform:
155
- - mult10
148
+ - pattern: "^hdg(\\d{2})$"
149
+ type: set
150
+ dataref: sim/cockpit/autopilot/heading_mag
151
+ transform:
152
+ - mult10
156
153
  ```
157
154
 
158
155
  **Key components:**
@@ -161,7 +158,7 @@ You can edit these YAML files to add aircraft-specific commands or modify existi
161
158
  - `dataref`: X-Plane dataref path (find these in X-Plane's DataRef Editor)
162
159
  - `transform`: Optional value conversions (multiply, divide, round, etc.)
163
160
 
164
- **Finding datarefs**: Use X-Plane's built-in **DataRef Editor** plugin or check [X-Plane datarefs documentation](https://developer.x-plane.com/datarefs/).
161
+ **Finding datarefs**: Use [the DataRefTool plugin](https://datareftool.com) or check [X-Plane datarefs documentation](https://developer.x-plane.com/datarefs/).
165
162
 
166
163
  #### Array Datarefs
167
164
 
@@ -266,7 +263,7 @@ npm uninstall -g xp-command
266
263
 
267
264
  ---
268
265
 
269
- ## 🛣 How it works (technical overview)
266
+ ## 💡 How it works (technical overview)
270
267
 
271
268
  1. **Web API connection**: Uses [X-Plane local REST Web API](https://developer.x-plane.com/article/x-plane-web-api/)
272
269
  2. **Dataref system**: Reads/writes X-Plane datarefs (internal simulator variables)
@@ -295,4 +292,4 @@ Found a bug or want to add features? Submit issues or pull requests on the [GitH
295
292
 
296
293
  ---
297
294
 
298
- **👋🏻 Happy flying!**
295
+ **👋🏻 Happy flying!**
package/package.json CHANGED
@@ -1,16 +1,47 @@
1
1
  {
2
2
  "name": "xp-command",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Quick cockpit commands for X-Plane 12 - set your radios, altimeter, autopilot, and more from the terminal while flying.",
5
+ "keywords": [
6
+ "xplane",
7
+ "x-plane",
8
+ "aviation",
9
+ "cli"
10
+ ],
11
+ "homepage": "https://github.com/borisdiakur/xp-command#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/borisdiakur/xp-command/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/borisdiakur/xp-command.git"
18
+ },
19
+ "license": "MIT",
20
+ "author": "Boris Diakur (https://borisdiakur.de)",
5
21
  "type": "module",
6
22
  "bin": {
7
23
  "xp-command": "./bin/index.js"
8
24
  },
25
+ "files": [
26
+ "bin/",
27
+ "src/",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
9
31
  "scripts": {
10
32
  "start": "node bin/index.js",
11
33
  "start:clean": "npm run clean && npm start",
12
34
  "clean": "rm -rf ~/.xp-command/"
13
35
  },
36
+ "dependencies": {
37
+ "@inquirer/core": "^10.3.0",
38
+ "chalk": "^5.6.2",
39
+ "commander": "^14.0.2",
40
+ "conf": "^15.0.2",
41
+ "inquirer": "^12.10.0",
42
+ "js-yaml": "^4.1.0",
43
+ "ora": "^9.0.0"
44
+ },
14
45
  "devDependencies": {
15
46
  "@types/js-yaml": "^4.0.9",
16
47
  "@types/node": "^24.9.2",
@@ -23,21 +54,6 @@
23
54
  "typescript": "^5.9.3",
24
55
  "typescript-eslint": "^8.46.2"
25
56
  },
26
- "keywords": [
27
- "X-Plane"
28
- ],
29
- "author": "Boris Diakur (https://borisdiakur.de)",
30
- "repository": "borisdiakur/xp-command",
31
- "license": "MIT",
32
- "dependencies": {
33
- "@inquirer/core": "^10.3.0",
34
- "chalk": "^5.6.2",
35
- "commander": "^14.0.2",
36
- "conf": "^15.0.2",
37
- "inquirer": "^12.10.0",
38
- "js-yaml": "^4.1.0",
39
- "ora": "^9.0.0"
40
- },
41
57
  "engines": {
42
58
  "node": ">=22"
43
59
  }
package/src/config.yml CHANGED
@@ -55,7 +55,7 @@ commands:
55
55
  - toFixed2
56
56
 
57
57
  # set autopilot vertical speed
58
- - pattern: "^v(\\d\\d?\\d?\\d?)$"
58
+ - pattern: "^v(-?\\d\\d?\\d?\\d?)$"
59
59
  type: set
60
60
  dataref: sim/cockpit/autopilot/vertical_velocity
61
61
 
@@ -69,7 +69,7 @@ commands:
69
69
  type: set
70
70
  dataref: sim/cockpit/autopilot/altitude
71
71
  transform:
72
- - mult10
72
+ - mult100
73
73
  - round
74
74
 
75
75
  # set com1 frequency