0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-27 22:01:26 +03:00

Updated TX_UNLOCK menu option, renamed scanner files to remove confusion with freq/chan scanner

This commit is contained in:
OneOfEleven 2023-10-14 14:07:05 +01:00
parent c5859c2bf5
commit ca78b7411c
22 changed files with 76 additions and 58 deletions

View File

@ -2,7 +2,7 @@
# compile options (see README.md for descriptions)
# 0 = disable
# 1 = enable
#
ENABLE_CLANG := 0
ENABLE_SWD := 0
ENABLE_OVERLAY := 0
@ -27,7 +27,7 @@ ENABLE_WIDE_RX := 1
ENABLE_1250HZ_STEP := 1
ENABLE_TX_WHEN_AM := 0
ENABLE_F_CAL_MENU := 0
ENABLE_TX_EVERYWHERE := 0
ENABLE_TX_UNLOCK := 0
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
ENABLE_BOOT_BEEPS := 0
ENABLE_SHOW_CHARGE_LEVEL := 0
@ -135,7 +135,7 @@ endif
OBJS += app/generic.o
OBJS += app/main.o
OBJS += app/menu.o
OBJS += app/scanner.o
OBJS += app/search.o
ifeq ($(ENABLE_PANADAPTER),1)
OBJS += app/spectrum.o
endif
@ -172,7 +172,7 @@ ifeq ($(ENABLE_PWRON_PASSWORD),1)
endif
OBJS += ui/main.o
OBJS += ui/menu.o
OBJS += ui/scanner.o
OBJS += ui/search.o
OBJS += ui/status.o
OBJS += ui/ui.o
OBJS += ui/welcome.o
@ -301,8 +301,8 @@ endif
ifeq ($(ENABLE_F_CAL_MENU),1)
CFLAGS += -DENABLE_F_CAL_MENU
endif
ifeq ($(ENABLE_TX_EVERYWHERE),1)
CFLAGS += -DENABLE_TX_EVERYWHERE
ifeq ($(ENABLE_TX_UNLOCK),1)
CFLAGS += -DENABLE_TX_UNLOCK
endif
ifeq ($(ENABLE_CTCSS_TAIL_PHASE_SHIFT),1)
CFLAGS += -DENABLE_CTCSS_TAIL_PHASE_SHIFT

View File

@ -58,7 +58,7 @@ ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though fron
ENABLE_1250HZ_STEP := 1 enable smaller 1.25kHz frequency steps
ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM
ENABLE_F_CAL_MENU := 0 enable/disable the radios hidden frequency calibration menu
ENABLE_TX_EVERYWHERE := 0 '1' = allow TX everywhere EXCEPT airband (108~136) .. TX harmonic content will cause interference to other services, do so entirely at your own risk !
ENABLE_TX_UNLOCK := 0 '1' = allow TX everywhere EXCEPT airband (108~136) .. TX harmonic content will cause interference to other services, do so entirely at your own risk !
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1 standard CTCSS tail phase shift rather than QS's own 55Hz tone method
ENABLE_BOOT_BEEPS := 0 gives user audio feedback on volume knob position at boot-up
ENABLE_SHOW_CHARGE_LEVEL := 0 show the charge level when the radio is on charge

View File

@ -22,7 +22,7 @@
#ifdef ENABLE_FMRADIO
#include "app/fm.h"
#endif
#include "app/scanner.h"
#include "app/search.h"
#include "audio.h"
#include "bsp/dp32g030/gpio.h"
#ifdef ENABLE_FMRADIO

View File

@ -29,7 +29,7 @@
#include "app/generic.h"
#include "app/main.h"
#include "app/menu.h"
#include "app/scanner.h"
#include "app/search.h"
#include "app/uart.h"
#include "ARMCM0.h"
#include "audio.h"

View File

@ -20,7 +20,7 @@
#ifdef ENABLE_FMRADIO
#include "app/fm.h"
#endif
#include "app/scanner.h"
#include "app/search.h"
#include "bsp/dp32g030/gpio.h"
#include "audio.h"
#include "driver/bk4819.h"

View File

@ -22,7 +22,7 @@
#endif
#include "app/generic.h"
#include "app/menu.h"
#include "app/scanner.h"
#include "app/search.h"
#include "audio.h"
#include "driver/keyboard.h"
#include "driver/uart.h"

View File

@ -23,7 +23,7 @@
#endif
#include "app/generic.h"
#include "app/main.h"
#include "app/scanner.h"
#include "app/search.h"
#include "audio.h"
#include "board.h"
#include "driver/bk4819.h"

View File

@ -22,7 +22,7 @@
#include "app/dtmf.h"
#include "app/generic.h"
#include "app/menu.h"
#include "app/scanner.h"
#include "app/search.h"
#include "audio.h"
#include "board.h"
#include "bsp/dp32g030/gpio.h"

View File

@ -16,7 +16,7 @@
#include "app/dtmf.h"
#include "app/generic.h"
#include "app/scanner.h"
#include "app/search.h"
#include "audio.h"
#include "board.h"
#include "driver/bk4819.h"

View File

@ -723,7 +723,11 @@ void BOARD_EEPROM_load(void)
// 0F40..0F47
EEPROM_ReadBuffer(0x0F40, Data, 8);
g_setting_freq_lock = (Data[0] < 6) ? Data[0] : FREQ_LOCK_OFF;
#ifdef ENABLE_TX_UNLOCK
g_setting_freq_lock = (Data[0] < 7) ? Data[0] : FREQ_LOCK_NORMAL;
#else
g_setting_freq_lock = (Data[0] < 6) ? Data[0] : FREQ_LOCK_NORMAL;
#endif
g_setting_350_tx_enable = (Data[1] < 2) ? Data[1] : false; // was true
g_setting_killed = (Data[2] < 2) ? Data[2] : false;
g_setting_200_tx_enable = (Data[3] < 2) ? Data[3] : false;

Binary file not shown.

Binary file not shown.

View File

@ -148,24 +148,20 @@ int TX_freq_check(const uint32_t Frequency)
switch (g_setting_freq_lock)
{
case FREQ_LOCK_OFF:
#ifdef ENABLE_TX_EVERYWHERE
case FREQ_LOCK_NORMAL:
if (Frequency >= 13600000 && Frequency < 17400000)
return 0;
#else
if (Frequency >= 13600000 && Frequency < 17400000)
if (Frequency >= 17400000 && Frequency < 35000000)
if (g_setting_200_tx_enable)
return 0;
if (Frequency >= 17400000 && Frequency < 35000000)
if (g_setting_200_tx_enable)
return 0;
if (Frequency >= 35000000 && Frequency < 40000000)
if (g_setting_350_tx_enable && g_setting_350_enable)
return 0;
if (Frequency >= 40000000 && Frequency < 47000000)
if (Frequency >= 35000000 && Frequency < 40000000)
if (g_setting_350_tx_enable && g_setting_350_enable)
return 0;
if (Frequency >= 40000000 && Frequency < 47000000)
return 0;
if (Frequency >= 47000000 && Frequency <= 60000000)
if (g_setting_500_tx_enable)
return 0;
if (Frequency >= 47000000 && Frequency <= 60000000)
if (g_setting_500_tx_enable)
return 0;
#endif
break;
case FREQ_LOCK_FCC:
@ -202,6 +198,11 @@ int TX_freq_check(const uint32_t Frequency)
if (Frequency >= 40000000 && Frequency < 43800000)
return 0;
break;
#ifdef ENABLE_TX_UNLOCK
case FREQ_LOCK_TX_UNLOCK:
return 0;
#endif
}
// dis-allowed TX frequency

View File

@ -17,7 +17,7 @@
#ifdef ENABLE_FMRADIO
#include "app/fm.h"
#endif
#include "app/scanner.h"
#include "app/search.h"
#include "audio.h"
#include "functions.h"
#include "helper/battery.h"

View File

@ -32,12 +32,15 @@ enum pwr_on_display_mode_e {
typedef enum pwr_on_display_mode_e pwr_on_display_mode_t;
enum {
FREQ_LOCK_OFF = 0,
FREQ_LOCK_NORMAL = 0,
FREQ_LOCK_FCC,
FREQ_LOCK_CE,
FREQ_LOCK_GB,
FREQ_LOCK_430,
FREQ_LOCK_438
FREQ_LOCK_438,
#ifdef ENABLE_TX_UNLOCK
FREQ_LOCK_TX_UNLOCK
#endif
};
enum {

View File

@ -281,15 +281,28 @@ const char g_sub_menu_RESET[2][4] =
"ALL"
};
const char g_sub_menu_freq_lock[6][8] =
{
"OFF",
"FCC",
"CE",
"GB",
"430 MHz",
"438 MHz"
};
#ifdef ENABLE_TX_UNLOCK
const char g_sub_menu_freq_lock[7][9] =
{
"NORMAL",
"FCC",
"CE",
"GB",
"430 MHz",
"438 MHz",
"UNLOCKED"
};
#else
const char g_sub_menu_freq_lock[6][8] =
{
"NORMAL",
"FCC",
"CE",
"GB",
"430 MHz",
"438 MHz"
};
#endif
const char g_sub_menu_backlight[8][7] =
{
@ -1015,14 +1028,7 @@ void UI_DisplayMenu(void)
break;
case MENU_FREQ_LOCK:
#ifdef ENABLE_TX_EVERYWHERE
if (g_sub_menu_selection == FREQ_LOCK_OFF)
strcpy(String, " WARNING!\nTX\nUNLOCKED");
else
strcpy(String, g_sub_menu_freq_lock[g_sub_menu_selection]);
#else
strcpy(String, g_sub_menu_freq_lock[g_sub_menu_selection]);
#endif
strcpy(String, g_sub_menu_freq_lock[g_sub_menu_selection]);
break;
#ifdef ENABLE_F_CAL_MENU

View File

@ -165,7 +165,11 @@ extern const char g_sub_menu_PTT_ID[5][15];
extern const char g_sub_menu_pwr_on_msg[4][14];
extern const char g_sub_menu_roger_mode[3][16];
extern const char g_sub_menu_RESET[2][4];
extern const char g_sub_menu_freq_lock[6][8];
#ifdef ENABLE_TX_UNLOCK
extern const char g_sub_menu_freq_lock[7][9];
#else
extern const char g_sub_menu_freq_lock[6][8];
#endif
extern const char g_sub_menu_backlight[8][7];
extern const char g_sub_menu_rx_tx[4][6];
#ifdef ENABLE_AM_FIX_TEST1

View File

@ -17,7 +17,7 @@
#include <stdbool.h>
#include <string.h>
#include "app/scanner.h"
#include "app/search.h"
#include "board.h"
#include "dcs.h"
#include "driver/st7565.h"
@ -26,7 +26,7 @@
#include "misc.h"
#include "radio.h"
#include "ui/helper.h"
#include "ui/scanner.h"
#include "ui/search.h"
#include "ui/ui.h"
void UI_DisplaySearch(void)

View File

@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef UI_SCANNER_H
#define UI_SCANNER_H
#ifndef UI_SEARCH_H
#define UI_SEARCH_H
void UI_DisplaySearch(void);

View File

@ -16,7 +16,7 @@
#include <string.h>
#include "app/scanner.h"
#include "app/search.h"
#ifdef ENABLE_FMRADIO
#include "app/fm.h"
#endif

View File

@ -20,7 +20,7 @@
#ifdef ENABLE_FMRADIO
#include "app/fm.h"
#endif
#include "app/scanner.h"
#include "app/search.h"
#include "driver/keyboard.h"
#include "misc.h"
#ifdef ENABLE_AIRCOPY
@ -32,7 +32,7 @@
#include "ui/inputbox.h"
#include "ui/main.h"
#include "ui/menu.h"
#include "ui/scanner.h"
#include "ui/search.h"
#include "ui/ui.h"
gui_display_type_t g_screen_to_display;