Add charging icon
This commit is contained in:
@@ -1,22 +1,30 @@
|
||||
#include "gfx.h"
|
||||
#include "gfxutils.h"
|
||||
#include <power/max17050.h>
|
||||
#include <power/max17050.h>
|
||||
#include <power/bq24193.h>
|
||||
#include "../hid/hid.h"
|
||||
|
||||
void gfx_clearscreen(){
|
||||
void gfx_printTopInfo() {
|
||||
int battery = 0;
|
||||
max17050_get_property(MAX17050_RepSOC, &battery);
|
||||
|
||||
//gfx_clear_grey(0x1B);
|
||||
gfx_boxGrey(0, 16, 1279, 703, 0x1b);
|
||||
int current_charge_status = 0;
|
||||
bq24193_get_property(BQ24193_ChargeStatus, ¤t_charge_status);
|
||||
SETCOLOR(COLOR_DEFAULT, COLOR_WHITE);
|
||||
gfx_con_setpos(0, 0);
|
||||
gfx_printf("Tegraexplorer %d.%d.%d | Battery: %d%% %c\n", LP_VER_MJ, LP_VER_MN, LP_VER_BF, battery >> 8, ((current_charge_status) ? 129 : 32));
|
||||
RESETCOLOR;
|
||||
}
|
||||
|
||||
void gfx_clearscreen(){
|
||||
gfx_boxGrey(0, 16, 1279, 703, 0x1b);
|
||||
|
||||
gfx_boxGrey(0, 703, 1279, 719, 0xFF);
|
||||
gfx_boxGrey(0, 0, 1279, 15, 0xFF);
|
||||
gfx_con_setpos(0, 0);
|
||||
gfx_printf("Tegraexplorer %d.%d.%d | Battery: %3d%%\n", LP_VER_MJ, LP_VER_MN, LP_VER_BF, battery >> 8);
|
||||
|
||||
RESETCOLOR;
|
||||
|
||||
gfx_printTopInfo();
|
||||
}
|
||||
|
||||
MenuEntry_t YesNoEntries[] = {
|
||||
|
||||
Reference in New Issue
Block a user