First measurement function

tinySA
erikkaashoek 6 years ago
parent a121457164
commit 0575aed87b

@ -458,7 +458,7 @@ void update_rbw(void)
//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 = 433900000;
static const unsigned int spur_alternate_IF = 433700000; static const unsigned int spur_alternate_IF = 434100000;
static const int spur_table[] = static const int spur_table[] =
{ {
470000, 470000,
@ -569,7 +569,7 @@ float perform(bool break_on_operation, int i, int32_t f, int tracking)
} }
#define MAX_MAX 4 #define MAX_MAX 4
#define MAX_NOISE 20 // 10dB #define MAX_NOISE 10 // 10dB
int16_t max_index[MAX_MAX]; int16_t max_index[MAX_MAX];
int16_t cur_max = 0; int16_t cur_max = 0;

@ -342,6 +342,34 @@ static void menu_spur_cb(int item, uint8_t data)
} }
#endif #endif
static void menu_measure_cb(int item, uint8_t data)
{
(void)item;
switch(data) {
case 0: // IMD
for (int i = 0; i< MARKERS_MAX; i++) {
markers[i].enabled = M_TRACKING_ENABLED;
markers[i].mtype = M_DELTA;
}
markers[0].mtype = M_REFERENCE;
break;
case 1:
for (int i = 0; i< MARKERS_MAX; i++) {
markers[i].enabled = M_TRACKING_ENABLED;
markers[i].mtype = M_DELTA;
}
markers[0].mtype = M_REFERENCE;
break;
case 2:
break;
case 3:
break;
}
menu_move_back();
ui_mode_normal();
// draw_cal_status();
}
static void menu_storage_cb(int item, uint8_t data) static void menu_storage_cb(int item, uint8_t data)
{ {
(void)item; (void)item;
@ -717,6 +745,12 @@ static const menuitem_t menu_settings[] =
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
static const menuitem_t menu_measure[] = {
{ MT_CALLBACK, 0, "IMD", menu_measure_cb},
{ MT_CALLBACK, 1, "IIP3", menu_measure_cb},
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel
};
static const menuitem_t menu_settingshigh2[] = static const menuitem_t menu_settingshigh2[] =
{ {
@ -774,6 +808,7 @@ const menuitem_t menu_top[] = {
{ MT_SUBMENU, 0, "SCAN", menu_stimulus}, { MT_SUBMENU, 0, "SCAN", menu_stimulus},
{ MT_SUBMENU, 0, "DISPLAY", menu_display}, { MT_SUBMENU, 0, "DISPLAY", menu_display},
{ MT_SUBMENU, 0, "MARKER", menu_marker}, { MT_SUBMENU, 0, "MARKER", menu_marker},
{ MT_SUBMENU, 0, "MEASURE", menu_measure},
{ MT_SUBMENU, 0, "SETTINGS", menu_settings}, { MT_SUBMENU, 0, "SETTINGS", menu_settings},
{ MT_CANCEL, 0, S_LARROW" MODE",NULL}, { MT_CANCEL, 0, S_LARROW" MODE",NULL},
{ MT_NONE, 0, NULL, NULL } // sentinel, { MT_NONE, 0, NULL, NULL } // sentinel,
@ -786,6 +821,7 @@ const menuitem_t menu_tophigh[] =
{ MT_SUBMENU, 0, "SCAN", menu_stimulus}, { MT_SUBMENU, 0, "SCAN", menu_stimulus},
{ MT_SUBMENU, 0, "DISPLAY", menu_display}, { MT_SUBMENU, 0, "DISPLAY", menu_display},
{ MT_SUBMENU, 0, "MARKER", menu_marker}, { MT_SUBMENU, 0, "MARKER", menu_marker},
{ MT_SUBMENU, 0, "MEASURE", menu_measure},
{ MT_SUBMENU, 0, "SETTINGS", menu_settings}, { MT_SUBMENU, 0, "SETTINGS", menu_settings},
{ MT_CANCEL, 0, S_LARROW" MODE",NULL}, { MT_CANCEL, 0, S_LARROW" MODE",NULL},
{ MT_NONE, 0, NULL, NULL } // sentinel, { MT_NONE, 0, NULL, NULL } // sentinel,

Loading…
Cancel
Save

Powered by TurnKey Linux.