harmonize messages
This commit is contained in:
@@ -91,7 +91,8 @@ xosdlib_drv_init (Driver *drvthis)
|
||||
if ((sscanf(size, "%dx%d", &w, &h) != 2) ||
|
||||
(w <= 0) || (w > LCD_MAX_WIDTH) ||
|
||||
(h <= 0) || (h > LCD_MAX_HEIGHT)) {
|
||||
report(RPT_WARNING, "svga: Cannot read size: %s. Using default value.\n", size);
|
||||
report(RPT_WARNING, "%s: cannot read Size: %s. using default %s",
|
||||
drvthis->name, size, DEFAULT_SIZE);
|
||||
sscanf(DEFAULT_SIZE, "%dx%d", &w, &h);
|
||||
}
|
||||
p->width = w;
|
||||
@@ -107,14 +108,14 @@ xosdlib_drv_init (Driver *drvthis)
|
||||
p->height = LCD_DEFAULT_HEIGHT;
|
||||
}
|
||||
}
|
||||
report(RPT_INFO, "%s: Using size %dx%d", __FUNCTION__, p->width, p->height);
|
||||
report(RPT_INFO, "%s: using size %dx%d", drvthis->name, p->width, p->height);
|
||||
|
||||
/* Which backlight brightness */
|
||||
tmp = drvthis->config_get_int(drvthis->name, "Brightness", 0, DEFAULT_BRIGHTNESS);
|
||||
debug(RPT_INFO, "%s: Brightness (in config) is '%d'", __FUNCTION__, tmp);
|
||||
if ((tmp < 0) || (tmp > 1000)) {
|
||||
report (RPT_WARNING, "%s: Brightness must be between 0 and 1000. Using default %d.\n",
|
||||
__FUNCTION__, DEFAULT_BRIGHTNESS);
|
||||
report(RPT_WARNING, "%s: Brightness must be between 0 and 1000; using default %d",
|
||||
drvthis->name, DEFAULT_BRIGHTNESS);
|
||||
tmp = DEFAULT_BRIGHTNESS;
|
||||
}
|
||||
p->brightness = tmp;
|
||||
@@ -123,8 +124,8 @@ xosdlib_drv_init (Driver *drvthis)
|
||||
tmp = drvthis->config_get_int(drvthis->name, "OffBrightness", 0, DEFAULT_OFFBRIGHTNESS);
|
||||
debug(RPT_INFO, "%s: OffBrightness (in config) is '%d'", __FUNCTION__, tmp);
|
||||
if ((tmp < 0) || (tmp > 1000)) {
|
||||
report (RPT_WARNING, "%s: OffBrightness must be between 0 and 1000. Using default %d.\n",
|
||||
__FUNCTION__, DEFAULT_OFFBRIGHTNESS);
|
||||
report(RPT_WARNING, "%s: OffBrightness must be between 0 and 1000; using default %d",
|
||||
drvthis->name, DEFAULT_OFFBRIGHTNESS);
|
||||
tmp = DEFAULT_OFFBRIGHTNESS;
|
||||
}
|
||||
p->offbrightness = tmp;
|
||||
@@ -138,20 +139,20 @@ xosdlib_drv_init (Driver *drvthis)
|
||||
/* initialize xosdlib library */
|
||||
p->osd = xosd_create(p->height);
|
||||
if (p->osd == NULL) {
|
||||
report(RPT_ERR, "xosd: xosd_create() failed.");
|
||||
report(RPT_ERR, "%s: xosd_create() failed", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* set font */
|
||||
if (xosd_set_font(p->osd, p->font) == -1) {
|
||||
report(RPT_ERR, "xosd: xosd_set_font() failed.");
|
||||
report(RPT_ERR, "%s: xosd_set_font() failed", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* make sure the frame buffer is there... */
|
||||
p->framebuf = (unsigned char *) malloc(p->width * p->height);
|
||||
if (p->framebuf == NULL) {
|
||||
report(RPT_ERR, "%s: unable to create framebuffer.\n", __FUNCTION__);
|
||||
report(RPT_ERR, "%s: unable to create framebuffer", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
memset(p->framebuf, ' ', p->width * p->height);
|
||||
@@ -159,11 +160,13 @@ xosdlib_drv_init (Driver *drvthis)
|
||||
/* make sure the framebuffer backing store is there... */
|
||||
p->backingstore = (unsigned char *) malloc(p->width * p->height);
|
||||
if (p->backingstore == NULL) {
|
||||
report(RPT_ERR, "%s: unable to create framebuffer backing store.\n", __FUNCTION__);
|
||||
report(RPT_ERR, "%s: unable to create framebuffer backing store", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
memset(p->backingstore, ' ', p->width * p->height);
|
||||
|
||||
report(RPT_DEBUG, "%s: init() done", drvthis->name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user