Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 37
  1. #21
    300+ Forum Addict
    Join Date
    Jan 2007
    Posts
    496
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by Kennair View Post
    Lua looks like a real godsend for those of us without PM or the kinds of aircraft that aren't supported by such suites. I'll definitely be giving this a go with my Opencockpits cards.
    Are Opencockpits cards based on Phidgets, too, or another library and complete set of programming APIs?

    How would you expect to "give it a go"?

    Looking briefly at the Phidgets library, as asked, it isn't trivial, but a huge array of possible calls and callbacks, all of which would have to be made conditional at run time (I'm not building all these sundry libraries into FSUIPC as an overhead for every user -- so they have to be optional DLLs, loaded when needed).

    And then to use it seems to need a programmer in any case.

    I'm obviously missing something. I expected something more on the lines of the Windows joystick APIs or possibly Goflight's APIs, where I could provide simplified Lua access. I should be able to do such wrappers on the Phidgets library, but it is so vast I don't know where to start. I need to know how folks actually use it.

    Regards

    Pete

  2. #22
    1000+ Poster - Fantastic Contributor AndyT's Avatar
    Join Date
    Jun 2006
    Location
    Oahu, Hawaii
    Posts
    1,236
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Pete,

    Alan Dyer wrote a phidgets software interface designed for flight sims. Its called FS2Phidget and you can download it here from the file library. Its a great utility for those that do not have a clue how to program.

    Personally I have a bit of trouble with it because I'm the kind that needs solid examples that teach me 'how to' and then I can go from there. Alan's software lacks that where Lua has it as a part of its basic documentation. I know how to write in C#, a myriad of BASIC versions, LOGO, RPG, COBOL, FORTRAN, Man1, 6808, 8800, Z80... You get the picture. But for some reason the operation of FS2Phidgets escapes me. But that's just me.

    Anyway, I was thinking that if FSUIPC had some direct support for phidgets it would make it easier to use them.

    Yeah, I know. I'm headed off the deep end here...
    God's in command, I'm just the Pilot.
    http://www.geocities.com/andytulenko/

  3. #23
    300+ Forum Addict
    Join Date
    Jan 2007
    Posts
    496
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by AndyT View Post
    Alan Dyer wrote a phidgets software interface designed for flight sims. Its called FS2Phidget and you can download it here from the file library. Its a great utility for those that do not have a clue how to program.
    Right. So really Lua support for Phidgets isn't needed? Or are you saying Lua should somehow link to FS2Phidget? I'm getting more confused than ever I'm afraid.

    Anyway, I was thinking that if FSUIPC had some direct support for phidgets it would make it easier to use them.
    Yes, but the whole library? Have you really looked at the API? The C header alone contains declarations for 269 (269!) functions and callbacks!

    I need to know what folks do with it before I can design an easier-to-use library set for Lua plugins.

    It looks like i might also need to write a DLL to wrap up its LIB file. I don't want the static-linked library permanently built into every copy of FSUIPC. Once I start down that route there's no end in sight. I need to make it like the GoFlight system, where GFDev.dLL is loaded if present.

    Regards

    Pete

  4. #24
    1000+ Poster - Fantastic Contributor AndyT's Avatar
    Join Date
    Jun 2006
    Location
    Oahu, Hawaii
    Posts
    1,236
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Not every item in the phidget library is used in cockpit building.
    For example, The RFID devices really do not have a place in the cockpit at this time. Maybe down the line they might be really useful for something.

    The most common phidgets are the following boards;
    LED-64, '0/16/16', '0/0/4', '0/0/8', '8/8/8', servo and motor controllers, and the 'text LED/8/8/8' boards. these are the ones you are most likely to encounter in a sim.

    Each digit of the board identifiers has a meaning.
    Ex: '8/8/8'
    8 Analog Inputs
    8 Digital inputs
    8 Digital outputs

    So you can see the hardware is very flexible in how it is used. Each input can be programmed to have various responses via the software. The phidgets company provides a few examples of applications written in various languages for the programmers among us but in our case we need specialized functions available to us for our programming various systems in various planes. And having them modular so that one is only called if that aircraft requires it would add to its overall appeal and usefullness.

    Obviously you do not need a basic primer on programming, but I tried to answer your questions in your post and provide a bit of insight to it as well.
    God's in command, I'm just the Pilot.
    http://www.geocities.com/andytulenko/

  5. #25
    1000+ Poster - Fantastic Contributor AndyT's Avatar
    Join Date
    Jun 2006
    Location
    Oahu, Hawaii
    Posts
    1,236
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Another note:

    Alan did a masterful job of writing the utility FS2Phidget, but it's always been my experience that a single program even modular is faster than running two programs.

    I would rather run FSUIPC and not have to use FS2Phidget at all. It would cut down on the overhead and reduce CPU ticks needed.

    Alan,

    My friend, I hope you understand what I'm saying here and do not take offense because there is none intended! You have done a fab job of creating what you did, I'm just the kind where I'm always looking to possibly better something, and hey, if I'm wrong (happens more as I age...) then by golly I'm wrong. I can live with that.

    Pete,

    Yes, the obvious answer here is that I need to have someone teach me Alan's software in baby steps, but this idea came to me and I wanted to see where it went. If I can just plug in a phidget and program it like I do other buttons in FSUIPC, then to me that is an improvement. For any additional programming, the Lua would be used, or possibly Alan's utility.
    God's in command, I'm just the Pilot.
    http://www.geocities.com/andytulenko/

  6. #26
    Heli Builder
    Join Date
    May 2008
    Location
    Earth
    Posts
    288
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    I can't see why you need any programming for the Master Caution and Warning to work. It can be done electronically alone.

    If a red annunciator is illuminated then flash the Master Warning light and do so until the button is pressed. This can be achieved by some basic Logical circuits. Same with Master Caution.
    Fritz -> Helicopter Cockpit Builder
    (FSX | TH2Go | Arduino | Air Manager Avionics | CNC)

  7. #27
    1000+ Poster - Fantastic Contributor AndyT's Avatar
    Join Date
    Jun 2006
    Location
    Oahu, Hawaii
    Posts
    1,236
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Fritz,
    Very true. But using those simple logics with Lua would allow you to virtually write your own version of PM. And with enough of us writing snippets for our planes we would fairly quickly have our own version of PM that is custom designed in modular format to do whatever we need for our sims.

    And hardware would not matter since it would all be supported by its own library making it compatible with the basic Lua modules.

    Not to mention the price! (Sorry Enrico, but I, like many, simply can not afford to use your stuff...)
    God's in command, I'm just the Pilot.
    http://www.geocities.com/andytulenko/

  8. #28
    Heli Builder
    Join Date
    May 2008
    Location
    Earth
    Posts
    288
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by AndyT View Post
    Fritz,
    And with enough of us writing snippets for our planes we would fairly quickly have our own version of PM that is custom designed in modular format to do whatever we need for our sims.
    I'm sold to the idea of contributing towards a shared library.

    I'm already designing my own gauges anyway with C# and FSPUIC, because there is none available for my sim. I will look into Lua as well.
    Fritz -> Helicopter Cockpit Builder
    (FSX | TH2Go | Arduino | Air Manager Avionics | CNC)

  9. #29
    300+ Forum Addict
    Join Date
    Jan 2007
    Posts
    496
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by AndyT View Post
    If I can just plug in a phidget and program it like I do other buttons in FSUIPC, then to me that is an improvement.
    Well, I did that for GoFlight as, at the time, I had some GoFlight gear. Getting motivated to do something completely blind is not so easy, especially when it looks like a lot (I mean a *lot*) of studying is needed first to extract the probable little bits I would actually need.

    For any additional programming, the Lua would be used, or possibly Alan's utility.
    I suspect I would do the first bit via a simple Lua read device / set virtual button loop in any case. It is just extracting what is needed for the "read device" part which I am faced with and 269 (or whatever) APIs isn't a good thing to face initially.

    If there are simple button-switch / pot / LED examples, just the bare minimum needed, and if I can find them, I'll see what I can do. At present I've downloaded too much for me to read at present -- I have to do other things as well, you see. And the Phidgets documentation looks like it isn't a nice DOC or PDF but a damned series of HTML pages, making it so much more laborious (and difficult) to print (I don't learn reading on screen). So I'm thinking, maybe, of shelving it till someone can point out basic examples.

    Do you know the original Windows joystick API at all? Really dead simple, but very effective, at least for inputs (obviously a different interface would apply to outputs). All you needed to do was make one call for each device: "joyGetPosEx", and you'd get back a fixed well-defined structure giving the current state of every switch, every axis, every POV. So simple, so fast. I use it still. Then came DirectInput ... now everyone seems to want to compete with Microsoft in the bloatware stakes!

    From your previous message:

    Not every item in the phidget library is used in cockpit building.
    For example, The RFID devices really do not have a place in the cockpit at this time. Maybe down the line they might be really useful for something.
    No idea what "RFID" means at present (Radio Frequency ...?), but maybe I can cross off a few of the APIs if they contain that acronym?

    The most common phidgets are the following boards;
    LED-64, '0/16/16', '0/0/4', '0/0/8', '8/8/8', servo and motor controllers, and the 'text LED/8/8/8' boards. these are the ones you are most likely to encounter in a sim.
    Does knowing that help narrow down the APIs? Are they all associated with one piece of hardware or another? Am I down to 200, 100, or a preferable 16 yet?

    Each digit of the board identifiers has a meaning.
    Yes, I did gather that from browsing Phidgets products web site before I decided that I didn't want to buy any if I could help it.

    Regards

    Pete

  10. #30
    300+ Forum Addict
    Join Date
    Jan 2007
    Posts
    496
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by AndyT View Post
    Not every item in the phidget library is used in cockpit building.
    For example, The RFID devices really do not have a place in the cockpit at this time. Maybe down the line they might be really useful for something.
    Okay. i'm just browsing through the Phidgets documentation, and they classify devices as follows:


    Now, you say "The most common phidgets are the following boards;
    LED-64, '0/16/16', '0/0/4', '0/0/8', '8/8/8', servo and motor controllers, and the 'text LED/8/8/8' boards."

    So, which are they, above? I assume these

    LED, Text LED, Servo, Motor Control

    cover the equivalents of some of your list, but which ones deal with analogue/pot inputs and switches/buttons? the "encoder"? And is "advanced servo" needed? What about "stepper"?

    I just want some way of narrowing down what I have to look at.

    I've not yet found any actual examples. I'd want them in C. Any pointers there? I mean ones relevant to what folks would do under FS. Do you have any?

    I also see that Phidgets operations can be done remotely, over the network. Presumably if that is supported WideClient wouldn't need Phidgets support. Is this something you think is used, with Phidgets, or are they generally all on the FS PC?

    Best Regards

    Pete

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Master Caution / Master Warning lights using FS2Phidget5 (noob)
    By mhayling in forum Phidgets & Cockpit Simulator Builder
    Replies: 3
    Last Post: 05-18-2010, 02:08 PM
  2. Replies: 4
    Last Post: 03-04-2010, 02:03 AM
  3. My Master Caution and Fire Warning
    By Wendy in forum General Builder Questions All Aircraft Types
    Replies: 5
    Last Post: 01-03-2010, 10:47 AM
  4. PM master caution and warning Airbus
    By explora in forum PMSystems
    Replies: 0
    Last Post: 02-19-2009, 03:38 PM