0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 22:31:25 +03:00

No refunds !

This commit is contained in:
OneOfEleven 2023-10-22 14:22:53 +01:00
parent 428ca596e6
commit bfe2a116e2
11 changed files with 24 additions and 18 deletions

View File

@ -31,7 +31,7 @@ ENABLE_REDUCE_LOW_MID_TX_POWER := 1
# Tx Alarm 0.6 kB # Tx Alarm 0.6 kB
ENABLE_ALARM := 0 ENABLE_ALARM := 0
ENABLE_TX1750 := 0 ENABLE_TX1750 := 0
ENABLE_MDC1200 := 0 ENABLE_MDC1200 := 1
ENABLE_PWRON_PASSWORD := 0 ENABLE_PWRON_PASSWORD := 0
ENABLE_RESET_AES_KEY := 1 ENABLE_RESET_AES_KEY := 1
ENABLE_BIG_FREQ := 0 ENABLE_BIG_FREQ := 0

View File

@ -11,6 +11,8 @@ around with experimental code.
There is absolutely no guarantee that it will work in any way shape or form on your radio(s), it may There is absolutely no guarantee that it will work in any way shape or form on your radio(s), it may
even brick your radio(s), at which point, maybe find a quiet corner to sob your hert out in. even brick your radio(s), at which point, maybe find a quiet corner to sob your hert out in.
NO REFUNDS, ever !
## Radio performance ## Radio performance
Please note that the Quansheng UV-Kx radios are not professional quality transceivers, their Please note that the Quansheng UV-Kx radios are not professional quality transceivers, their

View File

@ -2823,7 +2823,7 @@ Skip:
RADIO_setup_registers(true); RADIO_setup_registers(true);
// g_tx_vfo->frequency_channel = BOARD_find_channel(frequency); // g_tx_vfo->freq_in_channel = BOARD_find_channel(frequency);
g_dtmf_auto_reset_time_500ms = 0; g_dtmf_auto_reset_time_500ms = 0;
g_dtmf_call_state = DTMF_CALL_STATE_NONE; g_dtmf_call_state = DTMF_CALL_STATE_NONE;

View File

@ -118,7 +118,7 @@ void toggle_chan_scanlist(void)
RADIO_setup_registers(true); RADIO_setup_registers(true);
// find the first channel that contains this frequency // find the first channel that contains this frequency
g_tx_vfo->frequency_channel = BOARD_find_channel(g_tx_vfo->freq_config_tx.frequency); g_tx_vfo->freq_in_channel = BOARD_find_channel(g_tx_vfo->freq_config_tx.frequency);
g_request_save_vfo = true; g_request_save_vfo = true;
@ -559,7 +559,7 @@ void MAIN_Key_DIGITS(key_code_t Key, bool key_pressed, bool key_held)
g_tx_vfo->freq_config_rx.frequency = Frequency; g_tx_vfo->freq_config_rx.frequency = Frequency;
// find the first channel that contains this frequency // find the first channel that contains this frequency
g_tx_vfo->frequency_channel = BOARD_find_channel(Frequency); g_tx_vfo->freq_in_channel = BOARD_find_channel(Frequency);
// 1of11 .. test to prevent monitor mode being turned off // 1of11 .. test to prevent monitor mode being turned off
#if 0 #if 0
@ -837,7 +837,7 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t Directio
g_tx_vfo->freq_config_tx.frequency = g_tx_vfo->freq_config_rx.frequency; g_tx_vfo->freq_config_tx.frequency = g_tx_vfo->freq_config_rx.frequency;
// find the first channel that contains this frequency // find the first channel that contains this frequency
g_tx_vfo->frequency_channel = BOARD_find_channel(g_tx_vfo->freq_config_rx.frequency); g_tx_vfo->freq_in_channel = BOARD_find_channel(g_tx_vfo->freq_config_rx.frequency);
// only update eeprom when the key is released - saves a LOT of wear and tear on the little eeprom // only update eeprom when the key is released - saves a LOT of wear and tear on the little eeprom
SETTINGS_save_channel(g_tx_vfo->channel_save, g_eeprom.tx_vfo, g_tx_vfo, 1); SETTINGS_save_channel(g_tx_vfo->channel_save, g_eeprom.tx_vfo, g_tx_vfo, 1);
@ -917,10 +917,10 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t Directio
// TODO: include this once we have the entire eeprom loaded // TODO: include this once we have the entire eeprom loaded
// //
//if (!key_held && key_pressed) //if (!key_held && key_pressed)
// g_tx_vfo->frequency_channel = BOARD_find_channel(frequency); // g_tx_vfo->freq_in_channel = BOARD_find_channel(frequency);
//else //else
//if (key_held && key_pressed) //if (key_held && key_pressed)
g_tx_vfo->frequency_channel = 0xff; g_tx_vfo->freq_in_channel = 0xff;
if (new_band != old_band) if (new_band != old_band)
{ // original slow method { // original slow method

View File

@ -2089,14 +2089,14 @@ void BK4819_PlayRogerMDC1200(void)
// <15:8> 0x55 FSK Sync Byte 0 (Sync Byte 0 first, then 1,2,3) // <15:8> 0x55 FSK Sync Byte 0 (Sync Byte 0 first, then 1,2,3)
// <7:0> 0x55 FSK Sync Byte 1 // <7:0> 0x55 FSK Sync Byte 1
// //
BK4819_WriteRegister(BK4819_REG_5A, 0); // can be any bit pattern you like BK4819_WriteRegister(BK4819_REG_5A, 0xffff); // bytes 1 & 2
// REG_5B // REG_5B
// //
// <15:8> 0x55 FSK Sync Byte 2 (Sync Byte 0 first, then 1,2,3) // <15:8> 0x55 FSK Sync Byte 2 (Sync Byte 0 first, then 1,2,3)
// <7:0> 0xAA FSK Sync Byte 3 // <7:0> 0xAA FSK Sync Byte 3
// //
BK4819_WriteRegister(BK4819_REG_5B, 0); // bytes 2 & 3 not sent/used BK4819_WriteRegister(BK4819_REG_5B, 0xffff); // bytes 2 & 3 (not used)
// CRC setting (plus other stuff we don't know what) // CRC setting (plus other stuff we don't know what)
// //

Binary file not shown.

Binary file not shown.

View File

@ -6,8 +6,12 @@
#include "misc.h" #include "misc.h"
// MDC1200 sync bit reversals and packet header // MDC1200 sync bit reversals and packet header
static const uint8_t header[] = {0x00, 0x00, 0x00, 0x05, 0x55, 0x55, 0x55, 0x07, 0x09, 0x2a, 0x44, 0x6f}; //
//static const uint8_t header[] = {0x00, 0x00, 0x00, 0x0A, 0xAA, 0xAA, 0xAA, 0x07, 0x09, 0x2a, 0x44, 0x6f}; // 0000 0111 1011 0111 0010 0100 0000 1001 1001 1010
//
//static const uint8_t header[] = {0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, 0x07, 0x09, 0x2a, 0x44, 0x6f};
//static const uint8_t header[] = {0x00, 0x00, 0x00, 0xAA, 0xAA, 0xAA, 0xAA, 0x07, 0x09, 0x2a, 0x44, 0x6f};
static const uint8_t header[] = {0x00, 0x00, 0x00, 0xAA, 0xAA, 0xAA, 0xAA, 0x00, 0x97, 0x1f, 0xc4, 0x4e};
uint8_t bit_reverse_8(uint8_t n) uint8_t bit_reverse_8(uint8_t n)
{ {

View File

@ -137,7 +137,7 @@ void RADIO_InitInfo(vfo_info_t *p_vfo, const uint8_t ChannelSave, const uint32_t
p_vfo->p_tx = &p_vfo->freq_config_tx; p_vfo->p_tx = &p_vfo->freq_config_tx;
p_vfo->compand = 0; // off p_vfo->compand = 0; // off
p_vfo->squelch_level = 0; // use main squelch p_vfo->squelch_level = 0; // use main squelch
p_vfo->frequency_channel = 0xff; p_vfo->freq_in_channel = 0xff;
if (ChannelSave == (FREQ_CHANNEL_FIRST + BAND2_108MHz)) if (ChannelSave == (FREQ_CHANNEL_FIRST + BAND2_108MHz))
p_vfo->am_mode = 1; p_vfo->am_mode = 1;
@ -165,7 +165,7 @@ void RADIO_configure_channel(const unsigned int VFO, const unsigned int configur
Channel = g_eeprom.screen_channel[VFO]; Channel = g_eeprom.screen_channel[VFO];
p_vfo->frequency_channel = 0xff; p_vfo->freq_in_channel = 0xff;
if (IS_VALID_CHANNEL(Channel)) if (IS_VALID_CHANNEL(Channel))
{ {
@ -383,7 +383,7 @@ void RADIO_configure_channel(const unsigned int VFO, const unsigned int configur
RADIO_ConfigureSquelchAndOutputPower(p_vfo); RADIO_ConfigureSquelchAndOutputPower(p_vfo);
if (IS_FREQ_CHANNEL(Channel)) if (IS_FREQ_CHANNEL(Channel))
p_vfo->frequency_channel = BOARD_find_channel(Frequency); // remember if a channel has this frequency p_vfo->freq_in_channel = BOARD_find_channel(Frequency); // remember if a channel has this frequency
} }
void RADIO_ConfigureSquelchAndOutputPower(vfo_info_t *p_vfo) void RADIO_ConfigureSquelchAndOutputPower(vfo_info_t *p_vfo)

View File

@ -115,7 +115,7 @@ typedef struct vfo_info_t
uint8_t compand; uint8_t compand;
uint8_t frequency_channel; // channel number if the VFO's frequency is found stored in a channel uint8_t freq_in_channel; // channel number if the VFO's frequency is found stored in a channel
char name[16]; char name[16];
} vfo_info_t; } vfo_info_t;

View File

@ -760,10 +760,10 @@ void UI_DisplayMain(void)
if (IS_FREQ_CHANNEL(g_eeprom.screen_channel[vfo_num])) if (IS_FREQ_CHANNEL(g_eeprom.screen_channel[vfo_num]))
{ {
//g_eeprom.vfo_info[vfo_num].frequency_channel = BOARD_find_channel(frequency); //g_eeprom.vfo_info[vfo_num].freq_in_channel = BOARD_find_channel(frequency);
if (g_eeprom.vfo_info[vfo_num].frequency_channel <= USER_CHANNEL_LAST) if (g_eeprom.vfo_info[vfo_num].freq_in_channel <= USER_CHANNEL_LAST)
{ // the channel number that contains this VFO frequency { // the channel number that contains this VFO frequency
sprintf(String, "%03u", g_eeprom.vfo_info[vfo_num].frequency_channel); sprintf(String, "%03u", g_eeprom.vfo_info[vfo_num].freq_in_channel);
UI_PrintStringSmallest(String, x, (line + 0) * 8, false, true); UI_PrintStringSmallest(String, x, (line + 0) * 8, false, true);
} }
} }