Jump to content
The simFlight Network Forums

rickalty

Members
  • Posts

    163
  • Joined

  • Last visited

Everything posted by rickalty

  1. That's right. First you'd dim OilPress as a variable to hold the actual value for the Oil Pressure, and OilPressAngle as a variable to hold the angle you want the needle to point to. Then CALL FSUIPC_Read to actually get the value to go into OilPress. Next you use OilPress to calculate the value for OilPressAngle. In this example, the actual gauge needle is horizontal if the Oil Presure is 60 psi, so a value greater than 60 needs to be a positive angle, a value less than 60 needs to be a negative angle. Now, to work out what angles you need, look at the gauge. In this case, there's a value of 100psi 30 degrees up from horizontal. Thus, a 40psi difference is a 30 degree angle, so I multiply the difference between the actual oil pressure and 60 (Because 60 is a zero angle) by 30/40, or 0.75. This gives me the actual angle in degrees that I need the needle to be deflected by. I convert that to Radians (In the code example the comment said to convert from Radians - that was wrong) and use that value in the trig function. The Oil Pressure gauge is one of those with a disk in the center that the needle sticks out from under, so there's actually two trig functions - one calculates the position where the needle appears from under the disk, one calculates the position of the end of the needle. If you have a gauge where the whole needle is visible, you only need to calculate the end of the needle. Richard
  2. The way I implemented needles on the gauges on my FSPanel app was to draw them using Trig functions. Assuming you've no problem getting the data out from FSUIPC in the first place, here's how I draw the needle for an oil pressure gauge.... If OilPress < 60 Then OilPressAngle = 0 - ((60 - OilPress) * 0.75) Else OilPressAngle = ((OilPress - 60) * 0.75) End If ' On the gauge, 60 psi is a needle angle of zero, or horizontal. The 0.75 ' is a factor to make the angle of the needle match the markings on the ' gauge face. This will be different for every gauge. OilPressAngle = OilPressAngle * (3.1412 / 180) ' Converts the angle from Radians to Degrees picOil.CurrentX = 1500 picOil.CurrentY = 750 ' Sets the center of the needle to the center of the gauge.' picOil is ' the picturebox that has the image of the gauge as its background picOil.Line Step(0 - (500 * Cos(OilPressAngle)), (0 - (500 * Sin(OilPressAngle))))-Step(0 - (250 * Cos(OilPressAngle)), (0 - (250 * Sin(OilPressAngle)))) ' Uses trig to calculate the start and end points of a line at an angle of ' OilPressAngle from 250 twips from the center of the gauge to 500 ' twips from the center of the gauge. I hope this helps. Richard
  3. EVEN if it were true that Pete didn't have Adams approval to continue with FSUIPC development after Adam dropped it (and I very much doubt it is true, or why would he give credit to Adam's earlier work?) you'd STILL be wrong about the "for his own personal gain and profit". ALL the functions that Adams old FS6IPC offered are part of the free functions of FSUIPC. The payware functions are all additional functionality that Pete has written entirely on his own. To see a little sneak thief like yourself bragging about stealing from a developer and trying to someow "justify" it by saying that Pete's work was based on another developers earlier work is sickening. Richard
  4. Of course it's piracy. you're offering to tell people how to get payware functions for free. Using those payware functions without paying is piracy. There's no grey area at all, it's open and shut. You don't even try to hide it - in your first post you boast about the money you can steal from developers with your "saves us hackers lots of money" crack. Richard
  5. You go to FSUIPC's "keys" tab, and hit set. Turn the toggle switch on to send the signal to FSUIPC, and select "A/T On" from the drop down list for "Command to be sent when pressed", then select "A/T Off" for "Command to be sent when released". Richard
  6. We'll see if Microsoft (parent company of Hotmail) agrees with your opinion, as I forwarded your post with the info that you're using a hotmail email address to promote piracy to both the abuse@hotmail.com and piracy@microsoft.com email addresses to see if they agree with you. Everything that is only available to registered users of FSUIPC is Pete's wn work, not the orld contribution of Adam - not to mention that it's Pete who's done all the offset tracking for every new version of MSFS. If, as you say, he packs up shop and doesn't release an FSUIPC for the next version of MSFS, then none of these fancy add-ons will work with that version - or are you offereing to do the work involved in tracking down all the offsets in the next version? Richard
  7. of course it's piracy you halfwit. Hacking a commercial product to use it for free is piracy, just as if you were hacking FS itself to give away copies of it to your friends. Robbing banks saves money for the bank robbers, but it's still a criminal act. No, it's not just unethical, it's criminal, and of course it's piracy. Richard
  8. Peter is on vacation till March 12th, you should try asking SimMarket (the people you bought it from) They're usually reasonable. Richard
  9. Is the D:\ drive physically on the Server PC or the Client PC? It looks like both WideServer and WideClient are trying to run FSGarmin. You should realy only be trying to run it from the client. I would suggest putting it into a drive on the client PC (If it isn't already) rather than have the client run it across the network from a drive on the server PC. Richard
  10. Yes they are. You should get the latest versions of everything. Also, when upgrading to directX 9.x, also go to your video card makers website and make sure you've got the latest versons of the video card drivers. Richard
  11. Hi there, Danny. Yes, the FSUIPC SDK includes a VB specific section - two actually, one for VB.NET and one for Legacy VB. There's a Word document called "FSUIPC for programmers" which has a lot of usefull info, and a sample application in VB to show how it works. VB's native support for the serial port isn't the best, though, but there are several good add on controls available. Richard
  12. Or alternatively, read a Long at 574 for the whole meters, and a Long at 570 Also, I don't see why you're doing the calculations at all - it looks to me like the whole meters are stored directly at 574, and the fractions directly at 570 - no 65536*65536 calcs needed. Richard
  13. You could always just do what I did - get the altitude from offset 3324 instead. Then you jut DIM it as Long and use it directly. Richard
  14. Many warning lights can be determined from gauge values, or clculated from logic. Those that have direct flags you can find using FSInterrogate's 'three way scan' function. Scan with the light off, force it to go on, scan again, make it go off, do the third scan. FSInterrogate will show the values that are the same in scan 1 and 3 but different in scan 2. Richard
  15. You might have more luck posting this on the Epic programming forum. Go to http://www.Avsim.org, click on "Forums", and towards the bottom of the list you'll find "Blue Side UP - EPIC programming", right next to the home cockpit builders forum. Richard
  16. Yes, it's right there in the table of offsets in the SDK. First column is the offset, second is the size. Richard
  17. I just added it to one of my panels just to try, and it worked fine for me when DIM'd as an Integer. Here's the code... Dim Engine As Integer Call FSUIPC_Read(&H609, 2, VarPtr(Engine), dwResult) Call FSUIPC_Process(dwResult) lblEngine = Engine That worked. Richard
  18. This stuff's all in the SDK Patrik. If you look there first you'll save yourself the time of aiting for a reply. Richard
  19. Dim auiTime() As Byte ReDim auiTime(3) FSUIPC_Read(&H238, 3, VarPtr(auiTime(1)), dwResult) FSUIPC_Process(dwResult) lblClock.Caption = Format(auiTime(1), "00") & ":" & _ Format(auiTime(2), "00") & ":" & _ Format(auiTime(3), "00") Straight out of the SDK Richard
  20. Easiest place to put the DIM statements is in the Form_Open sub. Yes, you can do that with the 1 / 0 value for a label caption, but a better looking way is to make the label, say, dark green with a gray caption if the value is 0, and bright green with a black caption if it's 1. If you look at, say, the gear lights on my FSEicas app, that's how I implemented them. Richard
  21. That's tight, Armando. The only change I'd suggest is moving the Dim statements outside the timer Sub. At the moment, every time the Timer loops the variables are re-Dim'd. No biggie for just two variables, but when the app grows it'll give a bit of a performance hit. Richard
  22. Do you have ArrICAO and Tmp both Dim'd as Strings ? Richard
  23. Can't type...... should have read 31997 / 128 = 249.9 something..... Richard
  24. The answer to this one's right in the SDK where you got the offset from :-) 02BC stores IAS * 128 (This lets MS store a more acurate number) 31997 / 128 + 249.9 something, which is the actual IAS. Richard
×
×
  • 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.