Page 2 of 74 FirstFirst 1234561252 ... LastLast
Results 11 to 20 of 737
  1. #11
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Great, so simple. It compiles with a full stop or without, but certainly not with a comma.

    I will now have to test if it will now run my servo driven Tacho.

    I'll let you know. Thanks again for all the help.
    Any other suggestions about the code would be greatly appreciated.

    David
    Last edited by RobiD; 06-02-2009 at 09:21 AM. Reason: Spelling mistakes 'Doh'

  2. #12
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    So here is an update.

    Ran FSX
    Then compiled project and it gave me a message in the command prompt window saying: Object-ID 0(0,0) out of range.

    It appears to be the
    FS_ENGINE1RPM that has an ID of 0 but I can't work out where to change it, or where it is even getting the ID from.

    Any thoughts?


    Stefan, could you give me an idea of what the calculation should be - In the sdk, it says the following about the offset I've used.

    08C8

    2

    Engine 1 RPM Scaler: For Props, use this to calculate RPM – see offset 0898
    (On turboprops this will give the shaft RPM, since there is currently no Gear Reduction Ratio available to fix values on such aircraft. I will fix this when I can)



    This is the other option

    0898

    2

    Engine 1 Jet N1 as 0 – 16384 (100%), or Prop RPM (derive RPM by multiplying this value by the RPM Scaler (see 08C8 and dividing by 65536). Note that Prop RPM is signed and negative for counter-rotating propellers.
    In FS2004 this also now gives the Robinson model‘s RPM, when scaled by the RPM scaler.



    I know the calculation is probably easy to work out, but I've only just delved into C++ and this is my first attemp at doing anything in C++ so I would greatly appreciate help.

    Thanks again,
    David

  3. #13
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Try it "old" styl on H file:

    #define C_RPMSERVO OID_EXAMPLERPM_GROUP + 0
    #define FS_ENGINE1RPM OID_EXAMPLERPM_GROUP + 1

    Regards,
    Stefan

  4. #14
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Thanks. It's compiling again.
    Now just need to get calculation right and then test the gauge.

  5. #15
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    make an Objekt for the Eng1 Scaler (08C on h file.

    enginerpm.cpp


    #include"stdafx.h"
    static int eng1scaler;

    void cbEnginerpmBuildObjects()
    {
    MkFsbusObject (BTP_A_OUT,C_RPMSERVO,"RpmGauge",cbEnginerpm, 25, 87); //Servo ports are 80-87
    MkFsObject(FS_ENGINE1RPM,"RpmGauge", cbEnginerpm, 0x0898, 2, TP_I16, FS_NORMAL); //the TP_UI32 is maybe wrong it must be a FLT32
    MkFsObject(FS_ENGINE1RPMScaler,"RpmGauge", cbEnginerpm, 0x08C8, 2, TP_UI16, FS_NORMAL);
    }
    void cbEnginerpm (int oid, int val, double dval)
    {
    switch (oid)
    {
    case FS_ENGINE1RPMScaler:
    eng1scaler = val;
    break;

    case FS_ENGINE1RPM:
    int x = val * eng1scaler / 65536;
    maybe you need a additional or other calculation. The Servo need a value range between 0-255.
    FsbusWrite (C_RPMSERVO, x);
    break;
    }
    }

    The Version 2 will have funktion for such cases. But she isnt released jet.

    Regards,
    Stefan

  6. #16
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    'The Version 2 will have funktion for such cases. But she isnt released jet.'

    Stefan, is that the Calibrate function?

    If so, how would I use it in this situation?

    From my understanding, it converts values 10-250 into 0-16000 and I thing the reverse way as well.

    I will integrate what you have given me and see how it goes.

    Thanks again
    David

  7. #17
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Hi,
    yes it is the calibrat funktion.
    Do you have the V2 from the dll, or you read on a board about it?

    Regads,
    Stefan

  8. #18
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    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 sgaert View Post
    Hi,
    yes it is the calibrat funktion.
    Do you have the V2 from the dll, or you read on a board about it?

    Regads,
    Stefan
    Hi Stefan,

    I was discussing the v2 with Rob (I'm sure you know who he is) who is helpful to Dirk with testing and writing the code.

    So back to the rpm gauge. Good news, it's working. FSX is sending data to the FSBus which is moving the rpm gauge. It's not correct though but at least it is working.

    It is not moving very smoothly (quite jerky) and for a small increase in throttle in FSX, it produces a large increase in rpm on the gauge so what do I need to change?

    Thanks again, can't wait to get this in the sim once it's sorted.

  9. #19
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    You have to find the right calculation. You need one that synchronize the Gauge on the Software Panel to the Hardware gauge.
    Which aircraft do you use and what is the Value of the scaler?
    What is the Servo value of the lowest and higest needle position?

    Regards,
    Stefan

  10. #20
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Generic Cessna GA aircraft.

    I don't know what the minimum and maximum values are for the servo but my understanding is that it's 0-255.

    Where do I find the value of the scaler?

    Thanks
    David

Page 2 of 74 FirstFirst 1234561252 ... LastLast

Similar Threads

  1. Fsbus CDK
    By flyandre in forum General Builder Questions All Aircraft Types
    Replies: 4
    Last Post: 12-27-2014, 12:58 PM
  2. Need Help Getting My FSBUS NG I/O Going Again..
    By JBRoberts in forum I/O Interfacing Hardware and Software
    Replies: 14
    Last Post: 03-21-2010, 01:38 PM
  3. Fsbus ng io
    By Davral in forum I/O Interfacing Hardware and Software
    Replies: 0
    Last Post: 01-10-2009, 10:38 PM
  4. Fsbus 2.4.3
    By Anderson/SBSP in forum I/O Interfacing Hardware and Software
    Replies: 9
    Last Post: 11-30-2008, 04:25 PM
  5. Help FSBUS
    By cesarfsim in forum I/O Interfacing Hardware and Software
    Replies: 2
    Last Post: 10-26-2008, 02:23 PM

Tags for this Thread