Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Able to customize welcome image #534

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ENABLE_DTMF_CALLING ?= 1
ENABLE_FLASHLIGHT ?= 1

# ---- CUSTOM MODS ----
ENABLE_WELCOME_IMAGE ?= 0
ENABLE_BIG_FREQ ?= 1
ENABLE_SMALL_BOLD ?= 1
ENABLE_CUSTOM_MENU_LAYOUT ?= 1
Expand Down Expand Up @@ -377,6 +378,9 @@ endif
ifeq ($(ENABLE_CUSTOM_MENU_LAYOUT),1)
CFLAGS += -DENABLE_CUSTOM_MENU_LAYOUT
endif
ifeq ($(ENABLE_WELCOME_IMAGE),1)
CFLAGS += -DENABLE_WELCOME_IMAGE
endif

LDFLAGS =
LDFLAGS += -z noexecstack -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld -Wl,--gc-sections
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ On the other hand, FM RX audio will/should be fine.

But, they are nice toys for the price, fun to play with.

## Customize welcome image

You can set welcome image instead text message or battery voltage something.

1. Open welcome-image.html in web browser and process image to what you like
2. Copy the text in "Buffer" field
3. Replace the value of the variable "all" in ui/welcome.c where the line starts with "uint8_t all[8][128]"



## User customization

You can customize the firmware by enabling/disabling various compile options, this allows
Expand All @@ -96,6 +106,7 @@ You'll find the options at the top of "Makefile" ('0' = disable, '1' = enable) .
| ENABLE_DTMF_CALLING | DTMF calling fuctionality, sending calls, receiving calls, group calls, contacts list etc. |
| ENABLE_FLASHLIGHT | enable top flashlight LED (on, blink, SOS) |
|🧰 **CUSTOM MODS**||
| ENABLE_WELCOME_IMAGE | Customize welcome image (will be blank screen if not build but still select the option) |
| ENABLE_BIG_FREQ | big font frequencies (like original QS firmware) |
| ENABLE_SMALL_BOLD | bold channel name/no. (when name + freq channel display mode) |
| ENABLE_CUSTOM_MENU_LAYOUT | changes how the menu looks like |
Expand Down
1 change: 1 addition & 0 deletions settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ enum POWER_OnDisplayMode_t {
POWER_ON_DISPLAY_MODE_FULL_SCREEN = 0,
POWER_ON_DISPLAY_MODE_MESSAGE,
POWER_ON_DISPLAY_MODE_VOLTAGE,
POWER_ON_DISPLAY_MODE_IMAGE,
POWER_ON_DISPLAY_MODE_NONE
};
typedef enum POWER_OnDisplayMode_t POWER_OnDisplayMode_t;
Expand Down
1 change: 1 addition & 0 deletions ui/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ const char gSubMenu_PONMSG[][8] =
"FULL",
"MESSAGE",
"VOLTAGE",
"IMAGE",
"NONE"
};

Expand Down
2 changes: 1 addition & 1 deletion ui/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ extern const char* const gSubMenu_MDF[4];
extern const char gSubMenu_D_RSP[4][11];
#endif
extern const char* const gSubMenu_PTT_ID[5];
extern const char gSubMenu_PONMSG[4][8];
extern const char gSubMenu_PONMSG[5][8];
extern const char gSubMenu_ROGER[3][6];
extern const char gSubMenu_RESET[2][4];
extern const char* const gSubMenu_F_LOCK[F_LOCK_LEN];
Expand Down
12 changes: 12 additions & 0 deletions ui/welcome.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ void UI_DisplayWelcome(void)
UI_PrintString(WelcomeString1, 0, 127, 2, 10);
UI_PrintStringSmallNormal(Version, 0, 128, 6);

if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_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0xff,0xc6,0xba,0xc6,0xfe,0x82,0xf2,0x83,0xff,0xff,0xff,0xff,0x66,0xa6,0xcc,0xac,0x1c,0x46,0x46,0x1c,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}};
#else
uint8_t all[8][128];
memset(all, 0, sizeof(gStatusLine));
#endif
memcpy(gStatusLine, all[0], 128);
memcpy(gFrameBuffer, all[1], 128 * 7);
}

ST7565_BlitStatusLine(); // blank status line
ST7565_BlitFullScreen();
}
Expand Down
157 changes: 157 additions & 0 deletions welcome-image.html

Large diffs are not rendered by default.