ihiyani Posted December 1, 2020 Report Posted December 1, 2020 Tried to set tug heading and speed controlled by integer by Private TugH As New Offset(Of UInteger)(&H31F8) Private TugS As New Offset(Of UInteger)(&H31FC) Private TugState As New Offset(Of UInteger)(&H31F4) FSUIPCConnection.Process() Dim HDG as integer = TextHDG.text Dim SPD as integer = TextSPD.text Dim Status as integer = TextSts.text FSUIPCConnection.SendControlToFS(FsControl.KEY_TUG_HEADING, HDG) FSUIPCConnection.SendControlToFS(FsControl.KEY_TUG_SPEED, SPD) TugH.value= HDG TugS.value= SPD TugState.value= Status So for the heading of the tug no one worked it just make the heading of aircraft is 357 degree whatever i change the heading in TextHDG , whatever integer i input just turn the tug to heads the aircraft to 357 . for the speed it doesn't work for the status integer : 0 Pushback Straight 1 to left 2 to right 3 stop pushback any helps plz ..
Paul Henty Posted December 1, 2020 Report Posted December 1, 2020 First, please make sure you're only declaring offsets once. Usually this is at the main class or form level. All these offsets are write-only so they should be marked as write-only when you declare them. They should also be placed in their own group so you can process them separately. The pushback seems to be different from the tug. The tug goes forward, not back. Private TugH As New Offset(Of UInteger)("tug", &H31F8, True) Private TugS As New Offset(Of UInteger)("tug", &H31FC, True) Private PushBackState As New Offset(Of UInteger)("pushback", &H31F4, True) For offset 31F8, the heading in degrees needs to be converted to FSUIPC Units: Dim HDG as integer = TextHDG.text * 360D / (65536D * 65536D) For offset 31FC the values are in feet/second. The Process() call must come after you set the values so the new value can be written: Dim HDG as UInteger = TextHDG.text Dim SPD as UInteger = TextSPD.text TugH.Value = HDG * 360D / (65536D * 65536D) TugS.Value = SPD FSUIPCConnection.Process("tug") Paul
ihiyani Posted December 2, 2020 Author Report Posted December 2, 2020 i tried it works for the Heading with no luck for the speed the plane doesn't move until i disconnect the tug what i want to do is to stop the pushing back while the tug still connected and re push back in button click whatever stopped or not the tug still connected so i try to make speed 0 while it connected .. thanks Paul at all 15 hours ago, Paul Henty said: First, please make sure you're only declaring offsets once. Usually this is at the main class or form level. All these offsets are write-only so they should be marked as write-only when you declare them. They should also be placed in their own group so you can process them separately. The pushback seems to be different from the tug. The tug goes forward, not back. Private TugH As New Offset(Of UInteger)("tug", &H31F8, True) Private TugS As New Offset(Of UInteger)("tug", &H31FC, True) Private PushBackState As New Offset(Of UInteger)("pushback", &H31F4, True) For offset 31F8, the heading in degrees needs to be converted to FSUIPC Units: Dim HDG as integer = TextHDG.text * 360D / (65536D * 65536D) For offset 31FC the values are in feet/second. The Process() call must come after you set the values so the new value can be written: Dim HDG as UInteger = TextHDG.text Dim SPD as UInteger = TextSPD.text TugH.Value = HDG * 360D / (65536D * 65536D) TugS.Value = SPD FSUIPCConnection.Process("tug") Paul
Paul Henty Posted December 2, 2020 Report Posted December 2, 2020 I don't know how these offsets work. You might want to post in the main FSUIPC support forum with a description of what you are trying to do. More people will see it there. Someone might know how these offsets should be used. Paul
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now