|
|
@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
From 2505384b62b599da8cf234a14bdbab54f603083b Mon Sep 17 00:00:00 2001
|
|
|
|
|
|
|
|
From: vincent <vbusoenseirb@gmail.com>
|
|
|
|
|
|
|
|
Date: Wed, 19 Feb 2020 08:32:46 +0100
|
|
|
|
|
|
|
|
Subject: [PATCH] changed battery logo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
drivers/staging/fbtft/fb_text.c | 47 ++++++++++++++++++-----------------------
|
|
|
|
|
|
|
|
1 file changed, 21 insertions(+), 26 deletions(-)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/drivers/staging/fbtft/fb_text.c b/drivers/staging/fbtft/fb_text.c
|
|
|
|
|
|
|
|
index 650535d..b1ecdd4 100644
|
|
|
|
|
|
|
|
--- a/drivers/staging/fbtft/fb_text.c
|
|
|
|
|
|
|
|
+++ b/drivers/staging/fbtft/fb_text.c
|
|
|
|
|
|
|
|
@@ -4,37 +4,32 @@
|
|
|
|
|
|
|
|
#define MIN(a,b) (((a)<(b))?(a):(b))
|
|
|
|
|
|
|
|
#define MAX(a,b) (((a)>(b))?(a):(b))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-#define LOW_BATTERY_ICON_TOP_LEFT_X 10
|
|
|
|
|
|
|
|
-#define LOW_BATTERY_ICON_TOP_LEFT_Y 10
|
|
|
|
|
|
|
|
-#define LOW_BATTERY_ICON_WIDTH 35
|
|
|
|
|
|
|
|
-#define LOW_BATTERY_ICON_HEIGHT 20
|
|
|
|
|
|
|
|
+#define LOW_BATTERY_ICON_WIDTH 34
|
|
|
|
|
|
|
|
+#define LOW_BATTERY_ICON_HEIGHT 16
|
|
|
|
|
|
|
|
+#define LOW_BATTERY_ICON_TOP_LEFT_X (240-LOW_BATTERY_ICON_WIDTH-5)
|
|
|
|
|
|
|
|
+#define LOW_BATTERY_ICON_TOP_LEFT_Y (13 - LOW_BATTERY_ICON_HEIGHT/2)
|
|
|
|
|
|
|
|
//#define LOW_BATTERY_FORE_COLOR 65535
|
|
|
|
|
|
|
|
#define LOW_BATTERY_FORE_COLOR 0xF800
|
|
|
|
|
|
|
|
#define LOW_BATTERY_BACK_COLOR 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-// Battery icon from: https://github.com/martinohanlon/grrl-bat-monitor
|
|
|
|
|
|
|
|
-static u16 lowBatteryIcon [LOW_BATTERY_ICON_HEIGHT][LOW_BATTERY_ICON_WIDTH] = {
|
|
|
|
|
|
|
|
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
|
|
|
|
|
|
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
|
|
|
|
|
|
- {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0},
|
|
|
|
|
|
|
|
- {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0},
|
|
|
|
|
|
|
|
- {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0},
|
|
|
|
|
|
|
|
- {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,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