Announcement

Collapse
No announcement yet.

GENIE_OBJ_ANGULAR_METER bug?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GENIE_OBJ_ANGULAR_METER bug?

    Hi,

    I have an app with a few screen/tabs. First and second tabs have same visual set of objects. Arduino only updates objects on the current tab. However, I noticed a strange behavior of the meter on the second tab: first update shows the right meter (object index 1), but the following one brings up meter index 0 from first tab one. I see this happening only to angular meter, all the rest works as expected.

    Is it a bug or am I doing something wrong?

    Both Arduino and 4DSystems sources are posted here: https://github.com/vtl/volvo-ddd/

    Thanks!

  • #2
    another car guy!
    can you post the code so we can check the issue
    thank you

    Tony

    Comment


    • #3
      Hi Vitaly,

      Tried running this short lines on an Arduino w/ the Genie Project on Github:

      Code:
      void loop() {
        // put your main code here, to run repeatedly:
      
        genie.DoEvents();
        genie.WriteObject(GENIE_OBJ_FORM, 0, 0);
        delay(2000);
        genie.WriteObject(GENIE_OBJ_ANGULAR_METER, 0, 10);    // on form 0
        delay(2000);
        genie.WriteObject(GENIE_OBJ_FORM, 1, 0);
        delay(2000);
        genie.WriteObject(GENIE_OBJ_ANGULAR_METER, 1, 20);      // on form 1
        delay(2000);
        genie.WriteObject(GENIE_OBJ_ANGULAR_METER, 2, 30);    // on form 1
        delay(2000);
      }
      and it showed the attached pictures.
      Attached Files

      Comment


      • vtl
        vtl commented
        Editing a comment
        Hi Joe,

        Thanks for testing this out! As you see, second update of angular meter on form 1 (all metric) caused rendering of meter from form 0 (all imperial).

        Thanks!

      • vtl
        vtl commented
        Editing a comment
        Any hope to get this fixed? I would really love to have more than one angular meter in my project.

        Just to remind: no matter how many meters you have on different screens/tabs, the first one is always rendered instead.

    • #4
      Um, are you sure?

      Form1 has two angular meters, AngularMeter1, with a caption of 'PSI*10' (The same as AngularMeter0 on Form0) and AngularMeter2, with a caption of 'BAR * 10'.

      So everything seems to be working as expected.

      Are you getting confused by the order the meters appear in the forum images (0, 2, 1)?
      Mark

      Comment


      • #5
        Yes, I am sure: I see it every day in my car When I switch to the second tab, first I see second meter (BAR), but following write to the meter object renders first meter (PSI) instead. You can see that your own last image has PSI meter, but the temperatures are in Celsius, meaning this is the second tab. Meter should be BAR here, not PSI.

        Thanks!

        Comment


        • #6
          Have a look at your code, it is working as you have it coded.

          Form0 has one Angular meter 'PSI*10'

          Form1 has two angular meters, 'PSI*10' and 'BAR*10'
          Mark

          Comment


          • vtl
            vtl commented
            Editing a comment
            Hm, true: one meter over another one... I'm genius Thanks for pointing that out!
        Working...
        X