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

fix aircopy

This commit is contained in:
OneOfEleven 2023-11-03 22:49:29 +00:00
parent fca972a2f2
commit 2c007d7e50
7 changed files with 97 additions and 67 deletions

View File

@ -21,7 +21,7 @@ ENABLE_AIRCOPY_RX_REBOOT := 0
ENABLE_FMRADIO_64_76 := 0 ENABLE_FMRADIO_64_76 := 0
ENABLE_FMRADIO_76_90 := 0 ENABLE_FMRADIO_76_90 := 0
ENABLE_FMRADIO_76_108 := 0 ENABLE_FMRADIO_76_108 := 0
ENABLE_FMRADIO_875_108 := 1 ENABLE_FMRADIO_875_108 := 0
ENABLE_FMRADIO_64_108 := 0 ENABLE_FMRADIO_64_108 := 0
# NOAA 1.2 kB # NOAA 1.2 kB
ENABLE_NOAA := 0 ENABLE_NOAA := 0
@ -36,7 +36,7 @@ ENABLE_REDUCE_LOW_MID_TX_POWER := 1
ENABLE_ALARM := 0 ENABLE_ALARM := 0
ENABLE_TX1750 := 0 ENABLE_TX1750 := 0
# MDC1200 2.8 kB # MDC1200 2.8 kB
ENABLE_MDC1200 := 0 ENABLE_MDC1200 := 1
ENABLE_MDC1200_SHOW_OP_ARG := 1 ENABLE_MDC1200_SHOW_OP_ARG := 1
ENABLE_PWRON_PASSWORD := 0 ENABLE_PWRON_PASSWORD := 0
ENABLE_RESET_AES_KEY := 0 ENABLE_RESET_AES_KEY := 0

View File

@ -693,7 +693,7 @@ static void AIRCOPY_Key_DIGITS(key_code_t Key, bool key_pressed, bool key_held)
g_another_voice_id = (voice_id_t)Key; g_another_voice_id = (voice_id_t)Key;
#endif #endif
g_rx_vfo->band = i; g_rx_vfo->channel_attributes.band = i;
// round the frequency to nearest step size // round the frequency to nearest step size
Frequency = ((Frequency + (g_rx_vfo->step_freq / 2)) / g_rx_vfo->step_freq) * g_rx_vfo->step_freq; Frequency = ((Frequency + (g_rx_vfo->step_freq / 2)) / g_rx_vfo->step_freq) * g_rx_vfo->step_freq;

Binary file not shown.

Binary file not shown.

View File

@ -80,8 +80,8 @@ void BOOT_ProcessMode(boot_mode_t Mode)
RADIO_InitInfo(g_rx_vfo, FREQ_CHANNEL_LAST - 1, g_aircopy_freq); RADIO_InitInfo(g_rx_vfo, FREQ_CHANNEL_LAST - 1, g_aircopy_freq);
g_rx_vfo->channel_bandwidth = BANDWIDTH_WIDE; g_rx_vfo->channel.channel_bandwidth = BANDWIDTH_WIDE;
g_rx_vfo->output_power = OUTPUT_POWER_LOW; g_rx_vfo->channel.tx_power = OUTPUT_POWER_LOW;
RADIO_ConfigureSquelchAndOutputPower(g_rx_vfo); RADIO_ConfigureSquelchAndOutputPower(g_rx_vfo);

View File

@ -39,6 +39,8 @@
#include "ui/menu.h" #include "ui/menu.h"
#include "ui/ui.h" #include "ui/ui.h"
//#define SHOW_RX_TEST_VALUES
center_line_t g_center_line = CENTER_LINE_NONE; center_line_t g_center_line = CENTER_LINE_NONE;
// *************************************************************************** // ***************************************************************************
@ -165,10 +167,36 @@ void UI_drawBars(uint8_t *p, const unsigned int level)
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR #ifdef ENABLE_RX_SIGNAL_BAR
bool UI_DisplayRSSIBar(const int16_t rssi, const int16_t glitch, const int16_t noise, const bool now) bool UI_DisplayRSSIBar(const int16_t rssi, const uint16_t glitch, const uint16_t noise, const bool now)
{ {
if (g_eeprom.config.setting.enable_rssi_bar) if (g_eeprom.config.setting.enable_rssi_bar)
{ {
#ifdef SHOW_RX_TEST_VALUES
const unsigned int line = 3;
uint8_t *p_line = g_frame_buffer[line];
char str[22];
#ifdef ENABLE_KEYLOCK
if (g_eeprom.config.setting.key_lock && g_keypad_locked > 0)
return false; // display is in use
#endif
if (g_current_function == FUNCTION_TRANSMIT || g_current_display_screen != DISPLAY_MAIN || g_dtmf_call_state != DTMF_CALL_STATE_NONE)
return false; // display is in use
if (now)
memset(p_line, 0, LCD_WIDTH);
sprintf(str, "r %3u g %3u n %3u", (uint16_t )rssi, glitch, noise);
UI_PrintStringSmall(str, 2, 0, line);
if (now)
ST7565_BlitFullScreen();
return true;
#else
(void)glitch; // TODO: (void)glitch; // TODO:
(void)noise; (void)noise;
@ -229,13 +257,15 @@ void UI_drawBars(uint8_t *p, const unsigned int level)
ST7565_BlitFullScreen(); ST7565_BlitFullScreen();
return true; return true;
#endif
} }
return false; return false;
} }
#endif #endif
void UI_update_rssi(const int16_t rssi, const int16_t glitch, const int16_t noise, const int vfo) void UI_update_rssi(const int16_t rssi, const uint16_t glitch, const uint16_t noise, const int vfo)
{ {
#ifdef ENABLE_RX_SIGNAL_BAR #ifdef ENABLE_RX_SIGNAL_BAR
if (g_center_line == CENTER_LINE_RSSI) if (g_center_line == CENTER_LINE_RSSI)

View File

@ -34,7 +34,7 @@ extern center_line_t g_center_line;
#ifdef ENABLE_TX_AUDIO_BAR #ifdef ENABLE_TX_AUDIO_BAR
bool UI_DisplayAudioBar(const bool now); bool UI_DisplayAudioBar(const bool now);
#endif #endif
void UI_update_rssi(const int16_t rssi, const int16_t glitch, const int16_t noise, const int vfo); void UI_update_rssi(const int16_t rssi, const uint16_t glitch, const uint16_t noise, const int vfo);
void UI_DisplayMain(void); void UI_DisplayMain(void);
#endif #endif