mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 06:11:24 +03:00
No refunds !
This commit is contained in:
parent
428ca596e6
commit
bfe2a116e2
2
Makefile
2
Makefile
@ -31,7 +31,7 @@ ENABLE_REDUCE_LOW_MID_TX_POWER := 1
|
||||
# Tx Alarm 0.6 kB
|
||||
ENABLE_ALARM := 0
|
||||
ENABLE_TX1750 := 0
|
||||
ENABLE_MDC1200 := 0
|
||||
ENABLE_MDC1200 := 1
|
||||
ENABLE_PWRON_PASSWORD := 0
|
||||
ENABLE_RESET_AES_KEY := 1
|
||||
ENABLE_BIG_FREQ := 0
|
||||
|
@ -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
|
||||
even brick your radio(s), at which point, maybe find a quiet corner to sob your hert out in.
|
||||
|
||||
NO REFUNDS, ever !
|
||||
|
||||
## Radio performance
|
||||
|
||||
Please note that the Quansheng UV-Kx radios are not professional quality transceivers, their
|
||||
|
@ -2823,7 +2823,7 @@ Skip:
|
||||
|
||||
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_call_state = DTMF_CALL_STATE_NONE;
|
||||
|
10
app/main.c
10
app/main.c
@ -118,7 +118,7 @@ void toggle_chan_scanlist(void)
|
||||
RADIO_setup_registers(true);
|
||||
|
||||
// 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;
|
||||
|
||||
@ -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;
|
||||
|
||||
// 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
|
||||
#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;
|
||||
|
||||
// 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
|
||||
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
|
||||
//
|
||||
//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
|
||||
//if (key_held && key_pressed)
|
||||
g_tx_vfo->frequency_channel = 0xff;
|
||||
g_tx_vfo->freq_in_channel = 0xff;
|
||||
|
||||
if (new_band != old_band)
|
||||
{ // original slow method
|
||||
|
@ -2089,14 +2089,14 @@ void BK4819_PlayRogerMDC1200(void)
|
||||
// <15:8> 0x55 FSK Sync Byte 0 (Sync Byte 0 first, then 1,2,3)
|
||||
// <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
|
||||
//
|
||||
// <15:8> 0x55 FSK Sync Byte 2 (Sync Byte 0 first, then 1,2,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)
|
||||
//
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -6,8 +6,12 @@
|
||||
#include "misc.h"
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
6
radio.c
6
radio.c
@ -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->compand = 0; // off
|
||||
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))
|
||||
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];
|
||||
|
||||
p_vfo->frequency_channel = 0xff;
|
||||
p_vfo->freq_in_channel = 0xff;
|
||||
|
||||
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);
|
||||
|
||||
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)
|
||||
|
2
radio.h
2
radio.h
@ -115,7 +115,7 @@ typedef struct vfo_info_t
|
||||
|
||||
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];
|
||||
} vfo_info_t;
|
||||
|
@ -760,10 +760,10 @@ void UI_DisplayMain(void)
|
||||
|
||||
if (IS_FREQ_CHANNEL(g_eeprom.screen_channel[vfo_num]))
|
||||
{
|
||||
//g_eeprom.vfo_info[vfo_num].frequency_channel = BOARD_find_channel(frequency);
|
||||
if (g_eeprom.vfo_info[vfo_num].frequency_channel <= USER_CHANNEL_LAST)
|
||||
//g_eeprom.vfo_info[vfo_num].freq_in_channel = BOARD_find_channel(frequency);
|
||||
if (g_eeprom.vfo_info[vfo_num].freq_in_channel <= USER_CHANNEL_LAST)
|
||||
{ // 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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user