0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-29 14:51:26 +03:00

Added small bold font option

This commit is contained in:
OneOfEleven 2023-09-24 01:36:43 +01:00
parent 8b44428ea5
commit b2015430ea
11 changed files with 282 additions and 137 deletions

View File

@ -12,6 +12,7 @@ ENABLE_NOAA := 0
ENABLE_VOICE := 0 ENABLE_VOICE := 0
ENABLE_ALARM := 0 ENABLE_ALARM := 0
ENABLE_BIG_FREQ := 0 ENABLE_BIG_FREQ := 0
ENABLE_SMALL_BOLD := 1
ENABLE_KEEP_MEM_NAME := 1 ENABLE_KEEP_MEM_NAME := 1
ENABLE_WIDE_RX := 1 ENABLE_WIDE_RX := 1
ENABLE_TX_WHEN_AM := 0 ENABLE_TX_WHEN_AM := 0
@ -165,6 +166,9 @@ endif
ifeq ($(ENABLE_BIG_FREQ),1) ifeq ($(ENABLE_BIG_FREQ),1)
CFLAGS += -DENABLE_BIG_FREQ CFLAGS += -DENABLE_BIG_FREQ
endif endif
ifeq ($(ENABLE_SMALL_BOLD),1)
CFLAGS += -DENABLE_SMALL_BOLD
endif
ifeq ($(ENABLE_NOAA),1) ifeq ($(ENABLE_NOAA),1)
CFLAGS += -DENABLE_NOAA CFLAGS += -DENABLE_NOAA
endif endif

View File

@ -21,6 +21,7 @@ ENABLE_NOAA := 0 Everything NOAA
ENABLE_VOICE := 0 want to hear voices ? ENABLE_VOICE := 0 want to hear voices ?
ENABLE_ALARM := 0 TX alarms ENABLE_ALARM := 0 TX alarms
ENABLE_BIG_FREQ := 0 big font frequencies ENABLE_BIG_FREQ := 0 big font frequencies
ENABLE_SMALL_BOLD := 1 bold channel name/no. (name + freq channel display mode)
ENABLE_KEEP_MEM_NAME := 1 maintain channel name when (re)saving memory channel ENABLE_KEEP_MEM_NAME := 1 maintain channel name when (re)saving memory channel
ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though frontend not tuned over full range) ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though frontend not tuned over full range)
ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM

View File

@ -1,4 +1,20 @@
/* Copyright 2023 OneOfEleven
* https://github.com/DualTachyon
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string.h> #include <string.h>
#include "app/generic.h" #include "app/generic.h"

View File

@ -1,4 +1,20 @@
/* Copyright 2023 OneOfEleven
* https://github.com/DualTachyon
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef AM_FIXH #ifndef AM_FIXH
#include <stdint.h> #include <stdint.h>

View File

@ -175,33 +175,6 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
} }
gRequestSaveVFO = true; gRequestSaveVFO = true;
gVfoConfigureMode = VFO_CONFIGURE_RELOAD; gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
#else
#if 0
// toggle wide/narrow
// TODO: FIX ME .. not working for VFO, works for channel
switch (gTxVfo->CHANNEL_BANDWIDTH)
{
case BANDWIDTH_WIDE:
gTxVfo->CHANNEL_BANDWIDTH = BANDWIDTH_NARROW;
break;
default:
case BANDWIDTH_NARROW:
gTxVfo->CHANNEL_BANDWIDTH = BANDWIDTH_WIDE;
break;
}
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE))
{
gRequestSaveChannel = 2;
}
else
//if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE))
{
gRequestSaveVFO = true;
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
}
BK4819_SetFilterBandwidth(gTxVfo->CHANNEL_BANDWIDTH, );
gUpdateDisplay = true;
gRequestDisplayScreen = gScreenToDisplay;
#else #else
// toggle scanlist-1 // toggle scanlist-1
if (gScreenToDisplay != DISPLAY_SCANNER) if (gScreenToDisplay != DISPLAY_SCANNER)
@ -212,7 +185,6 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
gFlagResetVfos = true; gFlagResetVfos = true;
} }
#endif #endif
#endif
break; break;
case KEY_6: case KEY_6:

291
font.c
View File

@ -167,99 +167,200 @@ const uint8_t gFontSmallDigits[11][7] =
*/ */
const uint8_t gFontSmall[95][7] = const uint8_t gFontSmall[95][7] =
{ {
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ' ' {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ' '
{0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00}, // '!' {0x00, 0x00, 0x5E, 0x00, 0x00, 0x00}, // '!'
{0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00}, // '"' {0x00, 0x06, 0x00, 0x06, 0x00, 0x00}, // '"'
{0x00, 0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00}, // '#' {0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00}, // '#'
{0x00, 0x26, 0x49, 0x7F, 0x49, 0x32, 0x00}, // '$' {0x26, 0x49, 0x7F, 0x49, 0x32, 0x00}, // '$'
{0x00, 0x63, 0x13, 0x08, 0x04, 0x62, 0x61}, // '%' {0x63, 0x13, 0x08, 0x04, 0x62, 0x61}, // '%'
{0x00, 0x30, 0x4B, 0x4D, 0x55, 0x22, 0x50}, // '&' {0x30, 0x4B, 0x4D, 0x55, 0x22, 0x50}, // '&'
{0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00}, // ''' {0x00, 0x00, 0x07, 0x07, 0x00, 0x00}, // '''
{0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00}, // '(' {0x00, 0x1C, 0x22, 0x41, 0x00, 0x00}, // '('
{0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00}, // ')' {0x00, 0x41, 0x22, 0x1C, 0x00, 0x00}, // ')'
{0x00, 0x00, 0x2A, 0x1C, 0x1C, 0x2A, 0x00}, // '*' {0x00, 0x2A, 0x1C, 0x1C, 0x2A, 0x00}, // '*'
{0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00}, // '+' {0x08, 0x08, 0x3E, 0x08, 0x08, 0x00}, // '+'
{0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x00}, // ',' {0x00, 0x40, 0x60, 0x20, 0x00, 0x00}, // ','
{0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x00}, // '-' {0x00, 0x08, 0x08, 0x08, 0x08, 0x00}, // '-'
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00}, // '.' {0x00, 0x00, 0x60, 0x60, 0x00, 0x00}, // '.'
{0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02}, // '/' {0x40, 0x20, 0x10, 0x08, 0x04, 0x02}, // '/'
{0x00, 0x3E, 0x41, 0x41, 0x41, 0x41, 0x3E}, // '0' {0x3E, 0x41, 0x41, 0x41, 0x41, 0x3E}, // '0'
{0x00, 0x00, 0x40, 0x42, 0x7F, 0x40, 0x40}, // '1' {0x00, 0x40, 0x42, 0x7F, 0x40, 0x40}, // '1'
{0x00, 0x62, 0x51, 0x51, 0x49, 0x49, 0x46}, // '2' {0x62, 0x51, 0x51, 0x49, 0x49, 0x46}, // '2'
{0x00, 0x22, 0x41, 0x49, 0x49, 0x49, 0x36}, // '3' {0x22, 0x41, 0x49, 0x49, 0x49, 0x36}, // '3'
{0x00, 0x18, 0x14, 0x12, 0x11, 0x7F, 0x10}, // '4' {0x18, 0x14, 0x12, 0x11, 0x7F, 0x10}, // '4'
{0x00, 0x27, 0x45, 0x45, 0x45, 0x45, 0x39}, // '5' {0x27, 0x45, 0x45, 0x45, 0x45, 0x39}, // '5'
{0x00, 0x3E, 0x49, 0x49, 0x49, 0x49, 0x32}, // '6' {0x3E, 0x49, 0x49, 0x49, 0x49, 0x32}, // '6'
{0x00, 0x01, 0x01, 0x71, 0x09, 0x05, 0x03}, // '7' {0x01, 0x01, 0x71, 0x09, 0x05, 0x03}, // '7'
{0x00, 0x36, 0x49, 0x49, 0x49, 0x49, 0x36}, // '8' {0x36, 0x49, 0x49, 0x49, 0x49, 0x36}, // '8'
{0x00, 0x46, 0x49, 0x49, 0x49, 0x29, 0x1E}, // '9' {0x46, 0x49, 0x49, 0x49, 0x29, 0x1E}, // '9'
{0x00, 0x00, 0x00, 0x6C, 0x6C, 0x00, 0x00}, // ':' {0x00, 0x00, 0x6C, 0x6C, 0x00, 0x00}, // ':'
{0x00, 0x00, 0x40, 0x6C, 0x2C, 0x00, 0x00}, // ';' {0x00, 0x40, 0x6C, 0x2C, 0x00, 0x00}, // ';'
{0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00}, // '<' {0x08, 0x14, 0x22, 0x41, 0x00, 0x00}, // '<'
{0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00}, // '=' {0x14, 0x14, 0x14, 0x14, 0x14, 0x00}, // '='
{0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00}, // '>' {0x00, 0x41, 0x22, 0x14, 0x08, 0x00}, // '>'
{0x00, 0x02, 0x01, 0x51, 0x09, 0x06, 0x00}, // '?' {0x02, 0x01, 0x51, 0x09, 0x06, 0x00}, // '?'
{0x00, 0x30, 0x4A, 0x4A, 0x52, 0x3C, 0x00}, // '@' {0x30, 0x4A, 0x4A, 0x52, 0x3C, 0x00}, // '@'
{0x00, 0x7E, 0x09, 0x09, 0x09, 0x09, 0x7E}, // 'A' {0x7E, 0x09, 0x09, 0x09, 0x09, 0x7E}, // 'A'
{0x00, 0x7F, 0x49, 0x49, 0x49, 0x49, 0x36}, // 'B' {0x7F, 0x49, 0x49, 0x49, 0x49, 0x36}, // 'B'
{0x00, 0x3E, 0x41, 0x41, 0x41, 0x41, 0x22}, // 'C' {0x3E, 0x41, 0x41, 0x41, 0x41, 0x22}, // 'C'
{0x00, 0x7F, 0x41, 0x41, 0x41, 0x41, 0x3E}, // 'D' {0x7F, 0x41, 0x41, 0x41, 0x41, 0x3E}, // 'D'
{0x00, 0x7F, 0x49, 0x49, 0x49, 0x49, 0x41}, // 'E' {0x7F, 0x49, 0x49, 0x49, 0x49, 0x41}, // 'E'
{0x00, 0x7F, 0x09, 0x09, 0x09, 0x09, 0x01}, // 'F' {0x7F, 0x09, 0x09, 0x09, 0x09, 0x01}, // 'F'
{0x00, 0x3E, 0x41, 0x49, 0x49, 0x49, 0x3A}, // 'G' {0x3E, 0x41, 0x49, 0x49, 0x49, 0x3A}, // 'G'
{0x00, 0x7F, 0x08, 0x08, 0x08, 0x08, 0x7F}, // 'H' {0x7F, 0x08, 0x08, 0x08, 0x08, 0x7F}, // 'H'
{0x00, 0x41, 0x41, 0x7F, 0x41, 0x41, 0x00}, // 'I' {0x41, 0x41, 0x7F, 0x41, 0x41, 0x00}, // 'I'
{0x00, 0x20, 0x41, 0x41, 0x3F, 0x01, 0x01}, // 'J' {0x20, 0x41, 0x41, 0x3F, 0x01, 0x01}, // 'J'
{0x00, 0x7F, 0x08, 0x0C, 0x12, 0x21, 0x40}, // 'K' {0x7F, 0x08, 0x0C, 0x12, 0x21, 0x40}, // 'K'
{0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x40}, // 'L' {0x7F, 0x40, 0x40, 0x40, 0x40, 0x40}, // 'L'
{0x00, 0x7F, 0x02, 0x04, 0x04, 0x02, 0x7F}, // 'M' {0x7F, 0x02, 0x04, 0x04, 0x02, 0x7F}, // 'M'
{0x00, 0x7F, 0x02, 0x04, 0x08, 0x10, 0x7F}, // 'N' {0x7F, 0x02, 0x04, 0x08, 0x10, 0x7F}, // 'N'
{0x00, 0x3E, 0x41, 0x41, 0x41, 0x41, 0x3E}, // 'O' {0x3E, 0x41, 0x41, 0x41, 0x41, 0x3E}, // 'O'
{0x00, 0x7F, 0x09, 0x09, 0x09, 0x09, 0x06}, // 'P' {0x7F, 0x09, 0x09, 0x09, 0x09, 0x06}, // 'P'
{0x00, 0x3E, 0x41, 0x51, 0x61, 0x41, 0x3E}, // 'Q' {0x3E, 0x41, 0x51, 0x61, 0x41, 0x3E}, // 'Q'
{0x00, 0x7F, 0x09, 0x09, 0x19, 0x29, 0x46}, // 'R' {0x7F, 0x09, 0x09, 0x19, 0x29, 0x46}, // 'R'
{0x00, 0x26, 0x49, 0x49, 0x49, 0x49, 0x32}, // 'S' {0x26, 0x49, 0x49, 0x49, 0x49, 0x32}, // 'S'
{0x00, 0x01, 0x01, 0x7F, 0x01, 0x01, 0x00}, // 'T' {0x01, 0x01, 0x7F, 0x01, 0x01, 0x00}, // 'T'
{0x00, 0x3F, 0x40, 0x40, 0x40, 0x40, 0x3F}, // 'U' {0x3F, 0x40, 0x40, 0x40, 0x40, 0x3F}, // 'U'
{0x00, 0x07, 0x38, 0x40, 0x40, 0x38, 0x07}, // 'V' {0x07, 0x38, 0x40, 0x40, 0x38, 0x07}, // 'V'
{0x00, 0x3F, 0x40, 0x30, 0x30, 0x40, 0x3F}, // 'W' {0x3F, 0x40, 0x30, 0x30, 0x40, 0x3F}, // 'W'
{0x00, 0x63, 0x14, 0x08, 0x08, 0x14, 0x63}, // 'X' {0x63, 0x14, 0x08, 0x08, 0x14, 0x63}, // 'X'
{0x00, 0x07, 0x08, 0x70, 0x08, 0x07, 0x00}, // 'Y' {0x07, 0x08, 0x70, 0x08, 0x07, 0x00}, // 'Y'
{0x00, 0x61, 0x51, 0x49, 0x45, 0x43, 0x41}, // 'Z' {0x61, 0x51, 0x49, 0x45, 0x43, 0x41}, // 'Z'
{0x00, 0x00, 0x7F, 0x41, 0x41, 0x00, 0x00}, // '[' {0x00, 0x7F, 0x41, 0x41, 0x00, 0x00}, // '['
{0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x60}, // '"\' {0x01, 0x02, 0x04, 0x08, 0x10, 0x60}, // '"\'
{0x00, 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00}, // ']' {0x00, 0x00, 0x41, 0x41, 0x7F, 0x00}, // ']'
{0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00}, // '^' {0x04, 0x02, 0x01, 0x02, 0x04, 0x00}, // '^'
{0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, // '_' {0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, // '_'
{0x00, 0x00, 0x03, 0x07, 0x06, 0x00, 0x00}, // '`' {0x00, 0x03, 0x07, 0x06, 0x00, 0x00}, // '`'
{0x00, 0x20, 0x54, 0x54, 0x54, 0x78, 0x00}, // 'a' {0x20, 0x54, 0x54, 0x54, 0x78, 0x00}, // 'a'
{0x00, 0x7F, 0x44, 0x44, 0x44, 0x38, 0x00}, // 'b' {0x7F, 0x44, 0x44, 0x44, 0x38, 0x00}, // 'b'
{0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00}, // 'c' {0x38, 0x44, 0x44, 0x44, 0x28, 0x00}, // 'c'
{0x00, 0x38, 0x44, 0x44, 0x44, 0x7F, 0x00}, // 'd' {0x38, 0x44, 0x44, 0x44, 0x7F, 0x00}, // 'd'
{0x00, 0x38, 0x54, 0x54, 0x54, 0x48, 0x00}, // 'e' {0x38, 0x54, 0x54, 0x54, 0x48, 0x00}, // 'e'
{0x00, 0x7C, 0x0A, 0x0A, 0x0A, 0x02, 0x00}, // 'f' {0x7C, 0x0A, 0x0A, 0x0A, 0x02, 0x00}, // 'f'
{0x00, 0x58, 0x54, 0x54, 0x54, 0x3C, 0x00}, // 'g' {0x58, 0x54, 0x54, 0x54, 0x3C, 0x00}, // 'g'
{0x00, 0x7F, 0x04, 0x04, 0x04, 0x78, 0x00}, // 'h' {0x7F, 0x04, 0x04, 0x04, 0x78, 0x00}, // 'h'
{0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00}, // 'i' {0x00, 0x00, 0x7A, 0x00, 0x00, 0x00}, // 'i'
{0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00}, // 'j' {0x20, 0x40, 0x40, 0x3D, 0x00, 0x00}, // 'j'
{0x00, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00}, // 'k' {0x00, 0x7F, 0x10, 0x28, 0x44, 0x00}, // 'k'
{0x00, 0x00, 0x00, 0x3F, 0x40, 0x00, 0x00}, // 'l' {0x00, 0x00, 0x3F, 0x40, 0x00, 0x00}, // 'l'
{0x00, 0x7C, 0x08, 0x10, 0x10, 0x08, 0x7C}, // 'm' {0x7C, 0x08, 0x10, 0x10, 0x08, 0x7C}, // 'm'
{0x00, 0x7C, 0x04, 0x04, 0x04, 0x78, 0x00}, // 'n' {0x7C, 0x04, 0x04, 0x04, 0x78, 0x00}, // 'n'
{0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00}, // 'o' {0x38, 0x44, 0x44, 0x44, 0x38, 0x00}, // 'o'
{0x00, 0x7C, 0x14, 0x14, 0x14, 0x08, 0x00}, // 'p' {0x7C, 0x14, 0x14, 0x14, 0x08, 0x00}, // 'p'
{0x00, 0x08, 0x14, 0x14, 0x14, 0x7C, 0x40}, // 'q' {0x08, 0x14, 0x14, 0x14, 0x7C, 0x40}, // 'q'
{0x00, 0x7C, 0x04, 0x04, 0x04, 0x08, 0x00}, // 'r' {0x7C, 0x04, 0x04, 0x04, 0x08, 0x00}, // 'r'
{0x00, 0x08, 0x54, 0x54, 0x54, 0x20, 0x00}, // 's' {0x08, 0x54, 0x54, 0x54, 0x20, 0x00}, // 's'
{0x00, 0x3F, 0x44, 0x44, 0x44, 0x40, 0x00}, // 't' {0x3F, 0x44, 0x44, 0x44, 0x40, 0x00}, // 't'
{0x00, 0x3C, 0x40, 0x40, 0x40, 0x3C, 0x00}, // 'u' {0x3C, 0x40, 0x40, 0x40, 0x3C, 0x00}, // 'u'
{0x00, 0x0C, 0x30, 0x40, 0x30, 0x0C, 0x00}, // 'v' {0x0C, 0x30, 0x40, 0x30, 0x0C, 0x00}, // 'v'
{0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00}, // 'w' {0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00}, // 'w'
{0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00}, // 'x' {0x44, 0x28, 0x10, 0x28, 0x44, 0x00}, // 'x'
{0x00, 0x0C, 0x50, 0x50, 0x50, 0x3C, 0x00}, // 'y' {0x0C, 0x50, 0x50, 0x50, 0x3C, 0x00}, // 'y'
{0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00}, // 'z' {0x44, 0x64, 0x54, 0x4C, 0x44, 0x00}, // 'z'
{0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00}, // '{' {0x08, 0x36, 0x41, 0x00, 0x00, 0x00}, // '{'
{0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00}, // '|' {0x00, 0x00, 0x7F, 0x00, 0x00, 0x00}, // '|'
{0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00}, // '}' {0x00, 0x00, 0x41, 0x36, 0x08, 0x00}, // '}'
{0x00, 0x04, 0x02, 0x04, 0x08, 0x04, 0x00} // '->' {0x04, 0x02, 0x04, 0x08, 0x04, 0x00} // '->'
}; };
#ifdef ENABLE_SMALL_BOLD
const uint8_t gFontSmallBold[95][7] =
{
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x5E, 0x5E, 0x00, 0x00},
{0x06, 0x06, 0x00, 0x06, 0x06, 0x00},
{0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00},
{0x2E, 0x6B, 0x7F, 0x6B, 0x3A, 0x00},
{0x63, 0x33, 0x18, 0x0C, 0x66, 0x63},
{0x30, 0x4B, 0x4D, 0x55, 0x22, 0x50},
{0x00, 0x00, 0x07, 0x07, 0x00, 0x00},
{0x00, 0x1C, 0x3E, 0x63, 0x41, 0x00},
{0x00, 0x41, 0x63, 0x3E, 0x1C, 0x00},
{0x00, 0x2A, 0x1C, 0x1C, 0x2A, 0x00},
{0x18, 0x18, 0x7E, 0x7E, 0x18, 0x18},
{0x00, 0x40, 0x60, 0x20, 0x00, 0x00},
{0x00, 0x18, 0x18, 0x18, 0x18, 0x00},
{0x00, 0x00, 0x60, 0x60, 0x00, 0x00},
{0x60, 0x30, 0x18, 0x0C, 0x06, 0x03},
{0x3E, 0x7F, 0x63, 0x63, 0x7F, 0x3E},
{0x64, 0x66, 0x7F, 0x7F, 0x60, 0x60},
{0x62, 0x73, 0x7B, 0x7B, 0x6F, 0x66},
{0x63, 0x63, 0x6B, 0x6B, 0x7F, 0x36},
{0x38, 0x3C, 0x36, 0x7F, 0x7F, 0x30},
{0x6F, 0x6F, 0x6B, 0x6B, 0x7B, 0x33},
{0x3E, 0x7F, 0x6B, 0x6B, 0x7B, 0x32},
{0x03, 0x03, 0x73, 0x7B, 0x0F, 0x07},
{0x36, 0x7F, 0x6B, 0x6B, 0x7F, 0x36},
{0x06, 0x6F, 0x6B, 0x6B, 0x7F, 0x3E},
{0x00, 0x00, 0x6C, 0x6C, 0x00, 0x00},
{0x00, 0x40, 0x6C, 0x2C, 0x00, 0x00},
{0x08, 0x14, 0x22, 0x41, 0x00, 0x00},
{0x36, 0x36, 0x36, 0x36, 0x36, 0x00},
{0x00, 0x41, 0x22, 0x14, 0x08, 0x00},
{0x06, 0x07, 0x53, 0x5B, 0x1F, 0x0E},
{0x30, 0x7B, 0x6B, 0x7B, 0x7F, 0x3E},
{0x7E, 0x7F, 0x1B, 0x1B, 0x7F, 0x7E},
{0x7F, 0x7F, 0x6B, 0x6B, 0x7F, 0x36},
{0x3E, 0x7F, 0x63, 0x63, 0x63, 0x36},
{0x7F, 0x7F, 0x63, 0x63, 0x7F, 0x3E},
{0x7F, 0x7F, 0x6B, 0x6B, 0x6B, 0x63},
{0x7F, 0x7F, 0x1B, 0x1B, 0x1B, 0x03},
{0x3E, 0x7F, 0x63, 0x6B, 0x7B, 0x3A},
{0x7F, 0x7F, 0x0C, 0x0C, 0x7F, 0x7F},
{0x63, 0x63, 0x7F, 0x7F, 0x63, 0x63},
{0x30, 0x73, 0x63, 0x7F, 0x3F, 0x03},
{0x7F, 0x7F, 0x1C, 0x36, 0x63, 0x41},
{0x7F, 0x7F, 0x60, 0x60, 0x60, 0x60},
{0x7F, 0x7F, 0x06, 0x06, 0x7F, 0x7F},
{0x7F, 0x7F, 0x0C, 0x18, 0x7F, 0x7F},
{0x3E, 0x7F, 0x63, 0x63, 0x7F, 0x3E},
{0x7F, 0x7F, 0x1B, 0x1B, 0x1F, 0x0E},
{0x3E, 0x7F, 0x63, 0x73, 0x7F, 0x7E},
{0x7F, 0x7F, 0x1B, 0x3B, 0x7F, 0x66},
{0x66, 0x6F, 0x6B, 0x6B, 0x7B, 0x33},
{0x03, 0x03, 0x7F, 0x7F, 0x03, 0x03},
{0x3F, 0x7F, 0x60, 0x60, 0x7F, 0x3F},
{0x1F, 0x3F, 0x60, 0x60, 0x3F, 0x1F},
{0x3F, 0x7F, 0x30, 0x30, 0x7F, 0x3F},
{0x63, 0x77, 0x1C, 0x1C, 0x77, 0x63},
{0x07, 0x0F, 0x78, 0x78, 0x0F, 0x07},
{0x63, 0x73, 0x7B, 0x6F, 0x67, 0x63},
{0x00, 0x7F, 0x7F, 0x63, 0x63, 0x00},
{0x01, 0x02, 0x04, 0x08, 0x10, 0x60},
{0x00, 0x63, 0x63, 0x7F, 0x7F, 0x00},
{0x0C, 0x0E, 0x03, 0x03, 0x0E, 0x0C},
{0x60, 0x60, 0x60, 0x60, 0x60, 0x60},
{0x00, 0x03, 0x07, 0x06, 0x00, 0x00},
{0x20, 0x76, 0x56, 0x56, 0x7E, 0x3C},
{0x7F, 0x7F, 0x6C, 0x6C, 0x7C, 0x38},
{0x3C, 0x7E, 0x66, 0x66, 0x66, 0x24},
{0x38, 0x7C, 0x6C, 0x6C, 0x7F, 0x7F},
{0x3C, 0x7E, 0x56, 0x56, 0x5E, 0x0C},
{0x7C, 0x7E, 0x36, 0x36, 0x06, 0x00},
{0x0C, 0x5E, 0x56, 0x56, 0x7E, 0x3C},
{0x7F, 0x7F, 0x0C, 0x0C, 0x7C, 0x78},
{0x00, 0x00, 0x7A, 0x7A, 0x00, 0x00},
{0x30, 0x60, 0x60, 0x7D, 0x3D, 0x00},
{0x7F, 0x7F, 0x18, 0x3C, 0x7E, 0x66},
{0x00, 0x3F, 0x7F, 0x40, 0x00, 0x00},
{0x7C, 0x7C, 0x18, 0x18, 0x7C, 0x7C},
{0x7C, 0x7C, 0x0C, 0x0C, 0x7C, 0x78},
{0x3C, 0x7E, 0x66, 0x66, 0x7E, 0x3C},
{0x7E, 0x7E, 0x36, 0x36, 0x3E, 0x1C},
{0x1C, 0x3E, 0x36, 0x3E, 0x7E, 0x40},
{0x7C, 0x7C, 0x0C, 0x0C, 0x18, 0x00},
{0x4C, 0x5E, 0x56, 0x56, 0x76, 0x20},
{0x3F, 0x7F, 0x6C, 0x6C, 0x60, 0x00},
{0x3C, 0x7C, 0x60, 0x60, 0x7C, 0x3C},
{0x0C, 0x3C, 0x70, 0x70, 0x3C, 0x0C},
{0x3C, 0x7C, 0x30, 0x30, 0x7C, 0x3C},
{0x44, 0x6C, 0x38, 0x38, 0x6C, 0x44},
{0x06, 0x6E, 0x6C, 0x6C, 0x7E, 0x3E},
{0x66, 0x76, 0x7E, 0x6E, 0x66, 0x00},
{0x08, 0x3E, 0x77, 0x41, 0x00, 0x00},
{0x00, 0x00, 0x7F, 0x00, 0x00, 0x00},
{0x00, 0x41, 0x77, 0x3E, 0x08, 0x00},
{0x0C, 0x06, 0x0C, 0x18, 0x0C, 0x00},
};
#endif

3
font.h
View File

@ -24,6 +24,9 @@ extern const uint8_t gFontBig[95][15];
extern const uint8_t gFontBigDigits[11][26]; extern const uint8_t gFontBigDigits[11][26];
//extern const uint8_t gFontSmallDigits[11][7]; //extern const uint8_t gFontSmallDigits[11][7];
extern const uint8_t gFontSmall[95][7]; extern const uint8_t gFontSmall[95][7];
#ifdef ENABLE_SMALL_BOLD
extern const uint8_t gFontSmallBold[95][7];
#endif
#endif #endif

View File

@ -91,7 +91,7 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
Start += (((End - Start) - (Length * 8)) + 1) / 2; Start += (((End - Start) - (Length * 8)) + 1) / 2;
const unsigned int char_width = ARRAY_SIZE(gFontSmall[0]); const unsigned int char_width = ARRAY_SIZE(gFontSmall[0]);
const unsigned int char_spacing = char_width + 0; const unsigned int char_spacing = char_width + 1;
uint8_t *pFb = gFrameBuffer[Line] + Start; uint8_t *pFb = gFrameBuffer[Line] + Start;
for (i = 0; i < Length; i++) for (i = 0; i < Length; i++)
{ {
@ -99,23 +99,47 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
{ {
const unsigned int index = (unsigned int)pString[i] - 32; const unsigned int index = (unsigned int)pString[i] - 32;
if (index < ARRAY_SIZE(gFontSmall)) if (index < ARRAY_SIZE(gFontSmall))
memmove(pFb + (i * char_spacing), &gFontSmall[index], char_width); memmove(pFb + (i * char_spacing) + 1, &gFontSmall[index], char_width);
} }
} }
} }
#ifdef ENABLE_SMALL_BOLD
void UI_PrintStringSmallBold(const char *pString, uint8_t Start, uint8_t End, uint8_t Line)
{
const size_t Length = strlen(pString);
size_t i;
if (End > Start)
Start += (((End - Start) - (Length * 8)) + 1) / 2;
const unsigned int char_width = ARRAY_SIZE(gFontSmallBold[0]);
const unsigned int char_spacing = char_width + 1;
uint8_t *pFb = gFrameBuffer[Line] + Start;
for (i = 0; i < Length; i++)
{
if (pString[i] >= 32)
{
const unsigned int index = (unsigned int)pString[i] - 32;
if (index < ARRAY_SIZE(gFontSmallBold))
memmove(pFb + (i * char_spacing) + 1, &gFontSmallBold[index], char_width);
}
}
}
#endif
void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer) void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer)
{ {
size_t i; size_t i;
const unsigned int char_width = ARRAY_SIZE(gFontSmall[0]); const unsigned int char_width = ARRAY_SIZE(gFontSmall[0]);
const unsigned int char_spacing = char_width + 0; const unsigned int char_spacing = char_width + 1;
for (i = 0; i < strlen(pString); i++) for (i = 0; i < strlen(pString); i++)
{ {
if (pString[i] >= 32) if (pString[i] >= 32)
{ {
const unsigned int index = (unsigned int)pString[i] - 32; const unsigned int index = (unsigned int)pString[i] - 32;
if (index < ARRAY_SIZE(gFontSmall)) if (index < ARRAY_SIZE(gFontSmall))
memmove(buffer + (i * char_spacing), &gFontSmall[index], char_width); memmove(buffer + (i * char_spacing) + 1, &gFontSmall[index], char_width);
} }
} }
} }

View File

@ -24,6 +24,9 @@ void UI_GenerateChannelString(char *pString, const uint8_t Channel);
void UI_GenerateChannelStringEx(char *pString, const bool bShowPrefix, const uint8_t ChannelNumber); void UI_GenerateChannelStringEx(char *pString, const bool bShowPrefix, const uint8_t ChannelNumber);
void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Line, uint8_t Width); void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Line, uint8_t Width);
void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_t Line); void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_t Line);
#ifdef ENABLE_SMALL_BOLD
void UI_PrintStringSmallBold(const char *pString, uint8_t Start, uint8_t End, uint8_t Line);
#endif
void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer); void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer);
void UI_DisplayFrequency(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero, bool bFlag); void UI_DisplayFrequency(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero, bool bFlag);
void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero); void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero);

View File

@ -340,7 +340,12 @@ void UI_DisplayMain(void)
} }
else else
{ {
#ifdef ENABLE_SMALL_BOLD
UI_PrintStringSmallBold(String, 32 + 4, 0, Line);
#else
UI_PrintStringSmall(String, 32 + 4, 0, Line); UI_PrintStringSmall(String, 32 + 4, 0, Line);
#endif
// show the channel frequency below the channel number/name // show the channel frequency below the channel number/name
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000); sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
UI_PrintStringSmall(String, 32 + 4, 0, Line + 1); UI_PrintStringSmall(String, 32 + 4, 0, Line + 1);

View File

@ -2,7 +2,7 @@
#ifdef GIT_HASH #ifdef GIT_HASH
#define VER GIT_HASH #define VER GIT_HASH
#else #else
#define VER "230923" #define VER "230924"
#endif #endif
const char Version[] = "OEFW-"VER; const char Version[] = "OEFW-"VER;