0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-27 13:51:25 +03:00

top status bar clean up

This commit is contained in:
OneOfEleven 2023-12-10 13:33:46 +00:00
parent d1aa8d50cb
commit 0dd0e79298
5 changed files with 14 additions and 40 deletions

View File

@ -28,7 +28,7 @@ const uint8_t BITMAP_POWERSAVE[8] =
__extension__ 0b00110001
#endif
};
/*
const uint8_t BITMAP_TX[8] =
{ // "TX"
__extension__ 0b00000000,
@ -46,13 +46,13 @@ const uint8_t BITMAP_RX[8] =
__extension__ 0b00000000,
__extension__ 0b01111111,
__extension__ 0b00001001,
__extension__ 0b00001001,
__extension__ 0b00011001,
__extension__ 0b01100110,
__extension__ 0b00000000,
__extension__ 0b00000000,
__extension__ 0b00000000
};
*/
#ifndef ENABLE_REVERSE_BAT_SYMBOL
// Quansheng way (+ pole to the left)
const uint8_t BITMAP_BATTERY_LEVEL[17] =

View File

@ -5,8 +5,8 @@
#include <stdint.h>
extern const uint8_t BITMAP_POWERSAVE[8];
extern const uint8_t BITMAP_TX[8];
extern const uint8_t BITMAP_RX[8];
//extern const uint8_t BITMAP_TX[8];
//extern const uint8_t BITMAP_RX[8];
extern const uint8_t BITMAP_BATTERY_LEVEL[17];

Binary file not shown.

Binary file not shown.

View File

@ -31,15 +31,7 @@
#include "ui/helper.h"
#include "ui/ui.h"
#include "ui/status.h"
/*
void invert_pixels(void *p, const unsigned int size)
{
unsigned int i;
uint8_t *p8 = (uint8_t *)p;
for (i = 0; i < size; i++)
*p8++ ^= 0xff;
}
*/
void UI_DisplayStatus(const bool test_display)
{
uint8_t *line = g_status_line;
@ -49,26 +41,17 @@ void UI_DisplayStatus(const bool test_display)
memset(g_status_line, 0, sizeof(g_status_line));
// **************
// POWER-SAVE indicator
if (g_current_function == FUNCTION_TRANSMIT)
{
memcpy(line + x, BITMAP_TX, sizeof(BITMAP_TX));
// invert_pixels(line + x, sizeof(BITMAP_TX));
}
else
if (g_current_function == FUNCTION_RECEIVE ||
g_current_function == FUNCTION_NEW_RECEIVE ||
g_monitor_enabled)
{
memcpy(line + x, BITMAP_RX, sizeof(BITMAP_RX));
}
else
if (g_current_function == FUNCTION_POWER_SAVE || test_display)
{
memcpy(line + x, BITMAP_POWERSAVE, sizeof(BITMAP_POWERSAVE));
}
else
#if 0
if (g_current_function == FUNCTION_TRANSMIT)
memcpy(line + x, BITMAP_TX, sizeof(BITMAP_TX));
else
if (g_current_function == FUNCTION_RECEIVE || g_current_function == FUNCTION_NEW_RECEIVE || g_monitor_enabled)
memcpy(line + x, BITMAP_RX, sizeof(BITMAP_RX));
#endif
x += sizeof(BITMAP_POWERSAVE) + 1;
#ifdef ENABLE_NOAA
@ -155,14 +138,9 @@ void UI_DisplayStatus(const bool test_display)
}
if (dw_running)
{
memcpy(line + x, BITMAP_TDR_RUNNING, sizeof(BITMAP_TDR_RUNNING));
// invert_pixels(line + x, sizeof(BITMAP_TDR_RUNNING));
}
else
{
memcpy(line + x, BITMAP_TDR_HOLDING, sizeof(BITMAP_TDR_HOLDING));
}
x += sizeof(BITMAP_TDR_RUNNING) + 1;
}
@ -196,7 +174,6 @@ void UI_DisplayStatus(const bool test_display)
if (g_eeprom.config.setting.key_lock || test_display)
{
memcpy(line + x, BITMAP_KEYLOCK, sizeof(BITMAP_KEYLOCK));
// invert_pixels(line + x, sizeof(BITMAP_KEYLOCK));
x += sizeof(BITMAP_KEYLOCK) + 1;
}
else
@ -204,7 +181,6 @@ void UI_DisplayStatus(const bool test_display)
if (g_fkey_pressed)
{
memcpy(line + x, BITMAP_F_KEY, sizeof(BITMAP_F_KEY));
// invert_pixels(line + x, sizeof(BITMAP_F_KEY));
x += sizeof(BITMAP_F_KEY);
}
x++;
@ -256,7 +232,5 @@ void UI_DisplayStatus(const bool test_display)
// BATTERY LEVEL indicator
UI_DrawBattery(line + x, g_battery_display_level, g_low_battery_blink);
// **************
ST7565_BlitStatusLine();
}