Fix heartbeat icon messing up with vBar.
This commit is contained in:
@@ -40,6 +40,7 @@ v0.5.4
|
|||||||
* SureElec: Fix stall on startup
|
* SureElec: Fix stall on startup
|
||||||
+ new driver: MDM166A for Futaba/Targa USB VFD (Christoph Rasim)
|
+ new driver: MDM166A for Futaba/Targa USB VFD (Christoph Rasim)
|
||||||
* picolcd: Fix backlight and contrast handling (M. T. Jones)
|
* picolcd: Fix backlight and contrast handling (M. T. Jones)
|
||||||
|
* picolcd: Fix heartbeat icon messing up with vbar
|
||||||
|
|
||||||
v0.5.3
|
v0.5.3
|
||||||
+ lcdexec: notification when called program finishes
|
+ lcdexec: notification when called program finishes
|
||||||
|
|||||||
+32
-14
@@ -648,30 +648,49 @@ MODULE_EXPORT void picoLCD_num (Driver *drvthis, int x, int num)
|
|||||||
*/
|
*/
|
||||||
MODULE_EXPORT int picoLCD_icon (Driver *drvthis, int x, int y, int icon)
|
MODULE_EXPORT int picoLCD_icon (Driver *drvthis, int x, int y, int icon)
|
||||||
{
|
{
|
||||||
PrivateData *p = drvthis->private_data;
|
|
||||||
|
|
||||||
/* 8x5 icons each number represents one row in binary */
|
|
||||||
|
|
||||||
static unsigned char heart_open[] =
|
static unsigned char heart_open[] =
|
||||||
{ 0x0, 0xa, 0x15, 0x11, 0x1b, 0xa, 0x4, 0x0 };
|
{
|
||||||
|
b_______,
|
||||||
|
b___X_X_,
|
||||||
|
b__X_X_X,
|
||||||
|
b__X___X,
|
||||||
|
b__XX_XX,
|
||||||
|
b___X_X_,
|
||||||
|
b____X__,
|
||||||
|
b_______
|
||||||
|
};
|
||||||
|
|
||||||
static unsigned char heart_filled[] =
|
static unsigned char heart_filled[] =
|
||||||
{ 0x0, 0xa, 0x1f, 0x1f, 0x1f, 0xe, 0x4, 0x0 };
|
{
|
||||||
|
b_______,
|
||||||
|
b___X_X_,
|
||||||
|
b__XXXXX,
|
||||||
|
b__XXXXX,
|
||||||
|
b__XXXXX,
|
||||||
|
b___XXX_,
|
||||||
|
b____X__,
|
||||||
|
b_______
|
||||||
|
};
|
||||||
|
|
||||||
switch (icon) {
|
switch (icon) {
|
||||||
case ICON_BLOCK_FILLED:
|
case ICON_BLOCK_FILLED:
|
||||||
picoLCD_chr(drvthis, x, y, 255);
|
picoLCD_chr(drvthis, x, y, 255);
|
||||||
break;
|
break;
|
||||||
case ICON_HEART_FILLED:
|
case ICON_HEART_FILLED:
|
||||||
p->ccmode = custom;
|
/*
|
||||||
picoLCD_set_char(drvthis, 7, heart_filled);
|
* Set heartbeat icons in custom character 0
|
||||||
picoLCD_chr(drvthis, x, y, 7);
|
* but address character 8. The 'HD44780' can
|
||||||
|
* address CC by char 0-7 and 8-15. As CC 0
|
||||||
|
* cannot be used due to the string handling
|
||||||
|
* in flush use CC 8 here.
|
||||||
|
*/
|
||||||
|
picoLCD_set_char(drvthis, 0, heart_filled);
|
||||||
|
picoLCD_chr(drvthis, x, y, 8);
|
||||||
break;
|
break;
|
||||||
case ICON_HEART_OPEN:
|
case ICON_HEART_OPEN:
|
||||||
p->ccmode = custom;
|
/* Same procedure as above */
|
||||||
picoLCD_set_char(drvthis, 7, heart_open);
|
picoLCD_set_char(drvthis, 0, heart_open);
|
||||||
picoLCD_chr(drvthis, x, y, 7);
|
picoLCD_chr(drvthis, x, y, 8);
|
||||||
break;
|
break;
|
||||||
case ICON_ARROW_LEFT:
|
case ICON_ARROW_LEFT:
|
||||||
picoLCD_chr(drvthis, x, y, 127);
|
picoLCD_chr(drvthis, x, y, 127);
|
||||||
@@ -679,7 +698,6 @@ MODULE_EXPORT int picoLCD_icon (Driver *drvthis, int x, int y, int icon)
|
|||||||
case ICON_ARROW_RIGHT:
|
case ICON_ARROW_RIGHT:
|
||||||
picoLCD_chr(drvthis, x, y, 126);
|
picoLCD_chr(drvthis, x, y, 126);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -1; /* Let the core do other icons */
|
return -1; /* Let the core do other icons */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user