Announcement

Collapse
No announcement yet.

GRAM access

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

  • GRAM access

    Hello,

    In building an EFIS, I'm trying to read for SD with file_Seek then file_Read with destination = 0: nothing happens

    Then I try do just do a write of red color: still nothing

    No way to have GRAM write access working:


    70DT CLB

    Code:


    result := disp_setGRAM(IMGX1, IMGY1, IMGX1+179, IMGY1+55);
    putnumXY(700, 250, DEC, result );

    disp_WrGRAM(RED);

    result := file_Read(0, 20160 , handle);
    putnumXY(700, 270, DEC, result );



    The number of pixel of gram area is ok
    The number of bytes read is OK

    But... nothing, even the disp_WrGRAM(RED) does nothing.


    Any clue?
    Fran├žois

  • #2
    Hello Francois,

    In the above example, the GRAM window would no longer be available as you have another gfx function 'putnum' straight after setting the window. Could you try it like this and let me know if it works.

    result := disp_setGRAM(IMGX1, IMGY1, IMGX1+179, IMGY1+55);
    result := file_Read(0, 20160 , handle);
    putnumXY(700, 270, DEC, result );

    Best regards

    Paul


    Comment


    • #3
      Hi Paul,

      Seems to work better.

      Do you confirm I can have a window of 40k (180x112) and have a read of 40k in one pass?

      Also, what the format I should read from disk? Raw RGB on 16bits, high or low first ?


      I intend to have a Java program building the 20000 possibilities of the AI positions (almost 1GB file on the SB card), that's the reason I can't use the custom images

      Comment


      • #4
        Hi Francois,

        I havent't tried an image of that size using this method but I will give it a go today.

        The format is RAW RGB565 16 bit colours. It is stored MSB first.

        I have done this using custom images on the SD card but mine only went 60 degrees in all directions and was under 10000 images. I too had an external program creating all possibilities, it was a lot of work to add all the images into the widgets and I ended up with a GCI file of over 3GB and works well.

        Best regards

        Paul

        Comment

        Working...
        X