Jump to content
The simFlight Network Forums

GASimPilot

new Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    United States

GASimPilot's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • Dedicated Rare
  • First Post Rare

Recent Badges

0

Reputation

  1. Thank you so much for your help! I got it working. The returned number was indeed a problem, and I had to handle it by rounding. I also had created my own logging but didn't include it in my function I posted. So using the one already there that you showed is easier and great to know about. I am posting the final function here in the hopes it helps someone else down the line. SimVar("(A:PLANE HEADING DEGREES MAGNETIC, Degrees)") SimVar("K:HEADING_BUG_SET") function PFD_HDG_SYNC() local curhdg = SimRead("(A:PLANE HEADING DEGREES MAGNETIC, Degrees)") curhdg = math.floor(curhdg + 0.5) Log("K:HEADING_BUG_SET:" .. curhdg) SimCommand("K:HEADING_BUG_SET:" .. curhdg) end
  2. Thanks for the reply. I have been trying to get the lua scripting working, and I cannot figure out how to read "A:PLANE HEADING DEGREES MAGNETIC" successfully. It always comes back 0. Here is my script. It does write the 0 correctly to the Heading Bug. If you could point me to my error, I would greatly appreciate it. SimVar("A:PLANE HEADING DEGREES MAGNETIC") SimVar("K:HEADING_BUG_SET") function PFD_HDG_SYNC() local curhdg = SimRead("A:PLANE HEADING DEGREES MAGNETIC") SimCommand("K:HEADING_BUG_SET:" .. curhdg) end
  3. Hello. Just learning StreamDeck and Pilot's Deck. I have familiarity with simvars. It has been great learning, but now I am stuck on how to add a command to a Display Value I have called Heading. I can display the current heading using (A:PLANE HEADING DEGREES MAGNETIC, Degrees) in the Value area and Variable address. However, what I want to do now is click on the button and have it sync my heading bug to the current heading. I can go into the Commands area and set Command Type to K-Var and the Command Address to a fixed value like HEADING_BUG_SET:15. But how do I replace the 15 with the current value of PLANE HEADING DEGREES MAGNETIC? Everything I try just doesn't seem to work. Thanks for any help.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.