Results 1 to 4 of 4
  1. #1
    New Member
    Join Date
    Aug 2015
    Location
    USA
    Posts
    1
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Problem with Vertical Speed Set

    Hello all

    I am having an issue using Link2fs with FSX and a Arduino Nano. I have setup a 16x2 LCD display and I am using the Multi_LCD_Simple_demo sketch that comes with Link2fs. I have the LCD working and it shows Test on the screen. I start FSX and use the Cessna C172SP as a test plane to make sure all is working. Once I get at an airport and start the I click on the connect Card 1 using the correct serial port of the Nano. Once I do this the VS changes to +9900 even before I tell it to display the info on the LCD. If I select =c the lcd display Vsp +9900. I can select altitude (=b) and heading (=d) and they show correctly (what FSX shows). If I try and select a lower FPS in FSX, it will go back to 9900. If I use the SimConnect Input B21xxxx and put in a lower value, say 500, it will go to that setting and then go back to 9900.

    I am not sure what is going on or what could be changing this setting. I have looked in the example sketch and found no reference to 9900 anywhere in it.

    Any help would be appreciated.

    James

  2. #2
    New Member
    Join Date
    Feb 2015
    Location
    Spain
    Posts
    2
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with Vertical Speed Set

    Hi,

    Did you manage to solve this problem?
    Iīm having the same issue and solved it of sorts: For the VSset, FSX or Link2FS expects you to use a rotary. In other words if you set up a rotary the same way you would set it up for ALTset it will work fine.
    Your issue only occurs when one tries to set the VSset+/- with 2 buttons and since you only use one button at a time, thatīs where the problem comes from. In a rotary thereīs always a binary value on both sides depending on the type of rotary used. To work around it you would have to emulate a rotary through a button... which is easier said than done.
    For now, I have solved it of sorts but Iīm not a programmer. Without a doubt someone with better programming skills could do a better job. If interested, let me know.

    Fairfax

  3. #3
    150+ Forum Groupie BuzziBi's Avatar
    Join Date
    Mar 2013
    Location
    Norway
    Posts
    275
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with Vertical Speed Set

    Post code
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  4. #4
    New Member
    Join Date
    Feb 2015
    Location
    Spain
    Posts
    2
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with Vertical Speed Set

    BuzziBi,

    I've chosen to fix this by using 1 rotary encoder for ALTset and VSset. A on-off-on switch between GND and pins x and y is used to switch between the 2 modes. This works very well and without a delay.

    excerpt code for the rotary:

    long X4 = (quad4.position());
    if (X4 != Xold4 && digitalRead (Switch10) == LOW){
    if (X4 > Xold4) {Serial.println("B11");} //incr ALT setting
    if (X4 < Xold4) {Serial.println("B12");} //decr ALT setting
    Xold4 = X4;
    } //end of alt set

    if (X4 != Xold4 && digitalRead (Switch11) == LOW){
    if (X4 > Xold4) {Serial.println("B13");} //incr VS setting
    if (X4 < Xold4) {Serial.println("B14");} //decr VS setting
    Xold4 = X4;
    } //end of vs set

    In my search for a solution, I first tried to set the VS with 2 buttons but I had the same issue as jltucker had in the above post.
    Through some experimentation, I ended up with this next solution which works but is relatively slow because of the long delay.
    Lowering the delay only increases the VSset per pulse from the button. E.g. a delay of 700 gives a 200 ft/min increase or decrease, etc.
    By far the best way to go is to use a separate rotary or combine it with the ALTset rotary as explained above:

    excerpt code for this īsolutionī:

    debouncer10.update();
    int value10 = debouncer10.read();
    if ( value10 == HIGH ) {Serial.println ("B13"); delay(1000); (value10 == LOW);}

    debouncer11.update();
    int value11 = debouncer11.read();
    if ( value11 == HIGH ) {Serial.println ("B14"); delay(1000); (value11 == LOW);}

    Fairfax