Remove old LUA file

Signed-off-by: Sander Datema <mail@sanderdatema.nl>
This commit is contained in:
Sander Datema 2024-12-18 23:06:37 +01:00
parent c28292fca5
commit a6023cc950
Signed by: Sander
SSH key fingerprint: SHA256:YNXQXiUHV/n7Aud5UFGA6j2/AQz5nCIM7F2P4rCwTgw
2 changed files with 2 additions and 47 deletions

View file

@ -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

View file

@ -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/*"