Compare commits

..

2 commits

Author SHA1 Message Date
5f83cb9cff
Preparing v0.0.2
Signed-off-by: Sander Datema <mail@sanderdatema.nl>
2024-12-18 23:07:24 +01:00
a6023cc950
Remove old LUA file
Signed-off-by: Sander Datema <mail@sanderdatema.nl>
2024-12-18 23:06:56 +01:00
4 changed files with 17919 additions and 2463 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

File diff suppressed because one or more lines are too long

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