Announcement

Collapse
No announcement yet.

Led digits on multiple form shadow problem

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

  • Led digits on multiple form shadow problem

    Hi All, I have this problem on Diablo16 Gen4-Ulcd-70DT controlled by Arduino.
    I have 3 Forms with multiple objects on Form 0 and Form 2 (Gauge,Strings,Led Digit etc) , I have a button on each form to pass from one to another and I did it reporting the message to arduino and then switch between Form with this function:

    Code:
        if (Event.reportObject.object == GENIE_OBJ_WINBUTTON)                // If the Reported Message was from a WinButton
        {
                if (Event.reportObject.index == 0)                              // If winbutton
          {
    
            genie.WriteObject(GENIE_OBJ_FORM, 2, 1); // SHOW FORM 2
            form_2 = 1;
            form_0 = 0;
          }
            if (Event.reportObject.index == 1)                                    // If winbutton
          {
            genie.WriteObject(GENIE_OBJ_FORM, 0, 1); // SHOW FORM 0
            form_2 = 0;
            form_0 = 1;
          }
    
    
        }
    The forms are correcly switched but I see a "ghost" of last led_digits value of the previous form in the next one. Values are static because when I change Forms I use form_0 and form_1 booleans to send or not the update on the digits

    For example:

    Code:
      if (M2 != lastM2 and display_on and form_0 == 1){
      genie.WriteObject(GENIE_OBJ_GAUGE, LCD_G_MDX,M1);
      genie.WriteObject(GENIE_OBJ_GAUGE, LCD_G_MSX,0);
      }
      }
    I also tried to catch Form status reading genie.ReadObject(GENIE_OBJ_FORM, with same result.


    Is there some trick to avoid this problem ? Do I need to Switch Off the Form before activating the other ? Thanks


    Here a picture of the "ghost" problem on form 2
    Click image for larger version

Name:	20191125-154540.png
Views:	34
Size:	464.3 KB
ID:	70408

    Last edited by matrixgta; 1 week ago.

  • #2
    Hi,

    Have you loaded the updated files on your memory card?
    If you like, you can attach here your program so we can test it on our end. You may also sent it on my mail: john dot asuncion at 4dsystems dot com dot au.

    Best Regards,
    Kevin

    Comment


    • #3
      Originally posted by John Kevin View Post
      Hi,

      Have you loaded the updated files on your memory card?
      If you like, you can attach here your program so we can test it on our end. You may also sent it on my mail: john dot asuncion at 4dsystems dot com dot au.

      Best Regards,
      Kevin
      Hi Kevin,
      I Found a solution in the meantime, the display need a bit of time after the Form switch before sending data on the activated form object , adding a delay after the switch solve the problem.

      Code:
          if (Event.reportObject.object == GENIE_OBJ_WINBUTTON)                // If the Reported Message was from a Slider
          {
                  if (Event.reportObject.index == 0)                              // If winbutton
            {
      
              genie.WriteObject(GENIE_OBJ_FORM, 2, 1); // SHOW FORM 2
      
              delay(250);
              form_1 = 0;
              form_2 = 1;       
            }
                  if (Event.reportObject.index == 1)                              // If winbutton
            {
              genie.WriteObject(GENIE_OBJ_FORM, 0, 1); // SHOW FORM 0
              delay(250);
              form_1 = 1;
              form_2 = 0;
      
            }
      
      
          }

      Comment

      Working...
      X