mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-29 23:01:26 +03:00
Fix missing TX audio when apollo quindar PTT ID tones are enabled.
This commit is contained in:
parent
16d51300d9
commit
aae43131d9
@ -14,8 +14,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ENABLE_AIRCOPY
|
|
||||||
|
|
||||||
#include "app/aircopy.h"
|
#include "app/aircopy.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "driver/bk4819.h"
|
#include "driver/bk4819.h"
|
||||||
@ -71,7 +69,9 @@ void AIRCOPY_StorePacket(void)
|
|||||||
|
|
||||||
g_fsk_wite_index = 0;
|
g_fsk_wite_index = 0;
|
||||||
g_update_display = true;
|
g_update_display = true;
|
||||||
Status = BK4819_ReadRegister(BK4819_REG_0B);
|
|
||||||
|
Status = BK4819_ReadRegister(BK4819_REG_0B);
|
||||||
|
|
||||||
BK4819_PrepareFSKReceive();
|
BK4819_PrepareFSKReceive();
|
||||||
|
|
||||||
// Doc says bit 4 should be 1 = CRC OK, 0 = CRC FAIL, but original firmware checks for FAIL.
|
// Doc says bit 4 should be 1 = CRC OK, 0 = CRC FAIL, but original firmware checks for FAIL.
|
||||||
@ -85,12 +85,11 @@ void AIRCOPY_StorePacket(void)
|
|||||||
g_fsk_buffer[i + 1] ^= Obfuscation[i % 8];
|
g_fsk_buffer[i + 1] ^= Obfuscation[i % 8];
|
||||||
|
|
||||||
CRC = CRC_Calculate(&g_fsk_buffer[1], 2 + 64);
|
CRC = CRC_Calculate(&g_fsk_buffer[1], 2 + 64);
|
||||||
|
|
||||||
if (g_fsk_buffer[34] == CRC)
|
if (g_fsk_buffer[34] == CRC)
|
||||||
{
|
{
|
||||||
const uint16_t *pData;
|
const uint16_t *pData;
|
||||||
uint16_t Offset;
|
uint16_t Offset = g_fsk_buffer[1];
|
||||||
|
|
||||||
Offset = g_fsk_buffer[1];
|
|
||||||
if (Offset < 0x1E00)
|
if (Offset < 0x1E00)
|
||||||
{
|
{
|
||||||
pData = &g_fsk_buffer[2];
|
pData = &g_fsk_buffer[2];
|
||||||
@ -110,6 +109,7 @@ void AIRCOPY_StorePacket(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_errors_during_air_copyy++;
|
g_errors_during_air_copyy++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,9 @@ static void AIRCOPY_Key_DIGITS(key_code_t Key, bool key_pressed, bool key_held)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
INPUTBOX_Append(Key);
|
INPUTBOX_Append(Key);
|
||||||
|
|
||||||
g_request_display_screen = DISPLAY_AIRCOPY;
|
g_request_display_screen = DISPLAY_AIRCOPY;
|
||||||
|
|
||||||
if (g_input_box_index < 6)
|
if (g_input_box_index < 6)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
@ -228,5 +230,3 @@ void AIRCOPY_ProcessKeys(key_code_t Key, bool key_pressed, bool key_held)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
15
app/menu.c
15
app/menu.c
@ -237,6 +237,10 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
|||||||
case MENU_D_DCD:
|
case MENU_D_DCD:
|
||||||
case MENU_D_LIVE_DEC:
|
case MENU_D_LIVE_DEC:
|
||||||
case MENU_AM:
|
case MENU_AM:
|
||||||
|
*pMin = 0;
|
||||||
|
*pMax = ARRAY_SIZE(g_sub_menu_off_on) - 1;
|
||||||
|
break;
|
||||||
|
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
case MENU_NOAA_S:
|
case MENU_NOAA_S:
|
||||||
#endif
|
#endif
|
||||||
@ -247,7 +251,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
|||||||
case MENU_SCREN:
|
case MENU_SCREN:
|
||||||
case MENU_TX_EN:
|
case MENU_TX_EN:
|
||||||
*pMin = 0;
|
*pMin = 0;
|
||||||
*pMax = ARRAY_SIZE(g_sub_menu_off_on) - 1;
|
*pMax = ARRAY_SIZE(g_sub_menu_DIS_EN) - 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_SCR:
|
case MENU_SCR:
|
||||||
@ -656,7 +660,14 @@ void MENU_AcceptSetting(void)
|
|||||||
|
|
||||||
case MENU_PTT_ID:
|
case MENU_PTT_ID:
|
||||||
g_tx_vfo->dtmf_ptt_id_tx_mode = g_sub_menu_selection;
|
g_tx_vfo->dtmf_ptt_id_tx_mode = g_sub_menu_selection;
|
||||||
g_request_save_channel = 1;
|
g_request_save_channel = 1;
|
||||||
|
if (g_sub_menu_selection == PTT_ID_TX_DOWN ||
|
||||||
|
g_sub_menu_selection == PTT_ID_BOTH ||
|
||||||
|
g_sub_menu_selection == PTT_ID_APOLLO)
|
||||||
|
{
|
||||||
|
g_eeprom.roger_mode = ROGER_MODE_OFF;
|
||||||
|
break;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MENU_BAT_TXT:
|
case MENU_BAT_TXT:
|
||||||
|
@ -1038,6 +1038,7 @@ void BK4819_PlaySingleTone(const unsigned int tone_Hz, const unsigned int delay,
|
|||||||
|
|
||||||
BK4819_WriteRegister(BK4819_REG_70, 0x0000);
|
BK4819_WriteRegister(BK4819_REG_70, 0x0000);
|
||||||
BK4819_WriteRegister(BK4819_REG_30, 0xC1FE);
|
BK4819_WriteRegister(BK4819_REG_30, 0xC1FE);
|
||||||
|
BK4819_ExitTxMute();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BK4819_EnterTxMute(void)
|
void BK4819_EnterTxMute(void)
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -14,8 +14,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ENABLE_AIRCOPY
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "app/aircopy.h"
|
#include "app/aircopy.h"
|
||||||
@ -61,5 +59,3 @@ void UI_DisplayAircopy(void)
|
|||||||
|
|
||||||
ST7565_BlitFullScreen();
|
ST7565_BlitFullScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
25
ui/menu.c
25
ui/menu.c
@ -126,7 +126,7 @@ const t_menu_item g_menu_list[] =
|
|||||||
// hidden menu items from here on
|
// hidden menu items from here on
|
||||||
// enabled by pressing both the PTT and upper side button at power-on
|
// enabled by pressing both the PTT and upper side button at power-on
|
||||||
|
|
||||||
{"F LOCK", VOICE_ID_INVALID, MENU_F_LOCK },
|
{"F LOCK", VOICE_ID_INVALID, MENU_F_LOCK }, // country/area specific
|
||||||
{"Tx 200", VOICE_ID_INVALID, MENU_200TX }, // was "200TX"
|
{"Tx 200", VOICE_ID_INVALID, MENU_200TX }, // was "200TX"
|
||||||
{"Tx 350", VOICE_ID_INVALID, MENU_350TX }, // was "350TX"
|
{"Tx 350", VOICE_ID_INVALID, MENU_350TX }, // was "350TX"
|
||||||
{"Tx 500", VOICE_ID_INVALID, MENU_500TX }, // was "500TX"
|
{"Tx 500", VOICE_ID_INVALID, MENU_500TX }, // was "500TX"
|
||||||
@ -325,6 +325,12 @@ const char g_sub_menu_BAT_TXT[3][8] =
|
|||||||
"PERCENT"
|
"PERCENT"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const char g_sub_menu_DIS_EN[2][9] =
|
||||||
|
{
|
||||||
|
"DISABLED",
|
||||||
|
"ENABLED"
|
||||||
|
};
|
||||||
|
|
||||||
const char g_sub_menu_SCRAMBLER[11][7] =
|
const char g_sub_menu_SCRAMBLER[11][7] =
|
||||||
{
|
{
|
||||||
"OFF",
|
"OFF",
|
||||||
@ -677,16 +683,31 @@ void UI_DisplayMenu(void)
|
|||||||
case MENU_D_ST:
|
case MENU_D_ST:
|
||||||
case MENU_D_DCD:
|
case MENU_D_DCD:
|
||||||
case MENU_D_LIVE_DEC:
|
case MENU_D_LIVE_DEC:
|
||||||
|
strcpy(String, g_sub_menu_off_on[g_sub_menu_selection]);
|
||||||
|
break;
|
||||||
|
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
case MENU_NOAA_S:
|
case MENU_NOAA_S:
|
||||||
|
strcpy(String, "SCAN\n");
|
||||||
|
strcat(String, g_sub_menu_DIS_EN[g_sub_menu_selection]);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case MENU_350TX:
|
case MENU_350TX:
|
||||||
case MENU_200TX:
|
case MENU_200TX:
|
||||||
case MENU_500TX:
|
case MENU_500TX:
|
||||||
case MENU_350EN:
|
case MENU_350EN:
|
||||||
|
strcpy(String, g_sub_menu_DIS_EN[g_sub_menu_selection]);
|
||||||
|
break;
|
||||||
|
|
||||||
case MENU_SCREN:
|
case MENU_SCREN:
|
||||||
|
strcpy(String, "SCRAMBLER\n");
|
||||||
|
strcat(String, g_sub_menu_DIS_EN[g_sub_menu_selection]);
|
||||||
|
break;
|
||||||
|
|
||||||
case MENU_TX_EN:
|
case MENU_TX_EN:
|
||||||
strcpy(String, g_sub_menu_off_on[g_sub_menu_selection]);
|
strcpy(String, "TX\n");
|
||||||
|
strcat(String, g_sub_menu_DIS_EN[g_sub_menu_selection]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_MEM_CH:
|
case MENU_MEM_CH:
|
||||||
|
@ -170,9 +170,8 @@ extern const char g_sub_menu_rx_tx[4][6];
|
|||||||
extern const char g_sub_menu_AM_fix_test1[4][8];
|
extern const char g_sub_menu_AM_fix_test1[4][8];
|
||||||
#endif
|
#endif
|
||||||
extern const char g_sub_menu_BAT_TXT[3][8];
|
extern const char g_sub_menu_BAT_TXT[3][8];
|
||||||
|
extern const char g_sub_menu_DIS_EN[2][9];
|
||||||
extern const char g_sub_menu_SCRAMBLER[11][7];
|
extern const char g_sub_menu_SCRAMBLER[11][7];
|
||||||
|
|
||||||
extern const char g_sub_menu_SIDE_BUTT[9][16];
|
extern const char g_sub_menu_SIDE_BUTT[9][16];
|
||||||
|
|
||||||
extern bool g_is_in_sub_menu;
|
extern bool g_is_in_sub_menu;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user