mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 22:58:04 +03:00
AIRCOPY TX power reduced from full power to it's bare minimum (a couple of mW's).
This commit is contained in:
@ -44,10 +44,13 @@ uint16_t g_aircopy_fsk_buffer[36];
|
||||
uint8_t g_aircopy_send_count_down_10ms;
|
||||
unsigned int g_aircopy_fsk_write_index;
|
||||
|
||||
void AIRCOPY_SendMessage(void)
|
||||
void AIRCOPY_SendMessage(const uint8_t request_packet)
|
||||
{
|
||||
unsigned int i;
|
||||
const uint16_t eeprom_addr = (uint16_t)g_aircopy_block_number * 64;
|
||||
|
||||
// will be used to ask the TX/ing radio to resend a missing/corrupted packet
|
||||
(void)request_packet;
|
||||
|
||||
// *********
|
||||
|
||||
@ -72,11 +75,12 @@ void AIRCOPY_SendMessage(void)
|
||||
for (i = 0; i < 34; i++)
|
||||
g_aircopy_fsk_buffer[1 + i] ^= Obfuscation[i % ARRAY_SIZE(Obfuscation)];
|
||||
|
||||
// TX the packet
|
||||
RADIO_SetTxParameters();
|
||||
|
||||
BK4819_SetupPowerAmplifier(0, g_current_vfo->pTX->frequency); // VERY low TX power
|
||||
BK4819_SendFSKData(g_aircopy_fsk_buffer);
|
||||
BK4819_SetupPowerAmplifier(0, 0);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1, false);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO5_PIN1, false);
|
||||
|
||||
if (++g_aircopy_block_number >= g_aircopy_block_max)
|
||||
{
|
||||
@ -250,11 +254,11 @@ static void AIRCOPY_Key_MENU(bool key_pressed, bool key_held)
|
||||
|
||||
g_aircopy_fsk_write_index = 0;
|
||||
g_aircopy_block_number = 0;
|
||||
g_aircopy_fsk_buffer[0] = AIRCOPY_MAGIC_START;
|
||||
g_aircopy_fsk_buffer[1] = 0; // block number
|
||||
g_aircopy_fsk_buffer[35] = AIRCOPY_MAGIC_END;
|
||||
|
||||
AIRCOPY_SendMessage();
|
||||
// send initial packet
|
||||
//AIRCOPY_SendMessage(0xff);
|
||||
|
||||
g_aircopy_send_count_down_10ms = 30 / 10; // 30ms
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ extern uint16_t g_aircopy_fsk_buffer[36];
|
||||
extern uint8_t g_aircopy_send_count_down_10ms;
|
||||
extern unsigned int g_aircopy_fsk_write_index;
|
||||
|
||||
void AIRCOPY_SendMessage(void);
|
||||
void AIRCOPY_SendMessage(const uint8_t request_packet);
|
||||
void AIRCOPY_StorePacket(void);
|
||||
void AIRCOPY_ProcessKeys(key_code_t key, bool key_pressed, bool key_held);
|
||||
|
||||
|
14
app/app.c
14
app/app.c
@ -916,13 +916,13 @@ void APP_CheckRadioInterrupts(void)
|
||||
if (interrupt_status_bits & BK4819_REG_02_SQUELCH_LOST)
|
||||
{
|
||||
g_squelch_lost = true;
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_GREEN, true);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO0_PIN28_GREEN, true);
|
||||
}
|
||||
|
||||
if (interrupt_status_bits & BK4819_REG_02_SQUELCH_FOUND)
|
||||
{
|
||||
g_squelch_lost = false;
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_GREEN, false);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO0_PIN28_GREEN, false);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
@ -1298,7 +1298,7 @@ void APP_Update(void)
|
||||
|
||||
BK4819_DisableVox();
|
||||
BK4819_Sleep();
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2, false);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO6_PIN2, false);
|
||||
|
||||
// Authentic device checked removed
|
||||
|
||||
@ -1562,7 +1562,7 @@ void APP_TimeSlice10ms(void)
|
||||
{
|
||||
if (--g_aircopy_send_count_down_10ms == 0)
|
||||
{
|
||||
AIRCOPY_SendMessage();
|
||||
AIRCOPY_SendMessage(0xff);
|
||||
GUI_DisplayScreen();
|
||||
}
|
||||
}
|
||||
@ -1639,9 +1639,9 @@ void APP_TimeSlice10ms(void)
|
||||
|
||||
RADIO_EnableCxCSS();
|
||||
BK4819_SetupPowerAmplifier(0, 0);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1, false);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO5_PIN1, false);
|
||||
BK4819_Enable_AfDac_DiscMode_TxDsp();
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_RED, false);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO1_PIN29_RED, false);
|
||||
|
||||
GUI_DisplayScreen();
|
||||
}
|
||||
@ -1651,7 +1651,7 @@ void APP_TimeSlice10ms(void)
|
||||
|
||||
GUI_DisplayScreen();
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_RED, true);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO1_PIN29_RED, true);
|
||||
RADIO_SetTxParameters();
|
||||
BK4819_TransmitTone(true, 500);
|
||||
SYSTEM_DelayMs(2);
|
||||
|
@ -364,7 +364,7 @@ static void ToggleRX(bool on) {
|
||||
ToggleTX(false);
|
||||
}
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_GREEN, on);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO0_PIN28_GREEN, on);
|
||||
BK4819_RX_TurnOn();
|
||||
|
||||
ToggleAudio(on);
|
||||
@ -399,7 +399,7 @@ static void ToggleTX(bool on) {
|
||||
ToggleRX(false);
|
||||
}
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_RED, on);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO1_PIN29_RED, on);
|
||||
|
||||
if (on) {
|
||||
ToggleAudio(false);
|
||||
@ -434,8 +434,8 @@ static void ToggleTX(bool on) {
|
||||
|
||||
SetF(fMeasure);
|
||||
}
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2, !on);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1, on);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO6_PIN2, !on);
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO5_PIN1, on);
|
||||
}
|
||||
|
||||
// Scan info
|
||||
|
Reference in New Issue
Block a user