mirror of
https://github.com/egzumer/uv-k5-firmware-custom
synced 2024-11-22 01:32:43 +00:00
bug fix
This commit is contained in:
parent
6eaac5ce88
commit
5bc11d6674
@ -1038,6 +1038,7 @@ static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
|||||||
{
|
{
|
||||||
if (gInputBoxIndex == 0 || gMenuCursor != MENU_OFFSET)
|
if (gInputBoxIndex == 0 || gMenuCursor != MENU_OFFSET)
|
||||||
{
|
{
|
||||||
|
gAskForConfirmation = 0; // fix bug
|
||||||
gIsInSubMenu = false;
|
gIsInSubMenu = false;
|
||||||
gInputBoxIndex = 0;
|
gInputBoxIndex = 0;
|
||||||
gFlagRefreshSetting = true;
|
gFlagRefreshSetting = true;
|
||||||
@ -1098,7 +1099,9 @@ static void MENU_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
gAskForConfirmation = 2;
|
gAskForConfirmation = 2;
|
||||||
|
|
||||||
UI_DisplayMenu();
|
UI_DisplayMenu();
|
||||||
|
|
||||||
if (gMenuCursor == MENU_RESET)
|
if (gMenuCursor == MENU_RESET)
|
||||||
{
|
{
|
||||||
#ifndef DISABLE_VOICE
|
#ifndef DISABLE_VOICE
|
||||||
@ -1108,6 +1111,7 @@ static void MENU_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
|||||||
MENU_AcceptSetting();
|
MENU_AcceptSetting();
|
||||||
overlay_FLASH_RebootToBootloader();
|
overlay_FLASH_RebootToBootloader();
|
||||||
}
|
}
|
||||||
|
|
||||||
gFlagAcceptSetting = true;
|
gFlagAcceptSetting = true;
|
||||||
gIsInSubMenu = false;
|
gIsInSubMenu = false;
|
||||||
gAskForConfirmation = 0;
|
gAskForConfirmation = 0;
|
||||||
|
656
bitmaps.c
656
bitmaps.c
@ -1,75 +1,619 @@
|
|||||||
|
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
|
||||||
const uint8_t BITMAP_PowerSave[8] = { 0x00, 0x26, 0x49, 0x49, 0x49, 0x49, 0x49, 0x32 };
|
// all these images are on their right sides
|
||||||
|
// turn your monitor 90deg anti-clockwise to see the images
|
||||||
|
|
||||||
const uint8_t BITMAP_BatteryLevel1[18] = { 0x00, 0x3E, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x63 };
|
const uint8_t BITMAP_PowerSave[] =
|
||||||
const uint8_t BITMAP_BatteryLevel2[18] = { 0x00, 0x3E, 0x22, 0x7F, 0x41, 0x5D, 0x5D, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x63 };
|
{
|
||||||
const uint8_t BITMAP_BatteryLevel3[18] = { 0x00, 0x3E, 0x22, 0x7F, 0x41, 0x5D, 0x5D, 0x41, 0x5D, 0x5D, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x63 };
|
0b00000000,
|
||||||
const uint8_t BITMAP_BatteryLevel4[18] = { 0x00, 0x3E, 0x22, 0x7F, 0x41, 0x5D, 0x5D, 0x41, 0x5D, 0x5D, 0x41, 0x5D, 0x5D, 0x41, 0x41, 0x41, 0x41, 0x63 };
|
0b00100110,
|
||||||
const uint8_t BITMAP_BatteryLevel5[18] = { 0x00, 0x3E, 0x22, 0x7F, 0x41, 0x5D, 0x5D, 0x41, 0x5D, 0x5D, 0x41, 0x5D, 0x5D, 0x41, 0x5D, 0x5D, 0x41, 0x63 };
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b00110010
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_USB_C[9] = { 0x00, 0x1C, 0x27, 0x44, 0x44, 0x44, 0x44, 0x27, 0x1C };
|
const uint8_t BITMAP_BatteryLevel1[] =
|
||||||
const uint8_t BITMAP_KeyLock[9] = { 0x00, 0x7C, 0x46, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7C };
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b00100010,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_F_Key[10] = { 0xFF, 0x81, 0xBD, 0x95, 0x95, 0x95, 0x95, 0x85, 0x81, 0xFF };
|
const uint8_t BITMAP_BatteryLevel2[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b00100010,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_VOX[18] = { 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x0, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x63, 0x14, 0x08, 0x14, 0x63 };
|
const uint8_t BITMAP_BatteryLevel3[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b00100010,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_BatteryLevel4[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b00100010,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_BatteryLevel5[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b00100010,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01011101,
|
||||||
|
0b01011101,
|
||||||
|
0b01000001,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_USB_C[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00011100,
|
||||||
|
0b00100111,
|
||||||
|
0b01000100,
|
||||||
|
0b01000100,
|
||||||
|
0b01000100,
|
||||||
|
0b01000100,
|
||||||
|
0b00100111,
|
||||||
|
0b00011100
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_KeyLock[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111100,
|
||||||
|
0b01000110,
|
||||||
|
0b01000101,
|
||||||
|
0b01000101,
|
||||||
|
0b01000101,
|
||||||
|
0b01000101,
|
||||||
|
0b01000110,
|
||||||
|
0b01111100
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_F_Key[] =
|
||||||
|
{
|
||||||
|
0b11111111,
|
||||||
|
0b10000001,
|
||||||
|
0b10111101,
|
||||||
|
0b10010101,
|
||||||
|
0b10010101,
|
||||||
|
0b10010101,
|
||||||
|
0b10010101,
|
||||||
|
0b10000101,
|
||||||
|
0b10000001,
|
||||||
|
0b11111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_VOX[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00011111,
|
||||||
|
0b00100000,
|
||||||
|
0b01000000,
|
||||||
|
0b00100000,
|
||||||
|
0b00011111,
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b00111110,
|
||||||
|
0b00000000,
|
||||||
|
0b01100011,
|
||||||
|
0b00010100,
|
||||||
|
0b00001000,
|
||||||
|
0b00010100,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_WX[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00100000,
|
||||||
|
0b00011000,
|
||||||
|
0b00100000,
|
||||||
|
0b01111111,
|
||||||
|
0b00000000,
|
||||||
|
0b01100011,
|
||||||
|
0b00010100,
|
||||||
|
0b00001000,
|
||||||
|
0b00010100,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_TDR[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b00111110,
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00100000,
|
||||||
|
0b00011000,
|
||||||
|
0b00100000,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_WX[12] = { 0x00, 0x7F, 0x20, 0x18, 0x20, 0x7F, 0x00, 0x63, 0x14, 0x08, 0x14, 0x63 };
|
|
||||||
const uint8_t BITMAP_TDR[12] = { 0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x20, 0x18, 0x20, 0x7F };
|
|
||||||
#ifndef DISABLE_VOICE
|
#ifndef DISABLE_VOICE
|
||||||
const uint8_t BITMAP_VoicePrompt[9] = { 0x00, 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0xFF, 0x18 };
|
const uint8_t BITMAP_VoicePrompt[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00011000,
|
||||||
|
0b00011000,
|
||||||
|
0b00100100,
|
||||||
|
0b00100100,
|
||||||
|
0b01000010,
|
||||||
|
0b01000010,
|
||||||
|
0b11111111,
|
||||||
|
0b00011000
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint8_t BITMAP_FM[12] = { 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F };
|
const uint8_t BITMAP_FM[] =
|
||||||
const uint8_t BITMAP_NOAA[12] = { 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, 0x46, 0x49, 0x49, 0x49, 0x31 };
|
{
|
||||||
|
0b00000000,
|
||||||
const uint8_t BITMAP_Antenna[5] = { 0x03, 0x05, 0x7F, 0x05, 0x03 };
|
0b01111111,
|
||||||
const uint8_t BITMAP_AntennaLevel1[3] = { 0x60, 0x60, 0x00 };
|
0b00001001,
|
||||||
const uint8_t BITMAP_AntennaLevel2[3] = { 0x70, 0x70, 0x00 };
|
0b00001001,
|
||||||
const uint8_t BITMAP_AntennaLevel3[3] = { 0x78, 0x78, 0x00 };
|
0b00001001,
|
||||||
const uint8_t BITMAP_AntennaLevel4[3] = { 0x7C, 0x7C, 0x00 };
|
0b00000001,
|
||||||
const uint8_t BITMAP_AntennaLevel5[3] = { 0x7E, 0x7E, 0x00 };
|
0b00000000,
|
||||||
const uint8_t BITMAP_AntennaLevel6[3] = { 0x7F, 0x7F, 0x00 };
|
0b01111111,
|
||||||
|
0b00000010,
|
||||||
const uint8_t BITMAP_CurrentIndicator[8] = { 0xFF, 0xFF, 0x7E, 0x7E, 0x3C, 0x3C, 0x18, 0x18 };
|
0b00001100,
|
||||||
|
0b00000010,
|
||||||
const uint8_t BITMAP_VFO_Default[8] = { 0x00, 0x7F, 0x7F, 0x3E, 0x3E, 0x1C, 0x1C, 0x08 };
|
0b01111111
|
||||||
const uint8_t BITMAP_VFO_NotDefault[8] = { 0x00, 0x41, 0x41, 0x22, 0x22, 0x14, 0x14, 0x08 };
|
|
||||||
|
|
||||||
const uint8_t BITMAP_TX[16] = { 0x00, 0x01, 0x01, 0x01, 0x7F, 0x01, 0x01, 0x01, 0x00, 0x63, 0x22, 0x14, 0x08, 0x14, 0x22, 0x63 };
|
|
||||||
const uint8_t BITMAP_RX[16] = { 0x00, 0x7F, 0x09, 0x09, 0x09, 0x19, 0x29, 0x46, 0x00, 0x63, 0x22, 0x14, 0x08, 0x14, 0x22, 0x63 };
|
|
||||||
|
|
||||||
const uint8_t BITMAP_M[8] = { 0x00, 0x7F, 0x02, 0x04, 0x18, 0x04, 0x02, 0x7F };
|
|
||||||
const uint8_t BITMAP_F[8] = { 0x00, 0x7F, 0x09, 0x09, 0x09, 0x09, 0x09, 0x01 };
|
|
||||||
|
|
||||||
const uint8_t BITMAP_ReverseMode[8] = { 0x00, 0x7F, 0x09, 0x09, 0x09, 0x19, 0x29, 0x46 };
|
|
||||||
|
|
||||||
const uint8_t BITMAP_NarrowBand[8] = { 0x00, 0x7F, 0x02, 0x04, 0x08, 0x10, 0x20, 0x7F };
|
|
||||||
|
|
||||||
const uint8_t BITMAP_DTMF[24] = {
|
|
||||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x01,
|
|
||||||
0x01, 0x7F, 0x01, 0x01, 0x00, 0x7F, 0x02, 0x0C,
|
|
||||||
0x02, 0x7F, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_Scramble[18] = {
|
#ifndef DISABLE_NOAA
|
||||||
0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x3E,
|
const uint8_t BITMAP_NOAA[] =
|
||||||
0x41, 0x41, 0x41, 0x22, 0x00, 0x7F, 0x09, 0x19,
|
{
|
||||||
0x29, 0x46,
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00000100,
|
||||||
|
0b00001000,
|
||||||
|
0b00010000,
|
||||||
|
0b01111111,
|
||||||
|
0b00000000,
|
||||||
|
0b01000110,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b00110001
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const uint8_t BITMAP_Antenna[] =
|
||||||
|
{
|
||||||
|
0b00000011,
|
||||||
|
0b00000101,
|
||||||
|
0b01111111,
|
||||||
|
0b00000101,
|
||||||
|
0b00000011
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_Add[8] = { 0x00, 0x18, 0x18, 0x7E, 0x7E, 0x7E, 0x18, 0x18 };
|
const uint8_t BITMAP_AntennaLevel1[] =
|
||||||
const uint8_t BITMAP_Sub[8] = { 0x00, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C };
|
{
|
||||||
|
0b01100000,
|
||||||
|
0b01100000,
|
||||||
|
0b00000000
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_PowerHigh[8] = { 0x00, 0x7F, 0x08, 0x08, 0x08, 0x08, 0x08, 0x7F };
|
const uint8_t BITMAP_AntennaLevel2[] =
|
||||||
const uint8_t BITMAP_PowerMid[8] = { 0x00, 0x7F, 0x02, 0x04, 0x18, 0x04, 0x02, 0x7F };
|
{
|
||||||
const uint8_t BITMAP_PowerLow[8] = { 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 };
|
0b01110000,
|
||||||
|
0b01110000,
|
||||||
|
0b00000000
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_AM[12] = { 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F };
|
const uint8_t BITMAP_AntennaLevel3[] =
|
||||||
|
{
|
||||||
|
0b01111000,
|
||||||
|
0b01111000,
|
||||||
|
0b00000000
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_CT[12] = { 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, 0x01, 0x01, 0x7F, 0x01, 0x01 };
|
const uint8_t BITMAP_AntennaLevel4[] =
|
||||||
const uint8_t BITMAP_DCS[18] = { 0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32 };
|
{
|
||||||
|
0b01111100,
|
||||||
|
0b01111100,
|
||||||
|
0b00000000
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_ScanList[6] = { 0x08, 0x1C, 0x3E, 0x3E, 0x1C, 0x08 };
|
const uint8_t BITMAP_AntennaLevel5[] =
|
||||||
|
{
|
||||||
|
0b01111110,
|
||||||
|
0b01111110,
|
||||||
|
0b00000000
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_AntennaLevel6[] =
|
||||||
|
{
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b00000000
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_CurrentIndicator[] =
|
||||||
|
{
|
||||||
|
0b11111111,
|
||||||
|
0b11111111,
|
||||||
|
0b01111110,
|
||||||
|
0b01111110,
|
||||||
|
0b00111100,
|
||||||
|
0b00111100,
|
||||||
|
0b00011000,
|
||||||
|
0b00011000
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_VFO_Default[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b00111110,
|
||||||
|
0b00111110,
|
||||||
|
0b00011100,
|
||||||
|
0b00011100,
|
||||||
|
0b00001000
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_VFO_NotDefault[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b00100010,
|
||||||
|
0b00100010,
|
||||||
|
0b00010100,
|
||||||
|
0b00010100,
|
||||||
|
0b00001000
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_TX[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00000001,
|
||||||
|
0b00000001,
|
||||||
|
0b00000001,
|
||||||
|
0b01111111,
|
||||||
|
0b00000001,
|
||||||
|
0b00000001,
|
||||||
|
0b00000001,
|
||||||
|
0b00000000,
|
||||||
|
0b01100011,
|
||||||
|
0b00100010,
|
||||||
|
0b00010100,
|
||||||
|
0b00001000,
|
||||||
|
0b00010100,
|
||||||
|
0b00100010,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_RX[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00011001,
|
||||||
|
0b00101001,
|
||||||
|
0b01000110,
|
||||||
|
0b00000000,
|
||||||
|
0b01100011,
|
||||||
|
0b00100010,
|
||||||
|
0b00010100,
|
||||||
|
0b00001000,
|
||||||
|
0b00010100,
|
||||||
|
0b00100010,
|
||||||
|
0b01100011
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_M[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00000010,
|
||||||
|
0b00000100,
|
||||||
|
0b00011000,
|
||||||
|
0b00000100,
|
||||||
|
0b00000010,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_F[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00000001
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_ReverseMode[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00011001,
|
||||||
|
0b00101001,
|
||||||
|
0b01000110
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_NarrowBand[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00000010,
|
||||||
|
0b00000100,
|
||||||
|
0b00001000,
|
||||||
|
0b00010000,
|
||||||
|
0b00100000,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_DTMF[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b00111110,
|
||||||
|
0b00000000,
|
||||||
|
0b00000001,
|
||||||
|
0b00000001,
|
||||||
|
0b01111111,
|
||||||
|
0b00000001,
|
||||||
|
0b00000001,
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00000010,
|
||||||
|
0b00001100,
|
||||||
|
0b00000010,
|
||||||
|
0b01111111,
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00001001,
|
||||||
|
0b00000001
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_Scramble[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00100110,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b00110010,
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b00100010,
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00001001,
|
||||||
|
0b00011001,
|
||||||
|
0b00101001,
|
||||||
|
0b01000110
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_Add[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00011000,
|
||||||
|
0b00011000,
|
||||||
|
0b01111110,
|
||||||
|
0b01111110,
|
||||||
|
0b01111110,
|
||||||
|
0b00011000,
|
||||||
|
0b00011000
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_Sub[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00001100,
|
||||||
|
0b00001100,
|
||||||
|
0b00001100,
|
||||||
|
0b00001100,
|
||||||
|
0b00001100,
|
||||||
|
0b00001100,
|
||||||
|
0b00001100
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_PowerHigh[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00001000,
|
||||||
|
0b00001000,
|
||||||
|
0b00001000,
|
||||||
|
0b00001000,
|
||||||
|
0b00001000,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_PowerMid[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00000010,
|
||||||
|
0b00000100,
|
||||||
|
0b00011000,
|
||||||
|
0b00000100,
|
||||||
|
0b00000010,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_PowerLow[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b01000000,
|
||||||
|
0b01000000,
|
||||||
|
0b01000000,
|
||||||
|
0b01000000,
|
||||||
|
0b01000000,
|
||||||
|
0b01000000
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_AM[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111100,
|
||||||
|
0b00010010,
|
||||||
|
0b00010001,
|
||||||
|
0b00010010,
|
||||||
|
0b01111100,
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b00000010,
|
||||||
|
0b00001100,
|
||||||
|
0b00000010,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_CT[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b00100010,
|
||||||
|
0b00000000,
|
||||||
|
0b00000001,
|
||||||
|
0b00000001,
|
||||||
|
0b01111111,
|
||||||
|
0b00000001,
|
||||||
|
0b00000001
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_DCS[] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b00111110,
|
||||||
|
0b00000000,
|
||||||
|
0b00111110,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b01000001,
|
||||||
|
0b00100010,
|
||||||
|
0b00000000,
|
||||||
|
0b00100110,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b01001001,
|
||||||
|
0b00110010
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_ScanList[] =
|
||||||
|
{
|
||||||
|
0b00001000,
|
||||||
|
0b00011100,
|
||||||
|
0b00111110,
|
||||||
|
0b00111110,
|
||||||
|
0b00011100,
|
||||||
|
0b00001000
|
||||||
|
};
|
||||||
|
3
board.c
3
board.c
@ -549,6 +549,9 @@ void BOARD_EEPROM_LoadMoreSettings(void)
|
|||||||
memcpy(gEEPROM_1EC0_2, gEEPROM_1EC0_0, 8);
|
memcpy(gEEPROM_1EC0_2, gEEPROM_1EC0_0, 8);
|
||||||
memcpy(gEEPROM_1EC0_3, gEEPROM_1EC0_0, 8);
|
memcpy(gEEPROM_1EC0_3, gEEPROM_1EC0_0, 8);
|
||||||
|
|
||||||
|
// 3 bands, 4 * 16-bit values per band
|
||||||
|
// both my radios are -70dBm, -65dBm, -60dBm, -55dBm (0xB4, 0xBE, 0xC8, 0xD2)
|
||||||
|
// -93, -75, -57, -39 seems to be a better choice (0x86, 0xAA, 0xCE, 0xF2)
|
||||||
EEPROM_ReadBuffer(0x1EC8, gEEPROM_RSSI_CALIB[0], 8);
|
EEPROM_ReadBuffer(0x1EC8, gEEPROM_RSSI_CALIB[0], 8);
|
||||||
memcpy(gEEPROM_RSSI_CALIB[1], gEEPROM_RSSI_CALIB[0], 8);
|
memcpy(gEEPROM_RSSI_CALIB[1], gEEPROM_RSSI_CALIB[0], 8);
|
||||||
memcpy(gEEPROM_RSSI_CALIB[2], gEEPROM_RSSI_CALIB[0], 8);
|
memcpy(gEEPROM_RSSI_CALIB[2], gEEPROM_RSSI_CALIB[0], 8);
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
30
ui/main.c
30
ui/main.c
@ -103,9 +103,7 @@ void UI_DisplayMain(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
sprintf(String, ">%s", gDTMF_InputBox);
|
sprintf(String, ">%s", gDTMF_InputBox);
|
||||||
}
|
|
||||||
|
|
||||||
UI_PrintString(String, 2, 127, i * 3, 8, false);
|
UI_PrintString(String, 2, 127, i * 3, 8, false);
|
||||||
|
|
||||||
@ -133,6 +131,7 @@ void UI_DisplayMain(void)
|
|||||||
if (gDTMF_IsTx)
|
if (gDTMF_IsTx)
|
||||||
sprintf(String, ">%s", gDTMF_String);
|
sprintf(String, ">%s", gDTMF_String);
|
||||||
}
|
}
|
||||||
|
|
||||||
UI_PrintString(String, 2, 127, 2 + (i * 3), 8, false);
|
UI_PrintString(String, 2, 127, 2 + (i * 3), 8, false);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -143,7 +142,7 @@ void UI_DisplayMain(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (bIsSameVfo)
|
if (bIsSameVfo)
|
||||||
memcpy(pLine0 + 2, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
memcpy(pLine0 + 2, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||||
else
|
else
|
||||||
memcpy(pLine0 + 2, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
memcpy(pLine0 + 2, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||||
}
|
}
|
||||||
@ -176,6 +175,7 @@ void UI_DisplayMain(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SomeValue = 2;
|
SomeValue = 2;
|
||||||
|
|
||||||
if ((gCurrentFunction == FUNCTION_RECEIVE || gCurrentFunction == FUNCTION_MONITOR) && gEeprom.RX_CHANNEL == i)
|
if ((gCurrentFunction == FUNCTION_RECEIVE || gCurrentFunction == FUNCTION_MONITOR) && gEeprom.RX_CHANNEL == i)
|
||||||
memcpy(pLine0 + 14, BITMAP_RX, sizeof(BITMAP_RX));
|
memcpy(pLine0 + 14, BITMAP_RX, sizeof(BITMAP_RX));
|
||||||
}
|
}
|
||||||
@ -234,6 +234,7 @@ void UI_DisplayMain(void)
|
|||||||
uint8_t Width = 10;
|
uint8_t Width = 10;
|
||||||
|
|
||||||
memset(String, 0, sizeof(String));
|
memset(String, 0, sizeof(String));
|
||||||
|
|
||||||
switch (State)
|
switch (State)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
@ -316,9 +317,7 @@ void UI_DisplayMain(void)
|
|||||||
UI_PrintString(String, 31, 112, i * 4, 8, true);
|
UI_PrintString(String, 31, 112, i * 4, 8, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
UI_PrintString(gEeprom.VfoInfo[i].Name, 31, 112, i * 4, 8, true);
|
UI_PrintString(gEeprom.VfoInfo[i].Name, 31, 112, i * 4, 8, true);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -344,8 +343,10 @@ void UI_DisplayMain(void)
|
|||||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[i]))
|
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[i]))
|
||||||
{
|
{
|
||||||
const uint8_t Attributes = gMR_ChannelAttributes[gEeprom.ScreenChannel[i]];
|
const uint8_t Attributes = gMR_ChannelAttributes[gEeprom.ScreenChannel[i]];
|
||||||
|
|
||||||
if (Attributes & MR_CH_SCANLIST1)
|
if (Attributes & MR_CH_SCANLIST1)
|
||||||
memcpy(pLine0 + 113, BITMAP_ScanList, sizeof(BITMAP_ScanList));
|
memcpy(pLine0 + 113, BITMAP_ScanList, sizeof(BITMAP_ScanList));
|
||||||
|
|
||||||
if (Attributes & MR_CH_SCANLIST2)
|
if (Attributes & MR_CH_SCANLIST2)
|
||||||
memcpy(pLine0 + 120, BITMAP_ScanList, sizeof(BITMAP_ScanList));
|
memcpy(pLine0 + 120, BITMAP_ScanList, sizeof(BITMAP_ScanList));
|
||||||
}
|
}
|
||||||
@ -360,13 +361,13 @@ void UI_DisplayMain(void)
|
|||||||
|
|
||||||
if (SomeValue == 1)
|
if (SomeValue == 1)
|
||||||
{
|
{
|
||||||
if (gRxVfo->OUTPUT_POWER == OUTPUT_POWER_LOW)
|
if (gRxVfo->OUTPUT_POWER == OUTPUT_POWER_LOW)
|
||||||
Level = 2;
|
Level = 2;
|
||||||
else
|
else
|
||||||
if (gRxVfo->OUTPUT_POWER == OUTPUT_POWER_MID)
|
if (gRxVfo->OUTPUT_POWER == OUTPUT_POWER_MID)
|
||||||
Level = 4;
|
Level = 4;
|
||||||
else
|
else
|
||||||
Level = 6;
|
Level = 6;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (SomeValue == 2)
|
if (SomeValue == 2)
|
||||||
@ -409,10 +410,7 @@ void UI_DisplayMain(void)
|
|||||||
{
|
{
|
||||||
const FREQ_Config_t *pConfig;
|
const FREQ_Config_t *pConfig;
|
||||||
|
|
||||||
if (SomeValue == 1)
|
pConfig = (SomeValue == 1) ? gEeprom.VfoInfo[i].pTX : gEeprom.VfoInfo[i].pRX;
|
||||||
pConfig = gEeprom.VfoInfo[i].pTX;
|
|
||||||
else
|
|
||||||
pConfig = gEeprom.VfoInfo[i].pRX;
|
|
||||||
|
|
||||||
switch (pConfig->CodeType)
|
switch (pConfig->CodeType)
|
||||||
{
|
{
|
||||||
|
16
ui/rssi.c
16
ui/rssi.c
@ -35,12 +35,12 @@ static void Render(uint8_t RssiLevel, uint8_t VFO)
|
|||||||
if (VFO == 0)
|
if (VFO == 0)
|
||||||
{
|
{
|
||||||
pLine = gFrameBuffer[2];
|
pLine = gFrameBuffer[2];
|
||||||
Line = 3;
|
Line = 3;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pLine = gFrameBuffer[6];
|
pLine = gFrameBuffer[6];
|
||||||
Line = 7;
|
Line = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(pLine, 0, 23);
|
memset(pLine, 0, 23);
|
||||||
@ -54,15 +54,15 @@ static void Render(uint8_t RssiLevel, uint8_t VFO)
|
|||||||
{
|
{
|
||||||
memcpy(pLine, BITMAP_Antenna, 5);
|
memcpy(pLine, BITMAP_Antenna, 5);
|
||||||
memcpy(pLine + 5, BITMAP_AntennaLevel1, sizeof(BITMAP_AntennaLevel1));
|
memcpy(pLine + 5, BITMAP_AntennaLevel1, sizeof(BITMAP_AntennaLevel1));
|
||||||
if (RssiLevel >= 2)
|
if (RssiLevel >= 2) // 2
|
||||||
memcpy(pLine + 8, BITMAP_AntennaLevel2, sizeof(BITMAP_AntennaLevel2));
|
memcpy(pLine + 8, BITMAP_AntennaLevel2, sizeof(BITMAP_AntennaLevel2));
|
||||||
if (RssiLevel >= 3)
|
if (RssiLevel >= 3) // 3
|
||||||
memcpy(pLine + 11, BITMAP_AntennaLevel3, sizeof(BITMAP_AntennaLevel3));
|
memcpy(pLine + 11, BITMAP_AntennaLevel3, sizeof(BITMAP_AntennaLevel3));
|
||||||
if (RssiLevel >= 4)
|
if (RssiLevel >= 4) // 4
|
||||||
memcpy(pLine + 14, BITMAP_AntennaLevel4, sizeof(BITMAP_AntennaLevel4));
|
memcpy(pLine + 14, BITMAP_AntennaLevel4, sizeof(BITMAP_AntennaLevel4));
|
||||||
if (RssiLevel >= 5)
|
if (RssiLevel >= 5) // 5
|
||||||
memcpy(pLine + 17, BITMAP_AntennaLevel5, sizeof(BITMAP_AntennaLevel5));
|
memcpy(pLine + 17, BITMAP_AntennaLevel5, sizeof(BITMAP_AntennaLevel5));
|
||||||
if (RssiLevel >= 6)
|
if (RssiLevel >= 6) // 6
|
||||||
memcpy(pLine + 20, BITMAP_AntennaLevel6, sizeof(BITMAP_AntennaLevel6));
|
memcpy(pLine + 20, BITMAP_AntennaLevel6, sizeof(BITMAP_AntennaLevel6));
|
||||||
|
|
||||||
bIsClearMode = false;
|
bIsClearMode = false;
|
||||||
@ -87,6 +87,8 @@ void UI_UpdateRSSI(uint16_t RSSI)
|
|||||||
if (RSSI >= gEEPROM_RSSI_CALIB[gRxVfo->Band][0])
|
if (RSSI >= gEEPROM_RSSI_CALIB[gRxVfo->Band][0])
|
||||||
Level = 1;
|
Level = 1;
|
||||||
|
|
||||||
|
//const int16_t dB = (int16_t)(RSSI / 2) - 160;
|
||||||
|
|
||||||
if (gVFO_RSSI_Level[gEeprom.RX_CHANNEL] != Level)
|
if (gVFO_RSSI_Level[gEeprom.RX_CHANNEL] != Level)
|
||||||
{
|
{
|
||||||
gVFO_RSSI_Level[gEeprom.RX_CHANNEL] = Level;
|
gVFO_RSSI_Level[gEeprom.RX_CHANNEL] = Level;
|
||||||
|
Loading…
Reference in New Issue
Block a user