| Line 66... |
Line 66... |
| 66 |
ui->blendcolor(1, 4, 0xffffcccc, framebuf, 28, 6, 320, framebuf, 28, 6, 320);
|
66 |
ui->blendcolor(1, 4, 0xffffcccc, framebuf, 28, 6, 320, framebuf, 28, 6, 320);
|
| 67 |
unsigned int batt_level = 22 * read_battery_mwh_current(0) / read_battery_mwh_full(0);
|
67 |
unsigned int batt_level = 22 * read_battery_mwh_current(0) / read_battery_mwh_full(0);
|
| 68 |
// remaining battery level
|
68 |
// remaining battery level
|
| 69 |
ui->blendcolor(batt_level, 6, 0xc0ffcccc, framebuf, 5, 5, 320, framebuf, 5, 5, 320);
|
69 |
ui->blendcolor(batt_level, 6, 0xc0ffcccc, framebuf, 5, 5, 320, framebuf, 5, 5, 320);
|
| 70 |
// background of the rest space
|
70 |
// background of the rest space
|
| 71 |
ui->blendcolor(22 - batt_level, 6, 0x40000000, framebuf, 5 + batt_level, 5, 320, framebuf, 5 + batt_level, 5, 320);
|
71 |
ui->blendcolor(22 - batt_level, 6, 0x40000000, framebuf, 5 + batt_level,
|
| - |
|
72 |
5, 320, framebuf, 5 + batt_level, 5, 320);
|
| 72 |
return false;
|
73 |
return false;
|
| 73 |
}
|
74 |
}
|
| 74 |
|
75 |
|
| 75 |
void message(int x, const char* line1, const char* line2)
|
76 |
void message(int x, const char* line1, const char* line2)
|
| 76 |
{
|
77 |
{
|