Announcement

Collapse
No announcement yet.

Keyboard Object Question

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

  • #76
    Hi Tim,

    Based on your setup, the NULL Characters are needed as a pause for printing between the elements of the array. Without the NULL in the action_type[] array, the printing of the elements won’t have any pause at all and will print continuously just like what you’re experiencing.

    As you have noticed in printing the action_list[] elements, no other element is printed after your desired elements. The reason for this is because of your array’s elements. You constructed your array in such a way that spaces will serve as black spaces in your printing. You may test it further with this altered array:

    Code:
    char action_list[] = "Action1  000           11111Action2             21222Action3             31333Action4             41444Action5             51555Action6             61666Action7             71777Action8             81888Action9             11999Action10            11000";

    Hope this cleared your question and Best Regards,
    Eran

    Comment


    • #77
      Thanks Eran, that does make sense and explains most of what I am seeing. Its certainty not a problem to punctuate the strings I create for printing with NULL terminators.

      The only remaining 'weird' thing is that one of my messages (I call it Label List text) is string essentially of 5 character bytes and is sent something like this "none versesolo introchord" ie no punctuation. This is deconstructed in magicObject0 (lines50-58) then printed to form 12 by MagicEvent5 (lines 24-28) without any NULL character punctuation and in a lot of cases (as the example above) without even any spaces. Maybe this is pure luck and the 'unused' elements of my strings (eg editStringOne) are holding some remnant spaces or NULL characters which make it look like its working?

      Comment


      • #78
        Hi Tim,

        I’m not sure if my comprehension of your problem is right, but maybe it can help you.
        I am assuming that you’re asking why the exact string is printed in your Strings even though you didn’t put any NULL terminator at all.

        I went through your code and noticed that you’re doing the following:
        Code:
        for (j:=0; j<maxEditLength;j++)                // populate the edit strings with the data
                        editStringOne[j]:=recString[j];
                        editStringTwo[j]:=recString[j+maxEditLength];
                        editStringThr[j]:=recString[j+(2*(maxEditLength))];
                        editStringFou[j]:=recString[j+(3*(maxEditLength))];
                        editStringFiv[j]:=recString[j+(4*(maxEditLength))];
        next
        This is from your MagicCode0 lines 52 to 59. I also found that maxEditLength = LABEL_LENGTH = 5.

        From here, you can see that you’re limiting your Strings to only display five characters(j<maxEditLength) from 0 to 4. This is the reason why you don’t need any NULL terminator at all.
        0 = none(space)
        1 = verse
        2 = solo(space)
        3 = intro
        5 = chord

        Which came from your array:
        char label_list[] = "none versesolo introchordpitchlead…”

        To prove that it is what’s making your code work, you may change LABEL_LENGTH to value 6 in line 7 of your MagicCode2(variables) and notice that your five Strings will have six characters per string already.

        Hope I have been of some help and Best Regards,
        Eran

        Comment


        • #79
          Hi eran

          sorry another dumb question. On power up is the display contrast setting always set to 15?

          is there a way to change this and have it default to a lower value? Or better still load a value from static memory that i can control.


          i ask because my partner has suddenly developed an issue where the screen wont boot properly and reliably and he is convinced it is a power problem.

          i will try and upload a short video of what he is seeing

          Comment


          • #80
            Cant seem to upload the video but if its ok here is a link


            https://www.dropbox.com/s/2vq3d5jxm3...95447.mp4?dl=0

            Comment


            • #81
              Hi Tim,

              In ViSi-Genie Magic, you may make a routine to allow your program to set an initial value of the contrast. You can do this by setting the CONTRAST on the Pre-Genie Init.

              Example:
              Code:
              gfx_Contrast(1);
              Hope this helps and Best Regards,
              Eran

              Comment

              Working...
              X