Announcement

Collapse
No announcement yet.

The BIG Picture

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

  • The BIG Picture

    I'd like to have a clear understanding how this all works compiler wise.What editiable files get compiled into the final product? How about input files vs intermediate files?

    I have a Visi Genie application with buttons and LEDs. I can communicate using serial communication using the Command set from the Visi Genie Reference manual. When I change the LED types, it shows on the form, is correct in the .4DViSi file, but is unchanged when recompiled and downloaded. Because how this works is a mystery I can't dig down into the files to see where it goes wrong.

  • #2
    Hello,


    Welcome to the forum!


    Can you clarify for me, what do you mean of input files vs intermediate files?

    On the project directory, the WS4 reads the ".4Dgenie" file as the collection of the object parameter while ".4DGenieS" file as genie program which can be found at ".4DWork" folder.

    Additionally, after the compiling, the compiler will generate .gci and .dat files for the graphics supporting files with respect to the object parameter file and the genie program was uploaded into the display.

    Have you tried to recompiled then check the graphics support file on the SD card if updated? If not, it needs to be update when you made changes on the widget's parameters.



    If you have questions, please don't hesitate to ask here.

    Best regards,
    Kayven
    Last edited by kayven@4d; 9th November 2018, 12:15 PM.

    Comment


    • #3
      Kayven,

      Thanks for the reply. Nowhere can I find (except your brief lines above) an explanation of how this all works including what files (from what folder) are used to make which files (in which folder). For instance the ".4DWork" folder has 8 files of which you mentioned 1.

      When I resized (changed) objects and recompiled the changes didn't show up on the display and If I understood the mechanics I could debug the process.

      --jeff

      Comment


      • #4
        Hello jeff,

        I can't replicate your issue.

        It would be great if you can send me the WS4(Visi-Genie) project file, this will help us to analyze your issue and do our best in order to help you.

        Please open your application in Workshop4, go to File, Zip Project and send the ZIP either on the forum or to my email.

        If you do not wish to post it on the forum, please send it to my email: kayven at 4dsystems dot com dot au

        Best regards,
        Kayven

        Comment


        • #5
          Kayven,

          I found I needed to force a complete compile (it didn't know I had made alterations).

          I want to print to the STRING object through the serial port. Once the object design is finished I can save the design as Visi. Now the basic structure to support my design has been pre-written and I can alter the code. Do I need to write code to place text in the STRING object? Here's another area where the doc could be improved. Most other devices on the market offer small examples of 'how to' command usage right in the doc (i.e. visi-genie ref manual). It looks like the command 0x02 should do this. How about cursor positioning within the STRING object?

          Comment


          • #6

            Hi Jeff,

            We're glad that you resolved the problem.

            You're right, for instance, you can print a text on the String object by utilizing the code snippet as shown below:

            Code:
            genie.WriteStr(String Index, string);
            With regards to the cursor positioning concern, In fact, the external host is responsible for it.

            Best regards,
            Kayven

            Comment


            • #7
              Kayven,

              It seems fairly straight forward to use static text int SD .txt files. I want to display dynamic strings to the STRING object. If I want to replace text on the 2nd row with "Hello", how would I do that? Do I need to know the size of the object (i.e. rows and columns) and print one string that includes all of the text for the whole (multiline) object, replacing all text for the object each time?

              Do you know who is responsible for the _4DOS interpreter in the examples for Iot wifi modules?

              --jeff

              Comment


              • #8
                Hi Jeff,

                I want to display dynamic strings to the STRING object. If I want to replace text on the 2nd row with "Hello", how would I do that?
                Fortunately, you can replace text on the 2nd row, even if you do not know the size of the string object by simply adding a newline character ('\n') as should like shown below:


                Code:
                genie.WriteStr(0, "hello\naloha\nbonjour");
                And yes, this will print a text with multi-line as one string only.



                For your reference,I have attached a simple ViSi-Genie project and an Arduino Sketch that demonstrate texts with newline on the string object and a simple video demo.


                Do you know who is responsible for the _4DOS interpreter in the examples for Iot wifi modules?
                As of now, sorry I don't know.

                Best regards,
                kayven
                Attached Files

                Comment


                • #9
                  Kayven,

                  Nice explanation and simple example for using the serial commands. Unfortunately,I'm using the IOT-24 and so (I think) I am limited to using the GFX4D library. Let me back up a bit and explain what seems to be a simple, yet useful project.
                  Two objects KEYBOARD (bottom of display) and STRING (top of display). Serial input characters displayed in STRING object, Keyboard entry sent out Serial output. That's it, a serial terminal.I chose the IOT for its built-in wifi, for later functianality.

                  Comment


                  • #10
                    Hello,

                    I have attached a serial terminal example below. Please copy the GCI & DAT file to your SD card and open the sketch in the Arduino IDE. You will need to use the updated library which is pre-release at the moment and I have attached this also.

                    I hope this helps

                    Best regards

                    Paul
                    Attached Files

                    Comment


                    • #11
                      Kayven,

                      Reviewed _4Dos.BAS and found it has all the elements I needed. The keyboard is in fact handled entirely using GFX4D library. Next I'll format the TW so I can have cursor control of the text placed in the window. Thanks for you support. I'll look at your attached files and compare techniques.

                      --jeff

                      ...oooh the new library (will have) has TW support!
                      Last edited by jlbachiochi; 15th November 2018, 03:38 AM.

                      Comment


                      • #12
                        No worries Jeff

                        We wish more success on your project.

                        Just, we are here to help you to the best of our ability when you have questions.

                        Best regards,
                        Kayven
                        Last edited by kayven@4d; 16th November 2018, 10:08 AM.

                        Comment


                        • #13
                          I thought you'd like to know...

                          I continued on with my Serial Terminal app using just a stripped down version of -4Dos because it demonstrates how to create a keyboard (key by key) and doesn't use the SD Card for anything. In using the released version of GFX4d and the gfx.TWcls(); command with my IOT-24, it continuously crashes. When I used the beta version all is well. Long story short, The error is corrected in the beta .cpp of TWcls().

                          void GFX4d::TWcls(){
                          RectangleFilled(txtx - 3, txty - 3, (txtx - 3) + (txtw + 2) - 1, (txty - 3) + (txth + 2) - 1, txtb);
                          twcurx = txtx;
                          twcury = txty;
                          twxpos = 0;
                          twypos = 0;
                          for(int n = 0; n < sizeof(txtbuf); n ++){
                          txtbuf[n] = 0;
                          }
                          }

                          twxpos and twypos are NOT set to '0' in the released version. I would not have found this without your kind beta gift

                          --jeff

                          Comment


                          • #14
                            Hi Jeff

                            Thank you for letting me know. Yes I remember adding that as a fix in this version. At the time it was requested with other things that weren't practical for everyone and must have been accidently removed in the release version. The BETA version will be fully tested shortly and replace the release version.

                            Thanks again Jeff

                            Best regards

                            Paul

                            Comment

                            Working...
                            X