This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2P-ACD: Text drawing via Grpx is not working

Part Number: TDA2P-ACD


Hello.

I am trying to show some status information via Grpx on GFX1. But I only see TI logo on screen and nothing else.

My setup:

  • late attach
  • pipeline on M4
  • linux on A15
  • production mode boot
  • Vision SDK 3.0.7


Links connections:

    /*NullSrc -> gfx1 */
    pObj->NullSrcLinkPrm.outQueParams.nextLink              = pObj->DisplayVIDxLinkID[3];
    pObj->DisplayVIDxLinkPrm[3].inQueParams.prevLinkId      = pObj->NullSrcLinkID;
    pObj->DisplayVIDxLinkPrm[3].inQueParams.prevLinkQueId   = 0;

Grpx config:

    GrpxSrcLink_CreateParams *DisplayGrpxSrcPrm = &pObj->GrpxSrcLinkPrm;

    GrpxSrcLink_CreateParams_Init(DisplayGrpxSrcPrm);
    DisplayGrpxSrcPrm->grpxBufInfo.dataFormat   = SYSTEM_DF_BGR16_565; //SYSTEM_DF_BGRA16_4444;
    DisplayGrpxSrcPrm->grpxBufInfo.width        = pObj->displays[DISP_FPDLINK2].displayWidth;
    DisplayGrpxSrcPrm->grpxBufInfo.height       = pObj->displays[DISP_FPDLINK2].displayHeight;
    
    DisplayGrpxSrcPrm->logoDisplayEnable        = TRUE;
    DisplayGrpxSrcPrm->logoParams.startX        = 40;
    DisplayGrpxSrcPrm->logoParams.startY        = 40;

In application on M4 core I am trying to draw some text via Grpx:


#define GRPX_BOOT_TIME_DISPLAY_DURATION (24*60*60*1000)
#define GRPX_BOOT_TIME_DISPLAY_FONTID   (5)
#define GRPX_BOOT_TIME_DISPLAY_X_OFFSET_REARVIEW (512-64)
#define GRPX_BOOT_TIME_DISPLAY_X_OFFSET_TOPDOWN_REARVIEW (512-128)
#define GRPX_BOOT_TIME_DISPLAY_Y_OFFSET (1005)
#define GRPX_ANALYTICS_STATE_DISPLAY_Y_OFFSET (235)
      Vps_printf("%s: creating overlay\n", __func__);
      GrpxSrcLink_StringRunTimePrintParams printPrms;
      System_linkControl(gValidationApp.GrpxSrcLinkID,
          GRPX_SRC_LINK_CMD_NEW_OVERLAY,
          NULL,
          0,
          TRUE);


      snprintf(printPrms.stringInfo.string,
          sizeof(printPrms.stringInfo.string) - 1,
          "Rear View");
      printPrms.stringInfo.string[sizeof(printPrms.stringInfo.string) - 1] = 0;
      printPrms.duration_ms = GRPX_BOOT_TIME_DISPLAY_DURATION;
      printPrms.stringInfo.fontType = GRPX_BOOT_TIME_DISPLAY_FONTID;
      printPrms.stringInfo.startX   = GRPX_BOOT_TIME_DISPLAY_X_OFFSET_REARVIEW;
      printPrms.stringInfo.startY   = GRPX_BOOT_TIME_DISPLAY_Y_OFFSET;

      Vps_printf("%s: print string at overlay\n", __func__);
      System_linkControl(gValidationApp.GrpxSrcLinkID,
          GRPX_SRC_LINK_CMD_PRINT_STRING,
          &printPrms,
          sizeof(printPrms),
          TRUE);

  • Hi Yuri,

    What is the issue you are seeing? Are you trying to use your own logos to draw?

    If yes, please check gprssrc link and modify the path for existing logo images.

    Thanks

    RamPrasad

  • Hello. I am trying to show different text on screen via grpx module. Some current status of the system: uptime, temperature, camera status and so on. I mean I want to pust string of text on the screen and change it dynamically in runtime.

  • Hi Yuri,

    Can you first confirm  that command ID "GRPX_SRC_LINK_CMD_PRINT_STRING" sent from your application is reaching GprxSRc link?

    Please put a print in ./apps/src/rtos/modules/grpxSrc/grpxSrcLink_tsk.c when it receives this command.

    Printing a string is not used in HLOS usecase, so I referred rtos usecases. In all usecases, this command is being sent periodically from task eventhough it is same string.

    Have you implemented similar task to print the command?

    Thanks

    RamPrasad

  • Hi Ramprasad,

    Thank you for you reply.

    I am already put Vps_printf() into GrpxSrcLink_tskMain into "GRPX_SRC_LINK_CMD_PRINT_STRING" case, and into GrpxSrcLink_drvPrintHandler(), and into GrpxSrcLink_drvProcessData(), and also into GrpxSrcLink_runStringPrint() into "GRAPHICS_SRC_LINK_STRPRINT_PRINTSTR" case. So now I can see all chain of functions invoked then I am trying to print string. And I see all of these Vps_printf() output in log.

    May be my issue is related to zorder? May be my string is under some other none-transparent graphics overlay?

  • Hi Yuri,
    I made your changes to print the text "Rear View" at the center of the display with vip_single_cam_sgx_display usecase.
    I am observing the text "Rear View" as overlay on the display without any issue.
    I have attached the snapshot taken for this and also the changes made this chain usecase.
    I am seeing this text overlay along with LOGO and CPU statistics.
    Did not have to do any z-order setting.

    Can you check this?

    usecase.zip

    Thanks
    RamPrasad

  • Hi

    Thank you for your help.

    I am found out what caused my issue: my vertical offset was out of buffer size.
    Due to draw2d_font_bmp.c::Draw2D_drawString_rot() funtion report no errors in such a case I just get no text on screen with out an errors.

    So I have my vertical offset corrected and now I can see text on screen.

    Thank you for your help, again.