mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
test create
This commit is contained in:
parent
9366901ccb
commit
859f0215f4
18 changed files with 73 additions and 72 deletions
|
@ -20,25 +20,23 @@
|
|||
</configurations>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="按键锁定改回以前逻辑">
|
||||
<change afterPath="$PROJECT_DIR$/app/mdc1200.c" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/mdc1200.h" afterDir="false" />
|
||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="mdc tx end test">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Makefile" beforeDir="false" afterPath="$PROJECT_DIR$/Makefile" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/action.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/action.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/app.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/app.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/spectrum.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/spectrum.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/audio.c" beforeDir="false" afterPath="$PROJECT_DIR$/audio.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/clion-Debug-log.txt" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/clion-Debug-log.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/dtmf.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/dtmf.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/dtmf.h" beforeDir="false" afterPath="$PROJECT_DIR$/app/dtmf.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/main.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/mdc1200.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/mdc1200.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/mdc1200.h" beforeDir="false" afterPath="$PROJECT_DIR$/app/mdc1200.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/driver/bk4819.c" beforeDir="false" afterPath="$PROJECT_DIR$/driver/bk4819.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/driver/bk4819.h" beforeDir="false" afterPath="$PROJECT_DIR$/driver/bk4819.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/driver/crc.c" beforeDir="false" afterPath="$PROJECT_DIR$/driver/crc.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/driver/crc.h" beforeDir="false" afterPath="$PROJECT_DIR$/driver/crc.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/driver/systick.c" beforeDir="false" afterPath="$PROJECT_DIR$/driver/systick.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/driver/systick.h" beforeDir="false" afterPath="$PROJECT_DIR$/driver/systick.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/functions.c" beforeDir="false" afterPath="$PROJECT_DIR$/functions.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/radio.c" beforeDir="false" afterPath="$PROJECT_DIR$/radio.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/settings.c" beforeDir="false" afterPath="$PROJECT_DIR$/settings.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/settings.h" beforeDir="false" afterPath="$PROJECT_DIR$/settings.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ui/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/main.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ui/main.h" beforeDir="false" afterPath="$PROJECT_DIR$/ui/main.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/版本说明.txt" beforeDir="false" afterPath="$PROJECT_DIR$/版本说明.txt" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
|
@ -149,7 +147,7 @@
|
|||
<workItem from="1701325367312" duration="22657000" />
|
||||
<workItem from="1701413653518" duration="3544000" />
|
||||
<workItem from="1701430185864" duration="10115000" />
|
||||
<workItem from="1701559895523" duration="12283000" />
|
||||
<workItem from="1701559895523" duration="17108000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="bug fix">
|
||||
<created>1701136012311</created>
|
||||
|
@ -298,7 +296,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1701563372624</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="22" />
|
||||
<task id="LOCAL-00022" summary="mdc tx end test">
|
||||
<created>1701577655637</created>
|
||||
<option name="number" value="00022" />
|
||||
<option name="presentableId" value="LOCAL-00022" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1701577655637</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="23" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
@ -323,6 +328,7 @@
|
|||
<MESSAGE value="fix https://github.com/losehu/uv-k5-firmware-chinese/issues/4" />
|
||||
<MESSAGE value="修复切换调制模式时亚音消失问题" />
|
||||
<MESSAGE value="按键锁定改回以前逻辑" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="按键锁定改回以前逻辑" />
|
||||
<MESSAGE value="mdc tx end test" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="mdc tx end test" />
|
||||
</component>
|
||||
</project>
|
|
@ -816,4 +816,4 @@ add_executable(uv_k5_firmware_custom_0_17
|
|||
sram-overlay.c
|
||||
sram-overlay.h
|
||||
version.c
|
||||
version.h chinese.h app/mdc1200.c app/mdc1200.c)
|
||||
version.h chinese.h app/mdc1200.c app/mdc1200.c app/mdc1200.c)
|
||||
|
|
2
Makefile
2
Makefile
|
@ -30,7 +30,7 @@ ENABLE_TX_WHEN_AM := 0
|
|||
ENABLE_F_CAL_MENU := 0
|
||||
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 0
|
||||
ENABLE_BOOT_BEEPS := 0
|
||||
ENABLE_SHOW_CHARGE_LEVEL := 1
|
||||
ENABLE_SHOW_CHARGE_LEVEL := 0
|
||||
ENABLE_REVERSE_BAT_SYMBOL := 0
|
||||
ENABLE_NO_CODE_SCAN_TIMEOUT := 1
|
||||
ENABLE_AM_FIX := 1
|
||||
|
|
|
@ -396,6 +396,9 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||
default:
|
||||
case ACTION_OPT_WIDTH:
|
||||
gTxVfo->CHANNEL_BANDWIDTH=!gTxVfo->CHANNEL_BANDWIDTH;
|
||||
gRequestSaveChannel = 1;
|
||||
// gRequestSaveSettings = 1;
|
||||
|
||||
break;
|
||||
case ACTION_OPT_NONE:
|
||||
break;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "mdc1200.h"
|
||||
#include "app/action.h"
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
#include "app/aircopy.h"
|
||||
|
@ -743,6 +743,9 @@ static void CheckRadioInterrupts(void)
|
|||
g_FSK_Buffer[gFSKWriteIndex++] = BK4819_ReadRegister(BK4819_REG_5F);
|
||||
AIRCOPY_StorePacket();
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_MDC1200
|
||||
MDC1200_process_rx(interrupt_status_bits);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ void DTMF_HandleRequest(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
void DTMF_Reply(void)
|
||||
bool DTMF_Reply()
|
||||
{
|
||||
uint16_t Delay;
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|
@ -438,7 +438,7 @@ gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_OFF ||
|
|||
gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_TX_DOWN)
|
||||
{
|
||||
gDTMF_ReplyState = DTMF_REPLY_NONE;
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// send TX-UP DTMF
|
||||
|
@ -449,7 +449,7 @@ gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_TX_DOWN)
|
|||
gDTMF_ReplyState = DTMF_REPLY_NONE;
|
||||
|
||||
if (pString == NULL)
|
||||
return;
|
||||
return false;
|
||||
|
||||
Delay = (gEeprom.DTMF_PRELOAD_TIME < 200) ? 200 : gEeprom.DTMF_PRELOAD_TIME;
|
||||
|
||||
|
@ -476,4 +476,6 @@ gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_TX_DOWN)
|
|||
gEnableSpeaker = false;
|
||||
|
||||
BK4819_ExitDTMF_TX(false);
|
||||
return true;
|
||||
|
||||
}
|
|
@ -104,7 +104,7 @@ bool DTMF_ValidateCodes(char *pCode, const unsigned int size);
|
|||
char DTMF_GetCharacter(const unsigned int code);
|
||||
void DTMF_clear_input_box(void);
|
||||
void DTMF_Append(const char vode);
|
||||
void DTMF_Reply(void);
|
||||
bool DTMF_Reply();
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
void DTMF_clear_RX(void);
|
||||
|
|
|
@ -544,6 +544,8 @@ static void MAIN_Key_MENU(const bool bKeyPressed, const bool bKeyHeld) {
|
|||
{
|
||||
gWasFKeyPressed=false;
|
||||
gEeprom.BEEP_CONTROL=!gEeprom.BEEP_CONTROL;
|
||||
gRequestSaveSettings = 1;
|
||||
|
||||
return;
|
||||
}
|
||||
const bool bFlag = (gInputBoxIndex == 0);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "mdc1200.h"
|
||||
#include "misc.h"
|
||||
#include <string.h>
|
||||
|
||||
uint16_t MDC_ID=0X542B;
|
||||
|
||||
const uint8_t mdc1200_pre_amble[] = {0x00, 0x00, 0x00};
|
||||
const uint8_t mdc1200_sync[5] = {0x07, 0x09, 0x2a, 0x44, 0x6f};
|
||||
|
|
|
@ -102,5 +102,6 @@ unsigned int MDC1200_encode_single_packet(void *data, const uint8_t op, const
|
|||
void MDC1200_reset_rx(void);
|
||||
void MDC1200_process_rx(const uint16_t interrupt_bits);
|
||||
void MDC1200_init(void);
|
||||
extern uint16_t MDC_ID;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#endif
|
||||
BK4819_FilterBandwidth_t m_bandwidth = BK4819_FILTER_BW_NARROW;
|
||||
|
||||
static const uint16_t FSK_RogerTable[7] = {0xF1A2, 0x7446, 0x61A4, 0x6544, 0x4E8A, 0xE044, 0xEA84};
|
||||
|
||||
static const uint8_t DTMF_TONE1_GAIN = 65;
|
||||
static const uint8_t DTMF_TONE2_GAIN = 93;
|
||||
|
@ -1703,43 +1702,6 @@ void BK4819_PlayRoger(void)
|
|||
BK4819_WriteRegister(BK4819_REG_30, 0xC1FE); // 1 1 0000 0 1 1111 1 1 1 0
|
||||
}
|
||||
|
||||
void BK4819_PlayRogerMDC(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
BK4819_SetAF(BK4819_AF_MUTE);
|
||||
|
||||
BK4819_WriteRegister(BK4819_REG_58, 0x37C3); // FSK Enable,
|
||||
// RX Bandwidth FFSK 1200/1800
|
||||
// 0xAA or 0x55 Preamble
|
||||
// 11 RX Gain,
|
||||
// 101 RX Mode
|
||||
// TX FFSK 1200/1800
|
||||
BK4819_WriteRegister(BK4819_REG_72, 0x3065); // Set Tone-2 to 1200Hz
|
||||
BK4819_WriteRegister(BK4819_REG_70, 0x00E0); // Enable Tone-2 and Set Tone2 Gain
|
||||
BK4819_WriteRegister(BK4819_REG_5D, 0x0D00); // Set FSK data length to 13 bytes
|
||||
BK4819_WriteRegister(BK4819_REG_59, 0x8068); // 4 byte sync length, 6 byte preamble, clear TX FIFO
|
||||
BK4819_WriteRegister(BK4819_REG_59, 0x0068); // Same, but clear TX FIFO is now unset (clearing done)
|
||||
BK4819_WriteRegister(BK4819_REG_5A, 0x5555); // First two sync bytes
|
||||
BK4819_WriteRegister(BK4819_REG_5B, 0x55AA); // End of sync bytes. Total 4 bytes: 555555aa
|
||||
BK4819_WriteRegister(BK4819_REG_5C, 0xAA30); // Disable CRC
|
||||
|
||||
// Send the data from the roger table
|
||||
for (i = 0; i < 7; i++)
|
||||
BK4819_WriteRegister(BK4819_REG_5F, FSK_RogerTable[i]);
|
||||
|
||||
SYSTEM_DelayMs(20);
|
||||
|
||||
// 4 sync bytes, 6 byte preamble, Enable FSK TX
|
||||
BK4819_WriteRegister(BK4819_REG_59, 0x0868);
|
||||
|
||||
SYSTEM_DelayMs(180);
|
||||
|
||||
// Stop FSK TX, reset Tone-2, disable FSK
|
||||
BK4819_WriteRegister(BK4819_REG_59, 0x0068);
|
||||
BK4819_WriteRegister(BK4819_REG_70, 0x0000);
|
||||
BK4819_WriteRegister(BK4819_REG_58, 0x0000);
|
||||
}
|
||||
|
||||
void BK4819_Enable_AfDac_DiscMode_TxDsp(void)
|
||||
{
|
||||
|
|
|
@ -173,6 +173,7 @@ void BK4819_send_MDC1200(const uint8_t op, const uint8_t arg, const uint16_t id,
|
|||
|
||||
void BK4819_stop_tones(const bool tx);
|
||||
void BK4819_start_tone(const uint16_t frequency, const unsigned int level, const bool tx, const bool tx_mute);
|
||||
void BK4819_enable_mdc1200_rx(const bool enable);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
26
functions.c
26
functions.c
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "app/mdc1200.h"
|
||||
#include "app/dtmf.h"
|
||||
#if defined(ENABLE_FMRADIO)
|
||||
#include "app/fm.h"
|
||||
|
@ -160,7 +160,9 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
|||
return;
|
||||
|
||||
case FUNCTION_TRANSMIT:
|
||||
|
||||
#ifdef ENABLE_MDC1200
|
||||
BK4819_enable_mdc1200_rx(false);
|
||||
#endif
|
||||
// if DTMF is enabled when TX'ing, it changes the TX audio filtering !! .. 1of11
|
||||
BK4819_DisableDTMF();
|
||||
|
||||
|
@ -213,11 +215,27 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
|||
// turn the RED LED on
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, true);
|
||||
|
||||
DTMF_Reply();
|
||||
if(!DTMF_Reply()) {
|
||||
#ifdef ENABLE_MDC1200
|
||||
// if (g_current_vfo->channel.mdc1200_mode == MDC1200_MODE_BOT || g_current_vfo->channel.mdc1200_mode == MDC1200_MODE_BOTH)
|
||||
if(1)
|
||||
{
|
||||
|
||||
SYSTEM_DelayMs(30);
|
||||
|
||||
BK4819_send_MDC1200(1, 0x80, MDC_ID, true);
|
||||
|
||||
#ifdef ENABLE_MDC1200_SIDE_BEEP
|
||||
BK4819_start_tone(880, 10, true, true);
|
||||
SYSTEM_DelayMs(120);
|
||||
BK4819_stop_tones(true);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_APOLLO)
|
||||
BK4819_PlaySingleTone(2525, 250, 0, gEeprom.DTMF_SIDE_TONE);
|
||||
|
||||
}
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
if (gAlarmState != ALARM_STATE_OFF)
|
||||
{
|
||||
|
|
2
radio.c
2
radio.c
|
@ -1124,7 +1124,7 @@ void RADIO_SendEndOfTransmission(void)
|
|||
BK4819_PlayRoger();
|
||||
else
|
||||
if (gEeprom.ROGER == ROGER_MODE_MDC) {
|
||||
BK4819_send_MDC1200(MDC1200_OP_CODE_POST_ID, 0x00, 12, false);
|
||||
BK4819_send_MDC1200(MDC1200_OP_CODE_POST_ID, 0x00, MDC_ID, false);
|
||||
|
||||
#ifdef ENABLE_MDC1200_SIDE_BEEP
|
||||
BK4819_start_tone(880, 10, true, true);
|
||||
|
|
|
@ -125,7 +125,7 @@ void SETTINGS_InitEEPROM(void)
|
|||
gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_NONE;
|
||||
gEeprom.SCAN_RESUME_MODE = (Data[5] < 3) ? Data[5] : SCAN_RESUME_CO;
|
||||
gEeprom.AUTO_KEYPAD_LOCK = (Data[6] < 2) ? Data[6] : false;
|
||||
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_VOLTAGE;
|
||||
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_MESSAGE;
|
||||
|
||||
// 0E98..0E9F
|
||||
EEPROM_ReadBuffer(0x0E98, Data, 8);
|
||||
|
|
|
@ -26,10 +26,9 @@
|
|||
#include <driver/backlight.h>
|
||||
|
||||
enum POWER_OnDisplayMode_t {
|
||||
POWER_ON_DISPLAY_MODE_FULL_SCREEN = 0,
|
||||
POWER_ON_DISPLAY_MODE_MESSAGE,
|
||||
POWER_ON_DISPLAY_MODE_VOLTAGE,
|
||||
POWER_ON_DISPLAY_MODE_NONE
|
||||
,
|
||||
POWER_ON_DISPLAY_MODE_MESSAGE,
|
||||
};
|
||||
typedef enum POWER_OnDisplayMode_t POWER_OnDisplayMode_t;
|
||||
|
||||
|
|
|
@ -795,6 +795,9 @@ void UI_DisplayMain(void)
|
|||
UI_PrintStringSmall(String, 2, 0, 3);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
3
版本说明.txt
3
版本说明.txt
|
@ -1,6 +1,7 @@
|
|||
#0.10.4
|
||||
修复“按键音开机后失效“
|
||||
修复开机显示问题
|
||||
修复宽窄带开机后失效问题
|
||||
修复“宽窄带开机后失效“
|
||||
频谱图增加AM-FIX
|
||||
增加MDC1200信令
|
||||
#0.10.3
|
||||
|
|
Loading…
Reference in a new issue