Powerlevels, spur table and marker menu update

tinySA
erikkaashoek 6 years ago
parent 92119ca101
commit 01a665f306

@ -606,12 +606,28 @@ search_maximum(int m, int center, int span)
} }
//static int spur_old_stepdelay = 0; //static int spur_old_stepdelay = 0;
static const unsigned int spur_IF = 433900000; static const unsigned int spur_IF = 433800000;
static const unsigned int spur_alternate_IF = 434100000; static const unsigned int spur_alternate_IF = 434000000;
static const int spur_table[] = static const int spur_table[] =
{ {
470000, 870000,
780000, 970000,
1460000,
1610000,
1840000,
2840000,
2890000,
2970000,
4780000,
4810000,
4850000,
4880000,
8100000,
8140000,
10870000,
14880000,
#ifdef IF_AT_4339
780000,
830000, 830000,
880000, 880000,
949000, 949000,
@ -639,13 +655,14 @@ static const int spur_table[] =
11420000, 11420000,
14880000, 14880000,
16820000, 16820000,
#endif
}; };
int avoid_spur(int f) int avoid_spur(int f)
{ {
int window = ((int)actual_rbw ) * 1000*2; int window = ((int)actual_rbw ) * 1000*2;
if (window < 50000) // if (window < 50000)
window = 50000; // window = 50000;
if (! setting_mode == M_LOW || frequency_IF != spur_IF || actual_rbw > 300.0) if (! setting_mode == M_LOW || frequency_IF != spur_IF || actual_rbw > 300.0)
return(false); return(false);
for (unsigned int i = 0; i < (sizeof spur_table)/sizeof(int); i++) { for (unsigned int i = 0; i < (sizeof spur_table)/sizeof(int); i++) {

@ -126,6 +126,7 @@ static void choose_active_marker(void);
static void menu_move_back(void); static void menu_move_back(void);
static void menu_push_submenu(const menuitem_t *submenu); static void menu_push_submenu(const menuitem_t *submenu);
static const menuitem_t menu_marker_type[];
static int btn_check(void) static int btn_check(void)
{ {
@ -842,6 +843,9 @@ menu_marker_sel_cb(int item, uint8_t data)
markers[item].enabled = M_TRACKING_ENABLED; // default tracking enabled markers[item].enabled = M_TRACKING_ENABLED; // default tracking enabled
active_marker_select(item); active_marker_select(item);
} }
if (markers[item].enabled)
menu_push_submenu(menu_marker_type);
} else if (item == 4) { /* all off */ } else if (item == 4) { /* all off */
for (t = 0; t < MARKERS_MAX; t++) for (t = 0; t < MARKERS_MAX; t++)
markers[t].enabled = M_DISABLED; markers[t].enabled = M_DISABLED;

@ -529,9 +529,9 @@ const char *menu_drive_text[]={"-24dBm","-20dBm","-16dBm","-12dBm"," 6dBm"," 10
static const menuitem_t menu_drive[] = { static const menuitem_t menu_drive[] = {
{ MT_CALLBACK, 3, " 20dBm", menu_drive_cb}, { MT_CALLBACK, 3, " 20dBm", menu_drive_cb},
{ MT_CALLBACK, 2, " 15dBm", menu_drive_cb}, { MT_CALLBACK, 2, " 16dBm", menu_drive_cb},
{ MT_CALLBACK, 1, " 10dBm", menu_drive_cb}, { MT_CALLBACK, 1, " 12dBm", menu_drive_cb},
{ MT_CALLBACK, 0, " 5dBm", menu_drive_cb}, { MT_CALLBACK, 0, " 8dBm", menu_drive_cb},
{ MT_CANCEL, 255, S_LARROW" BACK", NULL }, { MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };

Loading…
Cancel
Save

Powered by TurnKey Linux.