mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-27 22:01:26 +03:00
top status bar clean up
This commit is contained in:
parent
d1aa8d50cb
commit
0dd0e79298
@ -28,7 +28,7 @@ const uint8_t BITMAP_POWERSAVE[8] =
|
|||||||
__extension__ 0b00110001
|
__extension__ 0b00110001
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
/*
|
||||||
const uint8_t BITMAP_TX[8] =
|
const uint8_t BITMAP_TX[8] =
|
||||||
{ // "TX"
|
{ // "TX"
|
||||||
__extension__ 0b00000000,
|
__extension__ 0b00000000,
|
||||||
@ -46,13 +46,13 @@ const uint8_t BITMAP_RX[8] =
|
|||||||
__extension__ 0b00000000,
|
__extension__ 0b00000000,
|
||||||
__extension__ 0b01111111,
|
__extension__ 0b01111111,
|
||||||
__extension__ 0b00001001,
|
__extension__ 0b00001001,
|
||||||
|
__extension__ 0b00001001,
|
||||||
__extension__ 0b00011001,
|
__extension__ 0b00011001,
|
||||||
__extension__ 0b01100110,
|
__extension__ 0b01100110,
|
||||||
__extension__ 0b00000000,
|
__extension__ 0b00000000,
|
||||||
__extension__ 0b00000000,
|
|
||||||
__extension__ 0b00000000
|
__extension__ 0b00000000
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
#ifndef ENABLE_REVERSE_BAT_SYMBOL
|
#ifndef ENABLE_REVERSE_BAT_SYMBOL
|
||||||
// Quansheng way (+ pole to the left)
|
// Quansheng way (+ pole to the left)
|
||||||
const uint8_t BITMAP_BATTERY_LEVEL[17] =
|
const uint8_t BITMAP_BATTERY_LEVEL[17] =
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
extern const uint8_t BITMAP_POWERSAVE[8];
|
extern const uint8_t BITMAP_POWERSAVE[8];
|
||||||
extern const uint8_t BITMAP_TX[8];
|
//extern const uint8_t BITMAP_TX[8];
|
||||||
extern const uint8_t BITMAP_RX[8];
|
//extern const uint8_t BITMAP_RX[8];
|
||||||
|
|
||||||
extern const uint8_t BITMAP_BATTERY_LEVEL[17];
|
extern const uint8_t BITMAP_BATTERY_LEVEL[17];
|
||||||
|
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
44
ui/status.c
44
ui/status.c
@ -31,15 +31,7 @@
|
|||||||
#include "ui/helper.h"
|
#include "ui/helper.h"
|
||||||
#include "ui/ui.h"
|
#include "ui/ui.h"
|
||||||
#include "ui/status.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)
|
void UI_DisplayStatus(const bool test_display)
|
||||||
{
|
{
|
||||||
uint8_t *line = g_status_line;
|
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));
|
memset(g_status_line, 0, sizeof(g_status_line));
|
||||||
|
|
||||||
// **************
|
|
||||||
|
|
||||||
// POWER-SAVE indicator
|
// 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)
|
if (g_current_function == FUNCTION_POWER_SAVE || test_display)
|
||||||
{
|
|
||||||
memcpy(line + x, BITMAP_POWERSAVE, sizeof(BITMAP_POWERSAVE));
|
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;
|
x += sizeof(BITMAP_POWERSAVE) + 1;
|
||||||
|
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
@ -155,14 +138,9 @@ void UI_DisplayStatus(const bool test_display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dw_running)
|
if (dw_running)
|
||||||
{
|
|
||||||
memcpy(line + x, BITMAP_TDR_RUNNING, sizeof(BITMAP_TDR_RUNNING));
|
memcpy(line + x, BITMAP_TDR_RUNNING, sizeof(BITMAP_TDR_RUNNING));
|
||||||
// invert_pixels(line + x, sizeof(BITMAP_TDR_RUNNING));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
memcpy(line + x, BITMAP_TDR_HOLDING, sizeof(BITMAP_TDR_HOLDING));
|
memcpy(line + x, BITMAP_TDR_HOLDING, sizeof(BITMAP_TDR_HOLDING));
|
||||||
}
|
|
||||||
x += sizeof(BITMAP_TDR_RUNNING) + 1;
|
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)
|
if (g_eeprom.config.setting.key_lock || test_display)
|
||||||
{
|
{
|
||||||
memcpy(line + x, BITMAP_KEYLOCK, sizeof(BITMAP_KEYLOCK));
|
memcpy(line + x, BITMAP_KEYLOCK, sizeof(BITMAP_KEYLOCK));
|
||||||
// invert_pixels(line + x, sizeof(BITMAP_KEYLOCK));
|
|
||||||
x += sizeof(BITMAP_KEYLOCK) + 1;
|
x += sizeof(BITMAP_KEYLOCK) + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -204,7 +181,6 @@ void UI_DisplayStatus(const bool test_display)
|
|||||||
if (g_fkey_pressed)
|
if (g_fkey_pressed)
|
||||||
{
|
{
|
||||||
memcpy(line + x, BITMAP_F_KEY, sizeof(BITMAP_F_KEY));
|
memcpy(line + x, BITMAP_F_KEY, sizeof(BITMAP_F_KEY));
|
||||||
// invert_pixels(line + x, sizeof(BITMAP_F_KEY));
|
|
||||||
x += sizeof(BITMAP_F_KEY);
|
x += sizeof(BITMAP_F_KEY);
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
@ -256,7 +232,5 @@ void UI_DisplayStatus(const bool test_display)
|
|||||||
// BATTERY LEVEL indicator
|
// BATTERY LEVEL indicator
|
||||||
UI_DrawBattery(line + x, g_battery_display_level, g_low_battery_blink);
|
UI_DrawBattery(line + x, g_battery_display_level, g_low_battery_blink);
|
||||||
|
|
||||||
// **************
|
|
||||||
|
|
||||||
ST7565_BlitStatusLine();
|
ST7565_BlitStatusLine();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user