From 6403363d8f803aae5a047a921fdd57df23a96bae Mon Sep 17 00:00:00 2001 From: Vincent-FK Date: Wed, 19 Feb 2020 08:35:59 +0100 Subject: [PATCH] patch modif low bat icon --- .../patches/linux/0003-add-funkey-dts.patch | 6 +- .../linux/0023_modif_low_bat_logo.patch | 75 +++++++++++++++++++ funkey-gpio-mapping | 1 - funkey_retrofe | 1 - funkey_retrofe_layout_240x240 | 1 - funkey_sdl1.2 | 1 - 6 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 FunKey/board/funkey/patches/linux/0023_modif_low_bat_logo.patch delete mode 160000 funkey-gpio-mapping delete mode 160000 funkey_retrofe delete mode 160000 funkey_retrofe_layout_240x240 delete mode 160000 funkey_sdl1.2 diff --git a/FunKey/board/funkey/patches/linux/0003-add-funkey-dts.patch b/FunKey/board/funkey/patches/linux/0003-add-funkey-dts.patch index 4260a37..097e676 100644 --- a/FunKey/board/funkey/patches/linux/0003-add-funkey-dts.patch +++ b/FunKey/board/funkey/patches/linux/0003-add-funkey-dts.patch @@ -61,9 +61,9 @@ + + backlight: backlight { + compatible = "pwm-backlight"; -+ pwms = <&pwm 0 1000000 1>; -+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; -+ default-brightness-level = <10>; ++ pwms = <&pwm 0 100000 1>; ++ brightness-levels = <0 1 2 3 8 14 21 32 46 60 80 100>; //2.2 div factor ++ default-brightness-level = <11>; + power-supply = <®_vcc5v0>; + }; +}; diff --git a/FunKey/board/funkey/patches/linux/0023_modif_low_bat_logo.patch b/FunKey/board/funkey/patches/linux/0023_modif_low_bat_logo.patch new file mode 100644 index 0000000..11c637e --- /dev/null +++ b/FunKey/board/funkey/patches/linux/0023_modif_low_bat_logo.patch @@ -0,0 +1,75 @@ +From 2505384b62b599da8cf234a14bdbab54f603083b Mon Sep 17 00:00:00 2001 +From: vincent +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,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 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, 1, 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, 1, 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.9.1 + diff --git a/funkey-gpio-mapping b/funkey-gpio-mapping deleted file mode 160000 index 1a98c23..0000000 --- a/funkey-gpio-mapping +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1a98c232196152495abab56646844a304c17e486 diff --git a/funkey_retrofe b/funkey_retrofe deleted file mode 160000 index 0961a03..0000000 --- a/funkey_retrofe +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0961a03bf242f5107106a94307a31f93fd10b029 diff --git a/funkey_retrofe_layout_240x240 b/funkey_retrofe_layout_240x240 deleted file mode 160000 index f29381a..0000000 --- a/funkey_retrofe_layout_240x240 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f29381aafcc9e75ac169acef9ad2d490aa2375a4 diff --git a/funkey_sdl1.2 b/funkey_sdl1.2 deleted file mode 160000 index aa4bf96..0000000 --- a/funkey_sdl1.2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aa4bf96c505a9534cc422bc5e17c2ca2f41d6710