No announcement yet.

4D-ViSi generates incorrect code for ledDigitDispay in uLCD-144-G2

  • Filter
  • Time
  • Show
Clear All
new posts

  • 4D-ViSi generates incorrect code for ledDigitDispay in uLCD-144-G2

    In 4D-ViSi i try to insert a ledDigitDisplay from the widgets menu. When I chose "Paste code" ViSi pastes a call to ledDigitsDisplay() with 9 parameters.
    When compiling the correct bitmap for the display is placed on the microSD card, but the compiler then gives an error stating that ledDigitDisplay() is "not found".
    After a bit of googling I found that I have to #inherit "".

    But that include file defines ledDigitsDisplay() with only 7 parameters!!! The include file also makes calls to img_SetWord() and img_Show() which are not implemented on the GOLDELOX displays.

    Am I using the wrong include file? I guess that I need one that uses mediaShow() instead.
    And why does not "Paste Code" automatically insert the correct #inherit statements in the code?

    The same error can be seen at the end of the 4D-ViSi Walkthrough video on YouTube!

  • #2
    The inherited stuff is for you to insert, if you'd started by looking at the Goldelox ViSi LedDigitsGauge sample you would see that for goldelox the inherit statement is
    #inherit ""


    • #3
      Thanks for the quick answer to my first question. I still have hopes for my second question.


      • #4
        The 'Paste code', as the manual says, only pastes code relevant to the particular selected object. It pastes it under the cursor and that's it.

        In the case of a few objects an inherit is needed, these aren't added by paste code, as ViSi does not and cannot know how your program is 'structured'. eg, you may have coded your own routine, you may have inherited the routine in a different inherit, you may have inherited your own customised version of the routine, it can't tell.

        There is an Goldelx ViSi example for each object, and they do inherit the relevant file, so you can look in there to find the correct name.

        AFAIK the potentially needed files are

        #inherit "" // If using the keyboard
        #inherit "" // If using Led Digits or Custom Digits
        #inherit "" // If using Strings