Skip to content

Commit

Permalink
change dataref switch function
Browse files Browse the repository at this point in the history
  • Loading branch information
AviationSFO committed Sep 16, 2022
1 parent 36b801b commit d4af548
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Resources/plugins/FlyWithLua/Scripts/ExportXP.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,13 @@ altdr = prefs
-- Adding toggle macro
active = false
local function change_dr()
if altdr then
altdr = false

else
altdr = true
end
altdr = not altdr
prefs_file:write(altdr)
XPLMSpeakString("Please reload all lua scripts for changes to apply!")
active = false
end

add_macro("Toggle ExportXP", "active = true", "active = false", "deactivate")
add_macro("Toggle ExportXP", "active = true; logMsg('ExportXP Active')", "active = false", "deactivate")
add_macro("ExportXP - Alternate Dataref Source", "change_dr()")

-- this function retrieves the current aircraft's data and stores it in a table
Expand Down

0 comments on commit d4af548

Please sign in to comment.