aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst18
-rwxr-xr-xapp.mjs6
-rw-r--r--package-lock.json4
-rw-r--r--package.json2
-rw-r--r--profile.yaml13
5 files changed, 33 insertions, 10 deletions
diff --git a/README.rst b/README.rst
index 02754dd..8e194a1 100644
--- a/README.rst
+++ b/README.rst
@@ -4,6 +4,22 @@ Loupe Flightdeck
NOTICE: please ask me for permission before using the code for any commercial purpose.
- Only tested on `Razer Stream Controller`_ (which is an identical device to `Loupedeck Live`_, I bought it because it's cheaper).
+
+
+Install from NPM
+----------------
+
+::
+
+ # macOS: make sure you have dependencies installed
+ # brew install nodejs
+ # brew install pkg-config pixman cairo pango
+
+ npm install -g loupe-flightdeck # install this app
+ loupe-flightdeck # run, or run with profile file name as first parameter
+
+Try from the repo
+-----------------
- Setup: ``npm install``
- Run: ``./app.mjs`` or ``node app.mjs`` (make sure you don't have other software using the same device, such as Loupedeck's official software running)
@@ -24,7 +40,7 @@ Demo
Resources
---------
-- Only tested on Linux/Windows (run with CMD), please let me know if it also runs or doesn't run on macOS.
+- Tested on Linux/Windows/macOS (different OS may require different ways to install the dependencies).
- Currently only X-Plane is supported. If you're interested in working on MSFS support, etc., please let me know.
- Videos: https://photos.app.goo.gl/1hAQ19DZQRo4RRr9A
diff --git a/app.mjs b/app.mjs
index 6daa65a..389b656 100755
--- a/app.mjs
+++ b/app.mjs
@@ -914,7 +914,7 @@ const renderBarGauge = (c, display, values_) => {
}
};
-const drawGauge = async (key, label, values) => {
+const drawGauge = (key, label, values) => {
const types = {
meter: renderMeterGauge,
text: renderTextGauge,
@@ -1044,7 +1044,7 @@ device.on("connect", async () => {
}
}
}
- loadPage(getCurrentPage());
+ await loadPage(getCurrentPage());
});
const handleKnobEvent = async (id) => {
@@ -1091,7 +1091,7 @@ device.on("down", async ({ id }) => {
}
console.info(`switch to page: ${id}`);
currentPage = id;
- loadPage(getCurrentPage());
+ await loadPage(getCurrentPage());
} else {
takeAction(await handleKnobEvent(id), "pressed", false);
}
diff --git a/package-lock.json b/package-lock.json
index d06de21..49212a9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "loupe-flightdeck",
- "version": "0.0.7",
+ "version": "0.0.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "loupe-flightdeck",
- "version": "0.0.7",
+ "version": "0.0.8",
"dependencies": {
"async": "^3.2.6",
"canvas": "^2.11.2",
diff --git a/package.json b/package.json
index 00141c1..0417fc7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "loupe-flightdeck",
- "version": "0.0.7",
+ "version": "0.0.8",
"description": "Turn your stream deck into a flight deck!",
"repository": {
"type": "git",
diff --git a/profile.yaml b/profile.yaml
index 3cfd1f0..4d28e65 100644
--- a/profile.yaml
+++ b/profile.yaml
@@ -75,7 +75,7 @@
- 12
exp:
- '$d'
- - '1 - $d'
+ - '$d != null ? 1 - $d : null'
- '$d'
- '$d'
@@ -127,6 +127,7 @@
- label:
- Flaps
- Up
+ size: 20
pressed:
xplane_cmd: sim/flight_controls/flaps_up
- display:
@@ -165,6 +166,7 @@
- label:
- Flaps
- Down
+ size: 20
pressed:
xplane_cmd: sim/flight_controls/flaps_down
- display:
@@ -237,6 +239,7 @@
- label: Brake
pressed:
xplane_cmd: sim/flight_controls/brakes_toggle_regular
+ size: 20
# Page 1
- right:
@@ -416,10 +419,14 @@
xplane_cmd: sim/GPS/g1000n1_nav12
-
keys:
- - label: <-COM
+ - label:
+ - COM
+ - <->
pressed:
xplane_cmd: sim/GPS/g1000n1_com_ff
- - label: <-NAV
+ - label:
+ - NAV
+ - <->
pressed:
xplane_cmd: sim/GPS/g1000n1_nav_ff
-