From a6023cc95065cab394d50c90e78b3e0a024aa24b Mon Sep 17 00:00:00 2001 From: Sander Datema Date: Wed, 18 Dec 2024 23:06:37 +0100 Subject: [PATCH] Remove old LUA file Signed-off-by: Sander Datema --- FlyWithLua/passengerflying-xkeypad-zibo.lua | 45 --------------------- release.sh | 4 +- 2 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 FlyWithLua/passengerflying-xkeypad-zibo.lua diff --git a/FlyWithLua/passengerflying-xkeypad-zibo.lua b/FlyWithLua/passengerflying-xkeypad-zibo.lua deleted file mode 100644 index f7d4cd7..0000000 --- a/FlyWithLua/passengerflying-xkeypad-zibo.lua +++ /dev/null @@ -1,45 +0,0 @@ --- Create a table to store previous positions of switches -local previous_positions = {} - --- Function to toggle switch -function toggle_switch(position, command_base, min, max) - local switch_value = _G[position] - local previous_position = previous_positions[position] or min - - local command_suffix - if switch_value == min then - command_suffix = "_up" - elseif switch_value == max then - command_suffix = "_dn" - elseif switch_value < previous_position then - command_suffix = "_dn" - elseif switch_value > previous_position then - command_suffix = "_up" - end - - command_once(command_base .. command_suffix) - previous_positions[position] = switch_value -end - --- Function to create command -function create_switch_command(command, description, position, command_base, - min, max) - dataref(position, position, "readonly") - create_command(command, description, - "toggle_switch('" .. position .. "', '" .. command_base .. - "', " .. min .. "," .. max .. ")", "", "") -end - -if PLANE_ICAO == "B738" then - -- Lights test (bright_test) - create_switch_command("PassengerFlying/zibo/switch_bright_test", - "Toggle lights switch between TEST, BRT and DIM", - "laminar/B738/toggle_switch/bright_test", - "laminar/B738/toggle_switch/bright_test", -1, 1) - - -- Transponder Knob (transponder_mode) - create_switch_command("PassengerFlying/zibo/switch_transponder_mode", - "Toggle transponder modes", - "laminar/B738/knob/transponder_pos", - "laminar/B738/knob/transponder_mode", 1, 5) -end diff --git a/release.sh b/release.sh index 310a5c8..897b2db 100755 --- a/release.sh +++ b/release.sh @@ -3,10 +3,10 @@ TARGET="Zibo B738 v$1" rm -rf "release/$TARGET" mkdir -p "release/$TARGET/Aircraft/B737-800X" mkdir -p "release/$TARGET/Stream Deck" -mkdir -p "release/$TARGET/Resources/plugins/FlyWithLua/Scripts" +# mkdir -p "release/$TARGET/Resources/plugins/FlyWithLua/Scripts" cp -R ./Stream\ Deck/* "release/$TARGET/Stream Deck/" cp -R ./X-KeyPad/* "release/$TARGET/Aircraft/B737-800X/" -cp -R ./FlyWithLua/* "release/$TARGET/Resources/plugins/FlyWithLua/Scripts" +# cp -R ./FlyWithLua/* "release/$TARGET/Resources/plugins/FlyWithLua/Scripts" cp ./README.md "release/$TARGET/" cp ./Installation.pdf "release/$TARGET/" 7z a -tzip "release/$TARGET.zip" "./release/$TARGET/*"