Announcement

Collapse
No announcement yet.

FONT4 and file_LoadFunction()

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

  • FONT4 and file_LoadFunction()

    Hi,I'm developing an application with uLCD-32PTGFX.I started with uLCD-32PTGFX-R22.PmmC and with this release I'mable to store FONT4 into FLASH (#inherit "FONT4.fnt")and use it in all functions that areexecuted with file_LoadFunction(...).Note: I have to use the value 7 to refer the FONT4. eg.: txt_FontID(7 /*FONT4*/);
    Now I'm using uLCD-32PTGFX-R25.PmmC and FONT4 is not available any moreinside functions.Do you know about this behaviour?
    Thank you.
    Fabio

  • #2


    hi Fabio
    sorry you have lost me - can you please give a code example so we can work together on it ?
    Regards,
    Dave

    Comment


    • #3


      Thank you for the fast response.Here is an example (two files):
      boot.4dg--------
      #platform "uLCD-32PT_GFX2"#inherit "4DGL_16bitColours.fnc"#inherit "FONT4.fnt"
      #MODE RUNFLASH #STACK 300
      func main()
      var func;
      func=file_LoadFunction("StartApp.4FN"); func(7 /*FONT4*/); mem_Free(func);
      repeat foreverendfunc


      StartApp.4dg------------
      #platform "uLCD-32PT_GFX2"#inherit "4DGL_16bitColours.fnc"
      #STACK 10
      func main(var font) txt_FontID(font);
      print("Hello");
      endfunc


      With uLCD-32PTGFX-R22.PmmC the string "Hello" is print out with FONT4while with uLCD-32PTGFX-R25.PmmC is print out with FONT1 (I guess)and I didn't find any way to have the FONT4.
      Regards,
      Fabio

      Comment


      • #4


        I use the following to switch between 4FN programs, code framework was supplied by 4D systems. I have stripped out all my code to just the basics. Should work if you get the filenames right. Have a look at the params for FONT4.. The add a fixed offset to signal ROM storage.. Also check out Generic_Program.4FN to see how to use the params. I see you're using functions and not programs, but the params and FONT4 stuff might be related. Andy

        Attached files Generic_boot.4dg (4.1 KB) Generic_Program.4dg (3.1 KB)
        MicroLec Industries P/L
        www.intelligym.com.au

        Comment


        • #5


          Andy, thanks for the info but I can't see your source code.How did you post it? (Probably it's my fault, I'm not an expert of forums)
          Fabio

          Comment


          • #6


            Interesting. Look again, see if the files are there now, it seems the forum hid my attachments when I edited the text earlier...

            Andy
            MicroLec Industries P/L
            www.intelligym.com.au

            Comment


            • #7


              Andy,thank you again, now the two attached files are present.
              Fabio

              Comment


              • #8


                No problems, I hope you find them useful. Good luck
                MicroLec Industries P/L
                www.intelligym.com.au

                Comment


                • #9


                  Hi Andy,with offset of 0x4000 (e.g. 0x4000+FONT4) the FONT4 is usable also byfunctions loaded into RAM.Thank you for the help,
                  Fabio

                  Comment

                  Working...
                  X