mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
Ignore all long-press/function keys whilst in menu
This commit is contained in:
parent
e042b21e65
commit
609df5f279
4
Makefile
4
Makefile
@ -13,7 +13,7 @@ ENABLE_NOAA := 0
|
|||||||
ENABLE_VOICE := 0
|
ENABLE_VOICE := 0
|
||||||
ENABLE_VOX := 0
|
ENABLE_VOX := 0
|
||||||
ENABLE_ALARM := 0
|
ENABLE_ALARM := 0
|
||||||
ENABLE_TX1750 := 1
|
ENABLE_TX1750 := 0
|
||||||
ENABLE_BIG_FREQ := 0
|
ENABLE_BIG_FREQ := 0
|
||||||
ENABLE_SMALL_BOLD := 1
|
ENABLE_SMALL_BOLD := 1
|
||||||
ENABLE_KEEP_MEM_NAME := 1
|
ENABLE_KEEP_MEM_NAME := 1
|
||||||
@ -31,7 +31,7 @@ ENABLE_AM_FIX_SHOW_DATA := 1
|
|||||||
ENABLE_SQUELCH_MORE_SENSITIVE := 1
|
ENABLE_SQUELCH_MORE_SENSITIVE := 1
|
||||||
ENABLE_FASTER_CHANNEL_SCAN := 0
|
ENABLE_FASTER_CHANNEL_SCAN := 0
|
||||||
ENABLE_RSSI_BAR := 1
|
ENABLE_RSSI_BAR := 1
|
||||||
ENABLE_AUDIO_BAR := 1
|
ENABLE_AUDIO_BAR := 0
|
||||||
ENABLE_COPY_CHAN_TO_VFO := 1
|
ENABLE_COPY_CHAN_TO_VFO := 1
|
||||||
#ENABLE_SINGLE_VFO_CHAN := 1
|
#ENABLE_SINGLE_VFO_CHAN := 1
|
||||||
#ENABLE_BAND_SCOPE := 1
|
#ENABLE_BAND_SCOPE := 1
|
||||||
|
@ -99,10 +99,10 @@ To compile directly in windows without the need of a linux virtual machine:
|
|||||||
1. Download and install "gcc-arm-none-eabi-10.3-2021.10-win32.exe" from https://developer.arm.com/downloads/-/gnu-rm
|
1. Download and install "gcc-arm-none-eabi-10.3-2021.10-win32.exe" from https://developer.arm.com/downloads/-/gnu-rm
|
||||||
2. Download and install "gnu_make-3.81.exe" from https://gnuwin32.sourceforge.net/packages/make.htm
|
2. Download and install "gnu_make-3.81.exe" from https://gnuwin32.sourceforge.net/packages/make.htm
|
||||||
|
|
||||||
3. You may (or not) need to manualy add gcc path to you OS environment PATH.
|
3. You may need to (I didn't) manualy add gcc path to your OS environment PATH.
|
||||||
ie add C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin
|
ie add C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin
|
||||||
|
|
||||||
4. You may (or not) need to reboot your PC after installing the above
|
4. You may need to reboot your PC after installing the above
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you can run 'win_make.bat' from the directory you saved this source code too.
|
Then you can run 'win_make.bat' from the directory you saved this source code too.
|
||||||
|
25
app/app.c
25
app/app.c
@ -677,17 +677,17 @@ static void MR_NextChannel(void)
|
|||||||
// this bit doesn't yet work if the other VFO is a frequency
|
// this bit doesn't yet work if the other VFO is a frequency
|
||||||
case SCAN_NEXT_CHAN_DUAL_WATCH:
|
case SCAN_NEXT_CHAN_DUAL_WATCH:
|
||||||
// dual watch is enabled - include the other VFO in the scan
|
// dual watch is enabled - include the other VFO in the scan
|
||||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF)
|
// if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF)
|
||||||
{
|
// {
|
||||||
chan = (gEeprom.RX_VFO + 1) & 1u;
|
// chan = (gEeprom.RX_VFO + 1) & 1u;
|
||||||
chan = gEeprom.ScreenChannel[chan];
|
// chan = gEeprom.ScreenChannel[chan];
|
||||||
if (IS_MR_CHANNEL(chan))
|
// if (IS_MR_CHANNEL(chan))
|
||||||
{
|
// {
|
||||||
gCurrentScanList = SCAN_NEXT_CHAN_DUAL_WATCH;
|
// gCurrentScanList = SCAN_NEXT_CHAN_DUAL_WATCH;
|
||||||
gNextMrChannel = chan;
|
// gNextMrChannel = chan;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case SCAN_NEXT_CHAN_MR:
|
case SCAN_NEXT_CHAN_MR:
|
||||||
@ -2163,8 +2163,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!bKeyHeld)
|
if (!bKeyHeld)
|
||||||
{
|
{ // keypad is locked, tell the user
|
||||||
// keypad is locked, tell the user
|
|
||||||
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
||||||
gKeypadLocked = 4; // 2 seconds
|
gKeypadLocked = 4; // 2 seconds
|
||||||
gUpdateDisplay = true;
|
gUpdateDisplay = true;
|
||||||
|
@ -52,12 +52,22 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
|
|||||||
if (!bKeyPressed)
|
if (!bKeyPressed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
if (gScreenToDisplay != DISPLAY_MENU &&
|
||||||
gAnotherVoiceID = gEeprom.KEY_LOCK ? VOICE_ID_UNLOCK : VOICE_ID_LOCK;
|
gScreenToDisplay != DISPLAY_FM &&
|
||||||
#endif
|
#ifdef ENABLE_FMRADIO
|
||||||
|
!gFmRadioMode &&
|
||||||
|
#endif
|
||||||
|
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||||
|
{ // toggle the keyboad lock
|
||||||
|
|
||||||
gEeprom.KEY_LOCK = !gEeprom.KEY_LOCK;
|
#ifdef ENABLE_VOICE
|
||||||
gRequestSaveSettings = true;
|
gAnotherVoiceID = gEeprom.KEY_LOCK ? VOICE_ID_UNLOCK : VOICE_ID_LOCK;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
gEeprom.KEY_LOCK = !gEeprom.KEY_LOCK;
|
||||||
|
|
||||||
|
gRequestSaveSettings = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
23
app/main.c
23
app/main.c
@ -40,6 +40,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
|||||||
uint8_t Band;
|
uint8_t Band;
|
||||||
uint8_t Vfo = gEeprom.TX_VFO;
|
uint8_t Vfo = gEeprom.TX_VFO;
|
||||||
|
|
||||||
|
if (gScreenToDisplay == DISPLAY_MENU)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (Key)
|
switch (Key)
|
||||||
{
|
{
|
||||||
case KEY_0:
|
case KEY_0:
|
||||||
@ -560,30 +563,16 @@ static void MAIN_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
|||||||
gCssScanMode == CSS_SCAN_MODE_OFF)
|
gCssScanMode == CSS_SCAN_MODE_OFF)
|
||||||
{ // copy channel to VFO
|
{ // copy channel to VFO
|
||||||
|
|
||||||
//const unsigned int vfo = (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
const unsigned int vfo = get_rx_VFO();
|
||||||
unsigned int vfo = gEeprom.TX_VFO;
|
|
||||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_B)
|
|
||||||
vfo = 1;
|
|
||||||
else
|
|
||||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_A)
|
|
||||||
vfo = 0;
|
|
||||||
else
|
|
||||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_B)
|
|
||||||
vfo = 1;
|
|
||||||
else
|
|
||||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_A)
|
|
||||||
vfo = 0;
|
|
||||||
if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF)
|
|
||||||
vfo = (vfo + 1) & 1u;
|
|
||||||
|
|
||||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo]))
|
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo]))
|
||||||
{ // swap to the VFO
|
{ // swap to the VFO
|
||||||
|
|
||||||
const unsigned int channel = FREQ_CHANNEL_FIRST + gEeprom.VfoInfo[vfo].Band;
|
const unsigned int channel = FREQ_CHANNEL_FIRST + gEeprom.VfoInfo[vfo].Band;
|
||||||
|
|
||||||
gEeprom.ScreenChannel[vfo] = channel;
|
gEeprom.ScreenChannel[vfo] = channel;
|
||||||
gEeprom.VfoInfo[vfo].CHANNEL_SAVE = channel;
|
gEeprom.VfoInfo[vfo].CHANNEL_SAVE = channel;
|
||||||
gEeprom.TX_VFO = vfo;
|
gEeprom.TX_VFO = vfo;
|
||||||
|
|
||||||
RADIO_SelectVfos();
|
RADIO_SelectVfos();
|
||||||
RADIO_ApplyOffset(gRxVfo);
|
RADIO_ApplyOffset(gRxVfo);
|
||||||
|
2
board.c
2
board.c
@ -509,7 +509,7 @@ void BOARD_Init(void)
|
|||||||
BOARD_PORTCON_Init();
|
BOARD_PORTCON_Init();
|
||||||
BOARD_GPIO_Init();
|
BOARD_GPIO_Init();
|
||||||
BOARD_ADC_Init();
|
BOARD_ADC_Init();
|
||||||
ST7565_Init();
|
ST7565_Init(true);
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
BK1080_Init(0, false);
|
BK1080_Init(0, false);
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,10 +82,10 @@ void ST7565_BlitFullScreen(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// whats the delay for I wonder ? .. it slows down scanning :(
|
// whats the delay for I wonder, it holds things up :(
|
||||||
SYSTEM_DelayMs(20);
|
SYSTEM_DelayMs(20);
|
||||||
#else
|
#else
|
||||||
SYSTEM_DelayMs(1);
|
// SYSTEM_DelayMs(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SPI_ToggleMasterMode(&SPI0->CR, true);
|
SPI_ToggleMasterMode(&SPI0->CR, true);
|
||||||
@ -119,6 +119,9 @@ void ST7565_FillScreen(uint8_t Value)
|
|||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
// reset some of the displays settings to try and overcome the radios hardware problem - RF corrupting the display
|
||||||
|
ST7565_Init(false);
|
||||||
|
|
||||||
SPI_ToggleMasterMode(&SPI0->CR, false);
|
SPI_ToggleMasterMode(&SPI0->CR, false);
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
@ -135,17 +138,20 @@ void ST7565_FillScreen(uint8_t Value)
|
|||||||
SPI_ToggleMasterMode(&SPI0->CR, true);
|
SPI_ToggleMasterMode(&SPI0->CR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ST7565_Init(void)
|
void ST7565_Init(const bool full)
|
||||||
{
|
{
|
||||||
SPI0_Init();
|
if (full)
|
||||||
|
{
|
||||||
|
SPI0_Init();
|
||||||
|
|
||||||
ST7565_Configure_GPIO_B11();
|
ST7565_Configure_GPIO_B11();
|
||||||
|
|
||||||
SPI_ToggleMasterMode(&SPI0->CR, false);
|
SPI_ToggleMasterMode(&SPI0->CR, false);
|
||||||
|
|
||||||
ST7565_WriteByte(0xE2); // internal reset
|
ST7565_WriteByte(0xE2); // internal reset
|
||||||
|
|
||||||
SYSTEM_DelayMs(120);
|
SYSTEM_DelayMs(120);
|
||||||
|
}
|
||||||
|
|
||||||
ST7565_WriteByte(0xA2); // bias 9
|
ST7565_WriteByte(0xA2); // bias 9
|
||||||
ST7565_WriteByte(0xC0); // com normal
|
ST7565_WriteByte(0xC0); // com normal
|
||||||
@ -157,30 +163,35 @@ void ST7565_Init(void)
|
|||||||
ST7565_WriteByte(0xA4); // all points normal
|
ST7565_WriteByte(0xA4); // all points normal
|
||||||
ST7565_WriteByte(0x24); //
|
ST7565_WriteByte(0x24); //
|
||||||
ST7565_WriteByte(0x81); // volume first ?
|
ST7565_WriteByte(0x81); // volume first ?
|
||||||
ST7565_WriteByte(0x1f); // contrast ?
|
|
||||||
ST7565_WriteByte(0x2B); // power control ?
|
|
||||||
|
|
||||||
SYSTEM_DelayMs(1);
|
if (full)
|
||||||
|
{
|
||||||
|
ST7565_WriteByte(0x1f); // contrast ?
|
||||||
|
ST7565_WriteByte(0x2B); // power control ?
|
||||||
|
|
||||||
ST7565_WriteByte(0x2E); // power control ?
|
SYSTEM_DelayMs(1);
|
||||||
|
|
||||||
SYSTEM_DelayMs(1);
|
ST7565_WriteByte(0x2E); // power control ?
|
||||||
|
|
||||||
ST7565_WriteByte(0x2F); //
|
SYSTEM_DelayMs(1);
|
||||||
ST7565_WriteByte(0x2F); //
|
|
||||||
ST7565_WriteByte(0x2F); //
|
|
||||||
ST7565_WriteByte(0x2F); //
|
|
||||||
|
|
||||||
SYSTEM_DelayMs(40);
|
ST7565_WriteByte(0x2F); //
|
||||||
|
ST7565_WriteByte(0x2F); //
|
||||||
|
ST7565_WriteByte(0x2F); //
|
||||||
|
ST7565_WriteByte(0x2F); //
|
||||||
|
|
||||||
ST7565_WriteByte(0x40); // start line ?
|
SYSTEM_DelayMs(40);
|
||||||
ST7565_WriteByte(0xAF); // display on ?
|
|
||||||
|
ST7565_WriteByte(0x40); // start line ?
|
||||||
|
ST7565_WriteByte(0xAF); // display on ?
|
||||||
|
}
|
||||||
|
|
||||||
SPI_WaitForUndocumentedTxFifoStatusBit();
|
SPI_WaitForUndocumentedTxFifoStatusBit();
|
||||||
|
|
||||||
SPI_ToggleMasterMode(&SPI0->CR, true);
|
SPI_ToggleMasterMode(&SPI0->CR, true);
|
||||||
|
|
||||||
ST7565_FillScreen(0x00);
|
if (full)
|
||||||
|
ST7565_FillScreen(0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ST7565_Configure_GPIO_B11(void)
|
void ST7565_Configure_GPIO_B11(void)
|
||||||
|
@ -30,7 +30,7 @@ void ST7565_DrawLine(const unsigned int Column, const unsigned int Line, const u
|
|||||||
void ST7565_BlitFullScreen(void);
|
void ST7565_BlitFullScreen(void);
|
||||||
void ST7565_BlitStatusLine(void);
|
void ST7565_BlitStatusLine(void);
|
||||||
void ST7565_FillScreen(uint8_t Value);
|
void ST7565_FillScreen(uint8_t Value);
|
||||||
void ST7565_Init(void);
|
void ST7565_Init(const bool full);
|
||||||
void ST7565_Configure_GPIO_B11(void);
|
void ST7565_Configure_GPIO_B11(void);
|
||||||
void ST7565_SelectColumnAndLine(uint8_t Column, uint8_t Line);
|
void ST7565_SelectColumnAndLine(uint8_t Column, uint8_t Line);
|
||||||
void ST7565_WriteByte(uint8_t Value);
|
void ST7565_WriteByte(uint8_t Value);
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
35
misc.c
35
misc.c
@ -17,6 +17,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
const uint8_t fm_resume_countdown_500ms = 2500 / 500; // 2.5 seconds
|
const uint8_t fm_resume_countdown_500ms = 2500 / 500; // 2.5 seconds
|
||||||
const uint8_t fm_radio_countdown_500ms = 2000 / 500; // 2 seconds
|
const uint8_t fm_radio_countdown_500ms = 2000 / 500; // 2 seconds
|
||||||
@ -259,7 +260,39 @@ int16_t gCurrentRSSI[2] = {0, 0}; // now one per VFO
|
|||||||
|
|
||||||
uint8_t gIsLocked = 0xFF;
|
uint8_t gIsLocked = 0xFF;
|
||||||
|
|
||||||
// --------
|
unsigned int get_rx_VFO(void)
|
||||||
|
{
|
||||||
|
unsigned int rx_vfo = gEeprom.TX_VFO;
|
||||||
|
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_B)
|
||||||
|
rx_vfo = 0;
|
||||||
|
else
|
||||||
|
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_A)
|
||||||
|
rx_vfo = 1;
|
||||||
|
else
|
||||||
|
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_B)
|
||||||
|
rx_vfo = 1;
|
||||||
|
else
|
||||||
|
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_A)
|
||||||
|
rx_vfo = 0;
|
||||||
|
return rx_vfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int get_tx_VFO(void)
|
||||||
|
{
|
||||||
|
unsigned int tx_vfo = gEeprom.TX_VFO;
|
||||||
|
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_B)
|
||||||
|
tx_vfo = 1;
|
||||||
|
else
|
||||||
|
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_A)
|
||||||
|
tx_vfo = 0;
|
||||||
|
else
|
||||||
|
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_B)
|
||||||
|
tx_vfo = 1;
|
||||||
|
else
|
||||||
|
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_A)
|
||||||
|
tx_vfo = 0;
|
||||||
|
return tx_vfo;
|
||||||
|
}
|
||||||
|
|
||||||
void NUMBER_Get(char *pDigits, uint32_t *pInteger)
|
void NUMBER_Get(char *pDigits, uint32_t *pInteger)
|
||||||
{
|
{
|
||||||
|
3
misc.h
3
misc.h
@ -322,6 +322,9 @@ extern int16_t gCurrentRSSI[2]; // now one per VFO
|
|||||||
extern uint8_t gIsLocked;
|
extern uint8_t gIsLocked;
|
||||||
extern volatile uint8_t boot_counter_10ms;
|
extern volatile uint8_t boot_counter_10ms;
|
||||||
|
|
||||||
|
unsigned int get_tx_VFO(void);
|
||||||
|
unsigned int get_rx_VFO(void);
|
||||||
|
|
||||||
void NUMBER_Get(char *pDigits, uint32_t *pInteger);
|
void NUMBER_Get(char *pDigits, uint32_t *pInteger);
|
||||||
void NUMBER_ToDigits(uint32_t Value, char *pDigits);
|
void NUMBER_ToDigits(uint32_t Value, char *pDigits);
|
||||||
int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit, int32_t UpperLimit);
|
int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit, int32_t UpperLimit);
|
||||||
|
35
radio.c
35
radio.c
@ -522,22 +522,8 @@ static void RADIO_SelectCurrentVfo(void)
|
|||||||
|
|
||||||
void RADIO_SelectVfos(void)
|
void RADIO_SelectVfos(void)
|
||||||
{
|
{
|
||||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_B)
|
gEeprom.TX_VFO = get_tx_VFO();
|
||||||
gEeprom.TX_VFO = 1;
|
gEeprom.RX_VFO = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.TX_VFO : (gEeprom.TX_VFO + 1) & 1u;
|
||||||
else
|
|
||||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_A)
|
|
||||||
gEeprom.TX_VFO = 0;
|
|
||||||
else
|
|
||||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_B)
|
|
||||||
gEeprom.TX_VFO = 1;
|
|
||||||
else
|
|
||||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_A)
|
|
||||||
gEeprom.TX_VFO = 0;
|
|
||||||
|
|
||||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF)
|
|
||||||
gEeprom.RX_VFO = gEeprom.TX_VFO;
|
|
||||||
else
|
|
||||||
gEeprom.RX_VFO = (gEeprom.TX_VFO == 0) ? 1 : 0;
|
|
||||||
|
|
||||||
gTxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
gTxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
||||||
gRxVfo = &gEeprom.VfoInfo[gEeprom.RX_VFO];
|
gRxVfo = &gEeprom.VfoInfo[gEeprom.RX_VFO];
|
||||||
@ -877,10 +863,9 @@ void RADIO_SetVfoState(VfoState_t State)
|
|||||||
VfoState[1] = VFO_STATE_TX_DISABLE;
|
VfoState[1] = VFO_STATE_TX_DISABLE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ // 1of11
|
||||||
unsigned int chan = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF && gRxVfoIsActive) ? (gEeprom.RX_VFO + 1) & 1 : gEeprom.RX_VFO; // 1of11
|
const unsigned int vfo = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||||
chan = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.TX_VFO : chan;
|
VfoState[vfo] = State;
|
||||||
VfoState[chan] = State;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
@ -901,11 +886,11 @@ void RADIO_PrepareTX(void)
|
|||||||
gDualWatchCountdown_10ms = dual_watch_count_after_tx_10ms;
|
gDualWatchCountdown_10ms = dual_watch_count_after_tx_10ms;
|
||||||
gScheduleDualWatch = false;
|
gScheduleDualWatch = false;
|
||||||
|
|
||||||
if (!gRxVfoIsActive)
|
if (gRxVfoIsActive)
|
||||||
{ // use the TX vfo
|
{ // use the TX vfo
|
||||||
gEeprom.RX_VFO = gEeprom.TX_VFO;
|
gEeprom.RX_VFO = gEeprom.TX_VFO;
|
||||||
gRxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
gRxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
||||||
gRxVfoIsActive = true;
|
// gRxVfoIsActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// let the user see that DW is not active
|
// let the user see that DW is not active
|
||||||
@ -939,7 +924,6 @@ void RADIO_PrepareTX(void)
|
|||||||
State = VFO_STATE_TX_DISABLE;
|
State = VFO_STATE_TX_DISABLE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
//if (TX_freq_check(gCurrentVfo->pTX->Frequency) == 0 || gCurrentVfo->CHANNEL_SAVE <= FREQ_CHANNEL_LAST)
|
|
||||||
if (TX_freq_check(gCurrentVfo->pTX->Frequency) == 0)
|
if (TX_freq_check(gCurrentVfo->pTX->Frequency) == 0)
|
||||||
{ // TX frequency is allowed
|
{ // TX frequency is allowed
|
||||||
if (gCurrentVfo->BUSY_CHANNEL_LOCK && gCurrentFunction == FUNCTION_RECEIVE)
|
if (gCurrentVfo->BUSY_CHANNEL_LOCK && gCurrentFunction == FUNCTION_RECEIVE)
|
||||||
@ -958,10 +942,13 @@ void RADIO_PrepareTX(void)
|
|||||||
if (State != VFO_STATE_NORMAL)
|
if (State != VFO_STATE_NORMAL)
|
||||||
{ // TX not allowed
|
{ // TX not allowed
|
||||||
RADIO_SetVfoState(State);
|
RADIO_SetVfoState(State);
|
||||||
|
|
||||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
gAlarmState = ALARM_STATE_OFF;
|
gAlarmState = ALARM_STATE_OFF;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gDTMF_ReplyState = DTMF_REPLY_NONE;
|
gDTMF_ReplyState = DTMF_REPLY_NONE;
|
||||||
|
|
||||||
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -173,6 +173,7 @@ void UI_drawBars(uint8_t *p, const unsigned int level)
|
|||||||
|
|
||||||
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
||||||
return; // display is in use
|
return; // display is in use
|
||||||
|
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT ||
|
if (gCurrentFunction == FUNCTION_TRANSMIT ||
|
||||||
gScreenToDisplay != DISPLAY_MAIN ||
|
gScreenToDisplay != DISPLAY_MAIN ||
|
||||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user