Jump to content
The simFlight Network Forums

Button Screen


Recommended Posts

Greetings. Iam using wideclient and have programmed the button screen. Thank you for developing that. Unfortunately, LINDA doesn't recognise the button screen. That's understandable. However, LINDA has the plug-ins for mostof my add on aircraft.

It seems I will have to develop my own routines to make available to FSUIPC for the addon aircraft. I am certainly not asking for lessons, but if you could point me in the right direction, I'll get to work. I'm guessing you have included documentation. I'm just not sure where to start.

Thanks

Graham

Link to comment
Share on other sites

Greetings. Iam using wideclient and have programmed the button screen. Thank you for developing that. Unfortunately, LINDA doesn't recognise the button screen. That's understandable. However, LINDA has the plug-ins for mostof my add on aircraft.

 

I think it would be a good idea for Linda to extend its button recognition to include the virtual buttons. It wouldn't be so difficult. Or maybe I can extend the Lua button test facility and events to cover virtual buttons also -- and maybe all the other button numbering which occurs for PFC serial devices and for joystick connections on WideFS clients.

 

Perhaps you could ask such a question on their support forum? If they explain to me how they currently test for button presses I'd be happy to extend Lua support in such a direction as that would benefit everyone.

 

It seems I will have to develop my own routines to make available to FSUIPC for the addon aircraft. I am certainly not asking for lessons, but if you could point me in the right direction, I'll get to work. I'm guessing you have included documentation.

 

 

Sorry, I really wouldn't know where to start either for add-on aircraft. They are all different with different techniques needed depending on how they are imnplemented. I don't actually use any add-on aircraft myself. Maybe you can find out by pulling apart the Linda code, but I don't think that's the right way to proceed.

 

There are a number of aircraft supported by contributions in the User Contributions subforum. You could check therer, as a start.

 

Regards

Pete

Link to comment
Share on other sites

Thanks for the reply. Ive already asked on their forum. However, I didn't ask the right question. It seems to me that it would be win/win if LINDA supported your buttons.

Would you object to my referencing the fact you think it's feasible/desirable? It may spark greater interest at their end.

Of course if you can do it at your end (perhaps that's not what you were inferring) that would be awesome. In the 6 years I've been playing with planes, I find that your product has been rock solid, as has been your support.

I agree that pulling apart someone else's effort is tricky and often leads to failure. Also, even if successful, defeats a good purpose.

Thanks again

Graham

Link to comment
Share on other sites

Would you object to my referencing the fact you think it's feasible/desirable? It may spark greater interest at their end.

 

No objection. Of course. I'd need them to say what they'd need in Lua. I'm afraid OI'm not familiar with LINDA at all.

 

Of course if you can do it at your end (perhaps that's not what you were inferring)

 

It would need to be cooperative. They's need to change LINDA, I'd need to change the Lua library.

 

Regards

Pete

Link to comment
Share on other sites

Thanks for the reply. I'll post on LINDA and see what develops. You know, I find it rather interesting that this should be an issue at all. Why don't addon developers just use standard FSX controls and where it is not feasible, publish the custom controls so that mere mortals, like myself, can program our controllers in FSUIPC. This last sentence is obviously from an uninformed civilian.

 

Thanks again

Graham

Link to comment
Share on other sites

  • 1 month later...

Pete, please advise on failure programming - I have Toggles:

 

609=P64,0,C66310,0
610=U64,0,C66310,1
611=P64,1,C66311,0
612=U64,1,C66311,1
613=P64,4,C66312,0
614=U64,4,C66312,1
615=P64,5,C66306,0
616=U64,5,C66306,1
617=P64,8,C66613,0
618=U64,8,C66613,1
619=P64,9,C66309,0
620=U64,9,C66309,1
621=P64,12,C66307,0
622=U64,12,C66307,1
623=P64,13,C66308,0
624=U64,13,C66308,1
625=P64,16,C66305,0

626=U64,16,C66305,1

 

But I have a problem: when I toggle button - system failure occurs, then I have to press it two times untoggling to original working state. TN?

 

Is there anyway to add failure commands for instruments: artifical horizon, direction finder, compass, vsi, altimeter, airspeed indicator, turn coordinator; systems: gear, hyd.oil/fuel pump/leaks, alternator, radios, cylinders, magnetos, controls separately?  Thanks.

Link to comment
Share on other sites

Pete, please advise on failure programming

 

I can't, really, having never done any.

 

- I have Toggles:

...

But I have a problem: when I toggle button - system failure occurs, then I have to press it two times untoggling to original working state. TN?

 

By "toggles" do you mean latching switches rather than buttons? Are all those controls toggling controls? Have you tried using FSUIPC button and event logging to see what is happening?

 

Is there anyway to add failure commands for instruments: artifical horizon, direction finder, compass, vsi, altimeter, airspeed indicator, turn coordinator; systems: gear, hyd.oil/fuel pump/leaks, alternator, radios, cylinders, magnetos, controls separately?  Thanks.

 

Some of those are certainly listed in the Offsets list. You can assign switches to send or toggle values to offsets. Mostly they will by single bytes, so you'd use Offset Byte Set with parameter 0 for off 1 for on using a latching switch.

 

Pete

Link to comment
Share on other sites

Ok, those are touch screen buttons - but they don't trigger on/off once for the same C663*** commands.

 

I now have:

609=P64,0,C66310,0
610=P64,1,C66310,0
611=P64,2,C66311,0
612=P64,3,C66311,0
613=P64,4,C66312,0
614=P64,5,C66312,0
615=P64,6,C66306,0
616=P64,7,C66306,0
617=P64,8,C66313,0
618=P64,9,C66313,0
619=P64,10,C66309,0
620=P64,11,C66309,0
621=P64,12,C66307,0
622=P64,13,C66307,0
623=P64,14,C66308,0
624=P64,15,C66308,0
625=P64,16,C66305,0
626=P64,17,C66305,0

 

and

 

0=T"Brake system failure"

1=B"Fix it" .. so on. 10x, Pete.

Link to comment
Share on other sites

Ok, those are touch screen buttons - but they don't trigger on/off once for the same C663*** commands.

 

I now have:

609=P64,0,C66310,0

610=P64,1,C66310,0

...

0=T"Brake system failure"

1=B"Fix it" .. so on. 10x, Pete.

 

Sorry, I'm still confused. If you define them as Toggles in the ButtonScreen definition then they will send a "press" on one push (and turn red) and a "release" on the next (and turn back green).  You appear to be defining one toggle button and one momentary button to each control. Why? It makes no sense.

 

Since the controls you are assigning to are not "on" and "off" controls, but simply toggles, your button screen programming should also just be simply momentary buttons, and only one for each. Only assign to "press" not to bother "press" and "release". There is absolutely no point in assigning the "T" toggle option for controls assigned the same for "press" and "release" -- and to have multiple buttons assigned to the same control with one set as a "toggle" will lead to the ultimate in confusion!

 

Surely you can work this all out yourself using the logging in FSUIPC? That is what it is for, to help you understand what you are doing.

 

Pete

Link to comment
Share on other sites

I just wanted to setup a widefs remote computer failure toggler.

 

Not easy. The ready-made failure options are not really failures so much as training aids, for flying without one or other instrument or subsystem. The better instructor stations (which are payware of course) simulate failures in a much more sophisticated manner, playing with the actual aircraft operation or performance in various ways..

 

Regards

Pete

Link to comment
Share on other sites

Indeed, I just browsed a cool program in SDK called FSInterrogate - it's realy handy, Pete. So the question is when you touch toggle button on screen it sends 1 signal via widefs to flight simulator and button turns red. Then when you touch it again it sends 0 signal to FS button turns to original colour state. As I understand to toggle command off you have to touch the button 3rd time for it to send 1 signal to off the failure offset, but this time button will be red but failure fixed. Correct me if I'm wrong. I will experiment more with offsets, will give you my script later.

Link to comment
Share on other sites

Indeed, I just browsed a cool program in SDK called FSInterrogate - it's realy handy, Pete. So the question is when you touch toggle button on screen it sends 1 signal via widefs to flight simulator and button turns red. Then when you touch it again it sends 0 signal to FS button turns to original colour state. As I understand to toggle command off you have to touch the button 3rd time for it to send 1 signal to off the failure offset, but this time button will be red but failure fixed. Correct me if I'm wrong. I will experiment more with offsets, will give you my script later.

 

The toggle action is just the same as a real switch. When pressed fromoff it goes on and when pressed from on it goes off.  0 = off, 1 = on. there's nothing mor complicated at all thatn that. You make it sound much more complex for no good reason.

 

The confusion you are in is that some offsets work by sending toggle controls to FS. If they only do this when you write a 1 then nothing will happen when you write a 0. you should NOT be using the Button Screen toggle facility for such things, as I said originally.

 

To see what is happening, log the events as well, not just the affected offsets. You don't need FSInterrogate for that -- the FSUIPC logging provides all the facilities you are using in FSInterrogate as it stands. see the Monitor facilities for instance!

 

Pete

Link to comment
Share on other sites

[buttonScreen]
Size=3,4
 
0=T"TOGGLE_TOTAL_BRAKE_FAILURE"
1=T"TOGGLE_LEFT_BRAKE_FAILURE"
2=T"TOGGLE_RIGHT_BRAKE_FAILURE"
3=T"TOGGLE_ELECTRICAL_FAILURE"
4=T"TOGGLE_ENGINE1_FAILURE"
5=T"TOGGLE_HYDRAULIC_FAILURE"
6=T"TOGGLE_PITOT_BLOCKAGE"
7=T"TOGGLE_STATIC_PORT_BLOCKAGE"
8=T"TOGGLE_VACUUM_FAILURE"
 

 

 

[buttons]

;TOGGLE_TOTAL_BRAKE_FAILURE
609=P64,0,C66310,0
610=U64,0,C66310,0

;TOGGLE_LEFT_BRAKE_FAILURE
611=P64,1,C66311,0
612=U64,1,C66311,0

;TOGGLE_RIGHT_BRAKE_FAILURE
613=P64,2,C66312,0
614=U64,2,C66312,0

;TOGGLE_ELECTRICAL_FAILURE
615=P64,3,C66306,0
616=U64,3,C66306,0

;TOGGLE_ENGINE1_FAILURE
617=P64,4,C66313,0
618=U64,4,C66313,0

;TOGGLE_HYDRAULIC_FAILURE
619=P64,5,C66309,0
620=U64,5,C66309,0

;TOGGLE_PITOT_BLOCKAGE
621=P64,6,C66307,0
622=U64,6,C66307,0

;TOGGLE_STATIC_PORT_BLOCKAGE
623=P64,7,C66308,0
624=U64,7,C66308,0

;TOGGLE_VACUUM_FAILURE
625=P64,8,C66305,0
626=U64,8,C66305,0

 

 

So now I just have to figure out how to offset these:

 

4 bytes:

3AE0 ENGINE 1 564  BOOL  Yes

18 bytes:
3BD6  ADF (both on FS2004)
3BD7  ASI
3BD8  Altimeter
3BD9  Attitude Indicator
3BDA  COMM1
3BDB  COMM2
3BDC  Compass
3BDD  ? (unknown)
3BDE  Engine (see 0B6B for separate engines)
3BDF  Fuel Indicator
3BE0  Heading Indicator
3BE1  NAV1
3BE2  NAV2
3BE3  Pitot heat
3BE4  Transponder
3BE5  Turn Co-ordinator
3BE6  Vacuum
3BE7  VSI

 

1 bytes:

0B62  1  Fail mode, 0 ok, Hydraulics failure=1
0B63  1  Fail mode, 0 ok, Brakes failures:
Bit 0=Left brake
Bit 1=Right brake
Bit 2=Total brake failure
0B64  1  Fail mode: 0 ok, ADF gauge inoperable=1 (both ADFs)
0B65  1  Fail mode: 0 ok, ASI gauge inoperable=1
0B66  1  Fail mode: 0 ok, Altimeter gauge inoperable=1
0B67  1  Fail mode: 0 ok, Attitude Indicator gauge inoperable=1
0B68  1  Fail mode: 0 ok, COM radio gauges inoperable=1
!30=See also 3BD6
0B69  1  Fail mode: 0 ok, Mag Compass inoperable=1
0B6A  1  Fail mode: 0 ok, Electrics inoperable=1
0B6B  1  Fail mode:  0  ok,  Engine  inoperable=1,  extended  for  up  to  4
individual engines: bit 0=Engine 1 … bit 3= Engine 4.
0B6C  1  Fail mode: 0 ok, Fuel indicators inoperable=1
0B6D  1  Fail mode: 0 ok, Direction Indicator gauge inoperable=1
0B6E  1  Fail mode: 0 ok, VSI gauge inoperable=1
0B6F  1  Fail mode: 0 ok, Transponder gauge inoperable=1
0B70  1  Fail mode: 0 ok, NAV radio gauges inoperable=1
!31=See also 3BD6
0B71  1  Fail mode: 0 ok, Pitot inoperable=1
0B72  1  Fail mode: 0 ok, Turn coordinator gauge inoperable=1
0B73  1  Fail mode: 0 ok, Vacuum gauge inoperable=1

 

Also I found this program to monitor parameters http://www.ruscool.co.nz/monitor_fsuipc.html but I think it's kinda based on Interrogator. Trying to work with 3-Scan Locater. Maybe I should use P8/U8 instead?

 

Finally, I figured this out, Pete - thanks I owe you bit time!

 

;TOGGLE_ELECTRICAL_FAILURE
615=P64,3,C66306,1
616=U64,3,C66306,0

 

Nik.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.