mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
fix tx offset display
This commit is contained in:
parent
e83aac104f
commit
9819afa405
@ -138,8 +138,8 @@ void toggle_chan_scanlist(void)
|
|||||||
const unsigned int channel = FREQ_CHANNEL_FIRST + g_vfo_info[vfo].channel_attributes.band;
|
const unsigned int channel = FREQ_CHANNEL_FIRST + g_vfo_info[vfo].channel_attributes.band;
|
||||||
|
|
||||||
g_eeprom.config.setting.indices.vfo[vfo].screen = channel;
|
g_eeprom.config.setting.indices.vfo[vfo].screen = channel;
|
||||||
g_vfo_info[vfo].channel_save = channel;
|
g_vfo_info[vfo].channel_save = channel;
|
||||||
g_eeprom.config.setting.tx_vfo_num = vfo;
|
// g_eeprom.config.setting.tx_vfo_num = vfo;
|
||||||
|
|
||||||
RADIO_select_vfos();
|
RADIO_select_vfos();
|
||||||
RADIO_apply_offset(g_tx_vfo, false);
|
RADIO_apply_offset(g_tx_vfo, false);
|
||||||
@ -151,10 +151,10 @@ void toggle_chan_scanlist(void)
|
|||||||
// find the first channel that contains this frequency
|
// find the first channel that contains this frequency
|
||||||
g_tx_vfo->freq_in_channel = SETTINGS_find_channel(g_tx_vfo->freq_config_tx.frequency);
|
g_tx_vfo->freq_in_channel = SETTINGS_find_channel(g_tx_vfo->freq_config_tx.frequency);
|
||||||
|
|
||||||
SETTINGS_save_channel(g_tx_vfo->channel_save, g_eeprom.config.setting.tx_vfo_num, g_tx_vfo, 2);
|
SETTINGS_save_channel(channel, vfo, g_tx_vfo, 2);
|
||||||
|
|
||||||
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
|
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
|
||||||
// UART_printf("chan-vfo %u\r\n", g_tx_vfo->channel_save);
|
// UART_printf("chan-vfo %u\r\n", channel);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_beep_to_play = BEEP_880HZ_60MS_TRIPLE_BEEP;
|
g_beep_to_play = BEEP_880HZ_60MS_TRIPLE_BEEP;
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
6
radio.c
6
radio.c
@ -644,12 +644,12 @@ void RADIO_apply_offset(vfo_info_t *p_vfo, const bool set_pees)
|
|||||||
{
|
{
|
||||||
case TX_OFFSET_FREQ_DIR_OFF:
|
case TX_OFFSET_FREQ_DIR_OFF:
|
||||||
break;
|
break;
|
||||||
case TX_OFFSET_FREQ_DIR_ADD:
|
|
||||||
Frequency += p_vfo->channel.tx_offset;
|
|
||||||
break;
|
|
||||||
case TX_OFFSET_FREQ_DIR_SUB:
|
case TX_OFFSET_FREQ_DIR_SUB:
|
||||||
Frequency -= p_vfo->channel.tx_offset;
|
Frequency -= p_vfo->channel.tx_offset;
|
||||||
break;
|
break;
|
||||||
|
case TX_OFFSET_FREQ_DIR_ADD:
|
||||||
|
Frequency += p_vfo->channel.tx_offset;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Frequency < FREQ_BAND_TABLE[0].lower)
|
if (Frequency < FREQ_BAND_TABLE[0].lower)
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
#include "driver/backlight.h"
|
#include "driver/backlight.h"
|
||||||
#include "driver/bk4819.h"
|
#include "driver/bk4819.h"
|
||||||
#include "driver/st7565.h"
|
#include "driver/st7565.h"
|
||||||
|
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
|
||||||
|
#include "driver/uart.h"
|
||||||
|
#endif
|
||||||
#include "external/printf/printf.h"
|
#include "external/printf/printf.h"
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
@ -752,7 +755,11 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const uint32_t frequency = (g_current_function == FUNCTION_TRANSMIT) ? g_vfo_info[vfo_num].p_rx->frequency : g_vfo_info[vfo_num].p_tx->frequency;
|
const uint32_t frequency = (g_current_function == FUNCTION_TRANSMIT) ? g_vfo_info[vfo_num].p_tx->frequency : g_vfo_info[vfo_num].p_rx->frequency;
|
||||||
|
|
||||||
|
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
|
||||||
|
// UART_printf("%u.%05u MHz\n", frequency / 100000, frequency % 100000);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (scrn_chan <= USER_CHANNEL_LAST)
|
if (scrn_chan <= USER_CHANNEL_LAST)
|
||||||
{ // a user channel
|
{ // a user channel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user