Announcement

Collapse
No announcement yet.

Compass with a GPS

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

  • #16


    One more doubt, what kind of value do I have to send to the User's Images Object? I guess it should be an int.

    I mean, if I have 360 images and the GPS is receiving a course over ground whose values range from 0 to 360, I have to use genieWriteObject(GENIE_OBJ_USERIMAGES, 0x00, course) and that course should be an int, right?

    Comment


    • #17


      yes
      James

      Comment


      • #18


        Hi James
        I have my compass compiled (without errors) and on the SD card stored. However, I do not understand why the file names look like on an SD card so KOMPAS~1.dat KOMPAS~1.gci RunFlash.4xe and not as in BigDemo program Display.file_LoadImageControl ("gfx2demo.dat" "gfx2demo.gci", 1);
        Willy

        Comment


        • #19


          Only short (8.3) filenames are supported by Picaso, so Workshop places the files on the card with their short filename.
          Mark

          Comment


          • #20
            Hi, My compass with the 360 images works fine with the in the Big Demo existing Picaso serial commands.
            I've also integrated a keyboard at the top of the display and a LED with 4D ViSi Genies.
            In KOMPAS~1.dat I see the following:
            "Userimages0" 0000 0000 00 50
            "Keyboard0" 1000 0277 00 00
            "Keyboard0_0" 5200 0277 00 01
            "Keyboard0_1" 7200 0277 3C 01
            "Keyboard0_2" 9200 0277 78 01
            "Keyboard0_3" B200 0277 B4 01
            "Leddigits0" D200 0277 4C B8
            "iLeddigits0" EC00 0277 4C B8

            Which Picaso serial commands I can bring the keyboard and leddigits data from the SD card to the display?
            I have read the Reference for Picaso Environment Command Set but without success.
            Willy

            Comment


            • #21


              Assuming you have opened the image control you use 'image show' to display it. The 'index' parameter is the same as the line number in the .dat file with the first line being the 0th image.
              Mark

              Comment


              • #22


                Hi Mark
                Thank you thank you it works.
                Willy

                Comment


                • #23
                  Hi Mark, Which serial command can I enable touching my Keyboard ?

                  Display.touch_Set(TOUCH_ENABLE) ;
                  Display.putstr("Please Touch an Image\n") ;
                  i = -1 ;
                  do
                  {
                  j = Display.touch_Get(TOUCH_STATUS) ;
                  if (j == TOUCH_PRESSED)
                  i = Display.img_Touched(handle,1) ; I get no feedback ??
                  } while (i == -1) ;
                  Display.putstr("You touched Image Index ") ;
                  itoa(i,wk,10) ;
                  Display.putstr(wk) ;

                  with i = Display.img_Touched(handle,ALL);
                  I can just touch the "Leddigits0" and I get "You touched Image Index 6"

                  In the File KompassCont.INC file I see the following:
                  #DATA
                  byte iKeyboard0keystrokes 0x61, 0x66, 0x6C, 0x68
                  #END

                  // object indexes into ImageControl
                  #CONST
                  iUserimages0 // offset 0x0
                  iKeyboard0 // offset 0x2771000
                  iKeyboard0_0 // offset 0x2775200
                  iKeyboard0_1 // offset 0x2777200
                  iKeyboard0_2 // offset 0x2779200
                  iKeyboard0_3 // offset 0x277B200
                  iLeddigits0 // offset 0x277D200
                  iiLeddigits0 // offset 0x277F000
                  #END

                  var disk, hndl ;
                  var oKeyboard0[12] := [-1, 0, 0, 0, 0, 255, 255, 255, 255, 255, 4, 0] ;

                  Willy

                  Comment


                  • #24


                    i = Display.img_Touched(handle,1) ; I get no feedback ??
                    Didn't you mean to say

                    i = Display.img_Touched(handle,ALL) ;

                    or

                    i = Display.img_Touched(handle,-1) ;

                    ?

                    The code you have will only return 1 if image 1 is touched, it does not check for any other touch.
                    Mark

                    Comment


                    • #25


                      Hi Mark,
                      I just want to activate the keyboard.
                      with this code : i = Display.img_Touched(handle,-1) ;
                      I have the same result:
                      I can only touch the "Leddigits0" and I get "You touched Image Index 6"
                      On image 1 I get no feedback.
                      Willy

                      Comment


                      • #26


                        Touch detection is disabled, by default, for 'videos', could that be your problem?

                        img_ClearAttributes(hndl, iVideox, I_TOUCH_DISABLE); // set to enable touch

                        Is the touch calibration out?
                        Mark

                        Comment


                        • #27


                          Hi Mark
                          this code: img_ClearAttributes(hndl, iVideox, I_TOUCH_DISABLE); // set to enable touch
                          Can I not compiling
                          I receive error : "hndl" was not declared in this cope.
                          and with this code this code: img_ClearAttributes(handle, iVideox, I_TOUCH_DISABLE);
                          I receive error : "iVideox" was not declared in this cope.
                          Willy

                          Comment


                          • #28


                            Hmm, asking questions about variable names not being found pasting things into your code without updating them to be your own variable names?

                            Perhaps it's time to read some manuals http://www.4dsystems.com.au/product/10/120/Development/4D_Workshop_4_IDE/, look at some app notes http://www.4dsystems.com.au/appnotes/, and/or the supplied examples (File, Samples)
                            Mark

                            Comment

                            Working...
                            X