Menu

Need help to customize hbar on glcd-picolcdgfx

Help
2015-08-17
2015-08-20
  • Ta Xuan Truong

    Ta Xuan Truong - 2015-08-17

    Hi all,
    I'm trying to customze hbar to thinner. After looking for source, I found these line in file drivers.c handle hbar data:

    void
    drivers_hbar(int x, int y, int len, int promille, int pattern)
    {
        Driver *drv;
    
        debug(RPT_DEBUG, "%s(x=%d, y=%d, len=%d, promille=%d, pattern=%d)",
              __FUNCTION__, x, y, len, promille, pattern);
    
        ForAllDrivers(drv) {
            if (drv->hbar)
                drv->hbar(drv, x, y, len, promille, pattern);
            else
                driver_alt_hbar(drv, x, y, len, promille, pattern);
        }
    }
    

    My problem is I can't find anything related to drv->hbar to customize that function.

    Update 1: Found drv->hbar called from lcd.h, line 157:

    void (*hbar) (struct lcd_logical_driver *drvthis, int x, int y, int len, int promille, int pattern);
    

    Update 2: Found in changelog v5.0

    LCDd will use fill-in functions for drivers that don't support a certain
    function. Available for: vbar, hbar, bignum, heartbeat, icon, cursor.
    

    Looking for glcd_drv.c, I found:

    MODULE_EXPORT void
    glcd_hbar(Driver *drvthis, int x, int y, int len, int promille, int options)
    

    Tried to edit but still no luck.

    Could you please help? Thanks so much.

     

    Last edit: Ta Xuan Truong 2015-08-19
  • Ta Xuan Truong

    Ta Xuan Truong - 2015-08-20

    Problem solved.
    I forgot to copy driver module (glcd.so) to target driver directory. For those who need to customize hbar (or vbar), the functions are located in server/drivers/glcd_drv.c

    Hope this help.

     

Log in to post a comment.