|
|
|
@ -65,54 +65,33 @@ extern int setting_step_delay;
|
|
|
|
void blit16BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height,
|
|
|
|
void blit16BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height,
|
|
|
|
const uint16_t *bitmap);
|
|
|
|
const uint16_t *bitmap);
|
|
|
|
|
|
|
|
|
|
|
|
const uint16_t icons [] =
|
|
|
|
const uint16_t left_icons [] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
#define I_EMPTY 0*16
|
|
|
|
/* Character 0 (0x00):
|
|
|
|
0x0000,
|
|
|
|
width 16
|
|
|
|
0x0000,
|
|
|
|
+-----------------+
|
|
|
|
0x0000,
|
|
|
|
| |
|
|
|
|
0x0001,
|
|
|
|
| *************** |
|
|
|
|
0x0001,
|
|
|
|
| * * |
|
|
|
|
0x0001,
|
|
|
|
|** * |
|
|
|
|
0x0000,
|
|
|
|
| * * * |
|
|
|
|
0x0000,
|
|
|
|
| * * * |
|
|
|
|
0x0000,
|
|
|
|
| * * * * |
|
|
|
|
0x0000,
|
|
|
|
| * * * * |
|
|
|
|
0x0001,
|
|
|
|
| * * * * * |
|
|
|
|
0x0001,
|
|
|
|
| * * * * * * |
|
|
|
|
0x0001,
|
|
|
|
| * * * * * * * |
|
|
|
|
0x0000,
|
|
|
|
| * * * * * * * |
|
|
|
|
|
|
|
|
|** *********** * |
|
|
|
|
|
|
|
|
| * * |
|
|
|
|
|
|
|
|
| *************** |
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
+-----------------+ */
|
|
|
|
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x7fff,
|
|
|
|
|
|
|
|
0x4001,
|
|
|
|
|
|
|
|
0xc001,
|
|
|
|
|
|
|
|
0x4001,
|
|
|
|
|
|
|
|
0x4001,
|
|
|
|
|
|
|
|
0x4801,
|
|
|
|
|
|
|
|
0x4801,
|
|
|
|
|
|
|
|
0x4a89,
|
|
|
|
|
|
|
|
0x4aa9,
|
|
|
|
|
|
|
|
0x4aa9,
|
|
|
|
|
|
|
|
0x5ffd,
|
|
|
|
|
|
|
|
0xc001,
|
|
|
|
|
|
|
|
0x4001,
|
|
|
|
|
|
|
|
0x7fff,
|
|
|
|
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
|
|
|
|
/* Character 1 (0x01:
|
|
|
|
#define I_HIGH_INPUT 1*16
|
|
|
|
width 16
|
|
|
|
/* +-----------------+
|
|
|
|
+-----------------+
|
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| ** |
|
|
|
|
| ** |
|
|
|
|
| **** |
|
|
|
|
| *** |
|
|
|
|
| ************ |
|
|
|
|
| ************ |
|
|
|
|
| **** |
|
|
|
|
| *** |
|
|
|
|
| ** |
|
|
|
|
| ** |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
@ -126,25 +105,24 @@ const uint16_t icons [] =
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
+-----------------+ */
|
|
|
|
+-----------------+ */
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
0x0000,
|
|
|
|
0x0060,
|
|
|
|
0x0060,
|
|
|
|
0x0038,
|
|
|
|
0x0039,
|
|
|
|
0x0ffe,
|
|
|
|
0x0fff,
|
|
|
|
0x0038,
|
|
|
|
0x0039,
|
|
|
|
0x0060,
|
|
|
|
0x0060,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0001,
|
|
|
|
0x0000,
|
|
|
|
0x0001,
|
|
|
|
0x0000,
|
|
|
|
0x0001,
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
|
|
|
|
/* Character 2 (0x02):
|
|
|
|
#define I_LOW_INPUT 2*16
|
|
|
|
width 16
|
|
|
|
/* +-----------------+
|
|
|
|
+-----------------+
|
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
@ -165,38 +143,194 @@ const uint16_t icons [] =
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0001,
|
|
|
|
0x0000,
|
|
|
|
0x0001,
|
|
|
|
0x0000,
|
|
|
|
0x0001,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
0x0060,
|
|
|
|
0x0060,
|
|
|
|
0x0038,
|
|
|
|
0x0039,
|
|
|
|
0x0ffe,
|
|
|
|
0x0fff,
|
|
|
|
0x0038,
|
|
|
|
0x0039,
|
|
|
|
0x0060,
|
|
|
|
0x0060,
|
|
|
|
0x0000,
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
|
|
|
|
/* High arrow left 0x03 */
|
|
|
|
#define I_LOW_OUTPUT 3*16
|
|
|
|
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000000001,
|
|
|
|
|
|
|
|
0b0000000000000001,
|
|
|
|
|
|
|
|
0b0000000000000001,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000110000000,
|
|
|
|
|
|
|
|
0b0000011110000001,
|
|
|
|
|
|
|
|
0b0000111111111111,
|
|
|
|
|
|
|
|
0b0000011110000001,
|
|
|
|
|
|
|
|
0b0000000110000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define I_HIGH_OUTPUT 4*16
|
|
|
|
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000110000000,
|
|
|
|
0b0000000110000000,
|
|
|
|
0b0000011110000000,
|
|
|
|
0b0000011110000001,
|
|
|
|
0b0000111111111110,
|
|
|
|
0b0000111111111111,
|
|
|
|
0b0000011110000000,
|
|
|
|
0b0000011110000001,
|
|
|
|
0b0000000110000000,
|
|
|
|
0b0000000110000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000000001,
|
|
|
|
|
|
|
|
0b0000000000000001,
|
|
|
|
|
|
|
|
0b0000000000000001,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define I_CONNECT 5*16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000110000,
|
|
|
|
|
|
|
|
0b0000000000111101,
|
|
|
|
|
|
|
|
0b0000001111111111,
|
|
|
|
|
|
|
|
0b0000010000111101,
|
|
|
|
|
|
|
|
0b0000100000110000,
|
|
|
|
|
|
|
|
0b0001000000000000,
|
|
|
|
|
|
|
|
0b0001000000000000,
|
|
|
|
|
|
|
|
0b0000100000110000,
|
|
|
|
|
|
|
|
0b0000010000111101,
|
|
|
|
|
|
|
|
0b0000001111111111,
|
|
|
|
|
|
|
|
0b0000000000111101,
|
|
|
|
|
|
|
|
0b0000000000110000,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const uint16_t right_icons [] =
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#define I_SA 0
|
|
|
|
|
|
|
|
/* Character 0 (0x00):
|
|
|
|
|
|
|
|
width 16
|
|
|
|
|
|
|
|
+-----------------+
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
| *************** |
|
|
|
|
|
|
|
|
| * * |
|
|
|
|
|
|
|
|
|** * |
|
|
|
|
|
|
|
|
| * * * |
|
|
|
|
|
|
|
|
| * * * |
|
|
|
|
|
|
|
|
| * * * * |
|
|
|
|
|
|
|
|
| * * * * |
|
|
|
|
|
|
|
|
| * * * * * |
|
|
|
|
|
|
|
|
| * * * * * * |
|
|
|
|
|
|
|
|
| * * * * * * * |
|
|
|
|
|
|
|
|
| * * * * * * * |
|
|
|
|
|
|
|
|
|** *********** * |
|
|
|
|
|
|
|
|
| * * |
|
|
|
|
|
|
|
|
| *************** |
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
+-----------------+ */
|
|
|
|
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
0x7fff,
|
|
|
|
|
|
|
|
0x4001,
|
|
|
|
|
|
|
|
0xc001,
|
|
|
|
|
|
|
|
0xc001,
|
|
|
|
|
|
|
|
0xc001,
|
|
|
|
|
|
|
|
0x4801,
|
|
|
|
|
|
|
|
0x4801,
|
|
|
|
|
|
|
|
0x4a89,
|
|
|
|
|
|
|
|
0x4aa9,
|
|
|
|
|
|
|
|
0xcaa9,
|
|
|
|
|
|
|
|
0xdffd,
|
|
|
|
|
|
|
|
0xc001,
|
|
|
|
|
|
|
|
0x4001,
|
|
|
|
|
|
|
|
0x7fff,
|
|
|
|
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define I_GEN 1
|
|
|
|
|
|
|
|
/* Character 0 (0x00):
|
|
|
|
|
|
|
|
width 16
|
|
|
|
|
|
|
|
+-----------------+
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
| *************** |
|
|
|
|
|
|
|
|
| * * |
|
|
|
|
|
|
|
|
|** * |
|
|
|
|
|
|
|
|
| * ***** ** * |
|
|
|
|
|
|
|
|
| * * * * * |
|
|
|
|
|
|
|
|
| * * * * * |
|
|
|
|
|
|
|
|
| * * * * * |
|
|
|
|
|
|
|
|
| * * * * * |
|
|
|
|
|
|
|
|
| * * * * * |
|
|
|
|
|
|
|
|
| * * * * * |
|
|
|
|
|
|
|
|
| * ** ***** * |
|
|
|
|
|
|
|
|
|** * |
|
|
|
|
|
|
|
|
| * * |
|
|
|
|
|
|
|
|
| *************** |
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
+-----------------+ */
|
|
|
|
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
0x7fff,
|
|
|
|
|
|
|
|
0x4001,
|
|
|
|
|
|
|
|
0xc001,
|
|
|
|
|
|
|
|
0xcf8d,
|
|
|
|
|
|
|
|
0xc889,
|
|
|
|
|
|
|
|
0x4889,
|
|
|
|
|
|
|
|
0x4889,
|
|
|
|
|
|
|
|
0x4889,
|
|
|
|
|
|
|
|
0x4889,
|
|
|
|
|
|
|
|
0xc889,
|
|
|
|
|
|
|
|
0xd8f9,
|
|
|
|
|
|
|
|
0xc001,
|
|
|
|
|
|
|
|
0x4001,
|
|
|
|
|
|
|
|
0x7fff,
|
|
|
|
|
|
|
|
0x0000,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define I_CONFIG 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0111111111111111,
|
|
|
|
|
|
|
|
0b0100000000000001,
|
|
|
|
|
|
|
|
0b1100000011000001,
|
|
|
|
|
|
|
|
0b1100001110001001,
|
|
|
|
|
|
|
|
0b1100011100011101,
|
|
|
|
|
|
|
|
0b0100001110111001,
|
|
|
|
|
|
|
|
0b0100001111111001,
|
|
|
|
|
|
|
|
0b0100011111110001,
|
|
|
|
|
|
|
|
0b0100111110000001,
|
|
|
|
|
|
|
|
0b1101111100000001,
|
|
|
|
|
|
|
|
0b1101111000000001,
|
|
|
|
|
|
|
|
0b1100100000000001,
|
|
|
|
|
|
|
|
0b0100000000000001,
|
|
|
|
|
|
|
|
0b0111111111111111,
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define I_SINUS 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
|
|
|
|
0b0111111111111111, // 1
|
|
|
|
|
|
|
|
0b0100000000000001, // 2
|
|
|
|
|
|
|
|
0b1100000000000001, // 3
|
|
|
|
|
|
|
|
0b1100000000110001, // 4
|
|
|
|
|
|
|
|
0b1100000001001001, // 5
|
|
|
|
|
|
|
|
0b0100000010000101, // 6
|
|
|
|
|
|
|
|
0b0101000010000101, // 7
|
|
|
|
|
|
|
|
0b0101000010000101, // 8
|
|
|
|
|
|
|
|
0b0101000010000001, // 9
|
|
|
|
|
|
|
|
0b1100100100000001, //10
|
|
|
|
|
|
|
|
0b1100011000000001, //11
|
|
|
|
|
|
|
|
0b1100000000000001, //12
|
|
|
|
|
|
|
|
0b0100000000000001, //13
|
|
|
|
|
|
|
|
0b0111111111111111, //14
|
|
|
|
|
|
|
|
0b0000000000000000,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -369,8 +503,8 @@ void menu_autosettings_cb(int item, uint8_t data)
|
|
|
|
for (int i = 1; i<MARKER_COUNT; i++ ) {
|
|
|
|
for (int i = 1; i<MARKER_COUNT; i++ ) {
|
|
|
|
markers[i].enabled = M_DISABLED;
|
|
|
|
markers[i].enabled = M_DISABLED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
markers[0].enabled = M_TRACKING_ENABLED;
|
|
|
|
markers[0].enabled = M_ENABLED;
|
|
|
|
markers[0].mtype = M_REFERENCE;
|
|
|
|
markers[0].mtype = M_REFERENCE | M_TRACKING;
|
|
|
|
|
|
|
|
|
|
|
|
// set_refer_output(1);
|
|
|
|
// set_refer_output(1);
|
|
|
|
|
|
|
|
|
|
|
|
@ -495,6 +629,7 @@ static void menu_spur_cb(int item, uint8_t data)
|
|
|
|
static void menu_measure_cb(int item, uint8_t data)
|
|
|
|
static void menu_measure_cb(int item, uint8_t data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
(void)item;
|
|
|
|
(void)item;
|
|
|
|
|
|
|
|
menu_move_back();
|
|
|
|
switch(data) {
|
|
|
|
switch(data) {
|
|
|
|
case M_OFF: // Off
|
|
|
|
case M_OFF: // Off
|
|
|
|
reset_settings(GetMode());
|
|
|
|
reset_settings(GetMode());
|
|
|
|
@ -503,10 +638,10 @@ static void menu_measure_cb(int item, uint8_t data)
|
|
|
|
case M_IMD: // IMD
|
|
|
|
case M_IMD: // IMD
|
|
|
|
reset_settings(GetMode());
|
|
|
|
reset_settings(GetMode());
|
|
|
|
for (int i = 0; i< MARKERS_MAX; i++) {
|
|
|
|
for (int i = 0; i< MARKERS_MAX; i++) {
|
|
|
|
markers[i].enabled = M_TRACKING_ENABLED;
|
|
|
|
markers[i].enabled = M_ENABLED;
|
|
|
|
markers[i].mtype = M_DELTA;
|
|
|
|
markers[i].mtype = M_DELTA | M_TRACKING;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
markers[0].mtype = M_REFERENCE;
|
|
|
|
markers[0].mtype = M_REFERENCE | M_TRACKING;
|
|
|
|
ui_mode_keypad(KM_CENTER);
|
|
|
|
ui_mode_keypad(KM_CENTER);
|
|
|
|
ui_process_keypad();
|
|
|
|
ui_process_keypad();
|
|
|
|
set_sweep_frequency(ST_START, 0);
|
|
|
|
set_sweep_frequency(ST_START, 0);
|
|
|
|
@ -516,19 +651,38 @@ static void menu_measure_cb(int item, uint8_t data)
|
|
|
|
case M_OIP3: // OIP3
|
|
|
|
case M_OIP3: // OIP3
|
|
|
|
reset_settings(GetMode());
|
|
|
|
reset_settings(GetMode());
|
|
|
|
for (int i = 0; i< MARKERS_MAX; i++) {
|
|
|
|
for (int i = 0; i< MARKERS_MAX; i++) {
|
|
|
|
markers[i].enabled = M_TRACKING_ENABLED;
|
|
|
|
markers[i].enabled = M_ENABLED;
|
|
|
|
markers[i].mtype = M_DELTA;
|
|
|
|
markers[i].mtype = M_DELTA | M_TRACKING;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
markers[0].mtype = M_REFERENCE;
|
|
|
|
markers[0].mtype = M_REFERENCE | M_TRACKING;
|
|
|
|
ui_mode_keypad(KM_CENTER);
|
|
|
|
ui_mode_keypad(KM_CENTER);
|
|
|
|
ui_process_keypad();
|
|
|
|
ui_process_keypad();
|
|
|
|
ui_mode_keypad(KM_SPAN);
|
|
|
|
ui_mode_keypad(KM_SPAN);
|
|
|
|
ui_process_keypad();
|
|
|
|
ui_process_keypad();
|
|
|
|
set_sweep_frequency(ST_SPAN, uistat.value*4);
|
|
|
|
set_sweep_frequency(ST_SPAN, uistat.value*4);
|
|
|
|
set_measurement(M_OIP3);
|
|
|
|
set_measurement(M_OIP3);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case M_PHASE_NOISE: // Phase noise
|
|
|
|
|
|
|
|
reset_settings(GetMode());
|
|
|
|
|
|
|
|
for (int i = 0; i< MARKERS_MAX; i++) {
|
|
|
|
|
|
|
|
markers[i].enabled = M_DISABLED;
|
|
|
|
|
|
|
|
markers[i].mtype = M_NORMAL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
markers[0].enabled = M_ENABLED;
|
|
|
|
|
|
|
|
markers[0].mtype = M_REFERENCE | M_TRACKING;
|
|
|
|
|
|
|
|
markers[1].enabled = M_ENABLED;
|
|
|
|
|
|
|
|
markers[1].mtype = M_DELTA | M_NOISE;
|
|
|
|
|
|
|
|
ui_mode_keypad(KM_CENTER);
|
|
|
|
|
|
|
|
ui_process_keypad();
|
|
|
|
|
|
|
|
ui_mode_keypad(KM_SPAN);
|
|
|
|
|
|
|
|
ui_process_keypad();
|
|
|
|
|
|
|
|
set_sweep_frequency(ST_SPAN, uistat.value*4);
|
|
|
|
|
|
|
|
set_measurement(M_PHASE_NOISE);
|
|
|
|
|
|
|
|
SetAverage(4);
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
menu_move_back();
|
|
|
|
// selection = -1;
|
|
|
|
ui_mode_normal();
|
|
|
|
ui_mode_normal();
|
|
|
|
// draw_cal_status();
|
|
|
|
// draw_cal_status();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -585,25 +739,28 @@ static void menu_average_cb(int item, uint8_t data)
|
|
|
|
static void menu_marker_type_cb(int item, uint8_t data)
|
|
|
|
static void menu_marker_type_cb(int item, uint8_t data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
(void)item;
|
|
|
|
(void)item;
|
|
|
|
if (markers[active_marker].enabled)
|
|
|
|
if (markers[active_marker].enabled == M_ENABLED)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (data == M_REFERENCE) {
|
|
|
|
if (data == M_NORMAL) {
|
|
|
|
|
|
|
|
markers[active_marker].mtype = M_NORMAL;
|
|
|
|
|
|
|
|
} else if (data == M_REFERENCE) {
|
|
|
|
for (int i = 0; i<MARKER_COUNT; i++ ) {
|
|
|
|
for (int i = 0; i<MARKER_COUNT; i++ ) {
|
|
|
|
if (markers[i].mtype ==M_REFERENCE)
|
|
|
|
if (markers[i].mtype & M_REFERENCE)
|
|
|
|
markers[i].mtype = M_NORMAL;
|
|
|
|
markers[i].mtype &= ~M_REFERENCE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
markers[active_marker].mtype |= M_REFERENCE;
|
|
|
|
if (data == M_TRACKING) {
|
|
|
|
} else {
|
|
|
|
if (markers[active_marker].enabled == M_ENABLED)
|
|
|
|
if (data == M_DELTA && (markers[active_marker].mtype & M_REFERENCE))
|
|
|
|
markers[active_marker].enabled = M_TRACKING_ENABLED;
|
|
|
|
markers[active_marker].mtype &= ~M_REFERENCE;
|
|
|
|
|
|
|
|
if (markers[active_marker].mtype & data)
|
|
|
|
|
|
|
|
markers[active_marker].mtype &= ~data;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
markers[active_marker].enabled = M_ENABLED;
|
|
|
|
markers[active_marker].mtype |= data;
|
|
|
|
} else
|
|
|
|
}
|
|
|
|
markers[active_marker].mtype = data;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
markmap_all_markers();
|
|
|
|
markmap_all_markers();
|
|
|
|
// redraw_marker(active_marker, TRUE);
|
|
|
|
// redraw_marker(active_marker, TRUE);
|
|
|
|
menu_move_back();
|
|
|
|
// menu_move_back();
|
|
|
|
draw_menu();
|
|
|
|
draw_menu();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -648,7 +805,7 @@ static void choose_active_marker(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < MARKER_COUNT; i++)
|
|
|
|
for (i = 0; i < MARKER_COUNT; i++)
|
|
|
|
if (markers[i].enabled) {
|
|
|
|
if (markers[i].enabled == M_ENABLED) {
|
|
|
|
active_marker = i;
|
|
|
|
active_marker = i;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -836,9 +993,10 @@ static const menuitem_t menu_reflevel[] = {
|
|
|
|
|
|
|
|
|
|
|
|
static const menuitem_t menu_marker_type[] = {
|
|
|
|
static const menuitem_t menu_marker_type[] = {
|
|
|
|
{ MT_CALLBACK, M_REFERENCE, "REFERENCE", menu_marker_type_cb},
|
|
|
|
{ MT_CALLBACK, M_REFERENCE, "REFERENCE", menu_marker_type_cb},
|
|
|
|
{ MT_CALLBACK, M_NORMAL, "NORMAL", menu_marker_type_cb},
|
|
|
|
|
|
|
|
{ MT_CALLBACK, M_DELTA, "DELTA", menu_marker_type_cb},
|
|
|
|
{ MT_CALLBACK, M_DELTA, "DELTA", menu_marker_type_cb},
|
|
|
|
|
|
|
|
{ MT_CALLBACK, M_NOISE, "NOISE", menu_marker_type_cb},
|
|
|
|
{ MT_CALLBACK, M_TRACKING, "TRACKING", menu_marker_type_cb},
|
|
|
|
{ MT_CALLBACK, M_TRACKING, "TRACKING", menu_marker_type_cb},
|
|
|
|
|
|
|
|
{ MT_CALLBACK, M_NORMAL, "NORMAL", menu_marker_type_cb},
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -854,6 +1012,22 @@ const menuitem_t menu_marker_search[] = {
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const menuitem_t menu_marker_sel[] = {
|
|
|
|
|
|
|
|
{ MT_CALLBACK, 1, "MARKER 1", menu_marker_sel_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, 2, "MARKER 2", menu_marker_sel_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, 3, "MARKER 3", menu_marker_sel_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, 4, "MARKER 4", menu_marker_sel_cb },
|
|
|
|
|
|
|
|
// { MT_CALLBACK, 0, "ALL OFF", menu_marker_sel_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, 0, "DELTA", menu_marker_sel_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, 0, "NOISE", menu_marker_sel_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, 0, "TRACKING", menu_marker_sel_cb },
|
|
|
|
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
static const menuitem_t menu_marker_sel[] = {
|
|
|
|
static const menuitem_t menu_marker_sel[] = {
|
|
|
|
{ MT_CALLBACK, 0, "MARKER 1", menu_marker_sel_cb},
|
|
|
|
{ MT_CALLBACK, 0, "MARKER 1", menu_marker_sel_cb},
|
|
|
|
{ MT_CALLBACK, 0, "MARKER 2", menu_marker_sel_cb},
|
|
|
|
{ MT_CALLBACK, 0, "MARKER 2", menu_marker_sel_cb},
|
|
|
|
@ -864,14 +1038,25 @@ static const menuitem_t menu_marker_sel[] = {
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const menuitem_t menu_marker_ops[] = {
|
|
|
|
|
|
|
|
{ MT_CALLBACK, ST_START, S_RARROW"START", menu_marker_op_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, ST_STOP, S_RARROW"STOP", menu_marker_op_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, ST_CENTER, S_RARROW"CENTER", menu_marker_op_cb },
|
|
|
|
|
|
|
|
{ MT_CALLBACK, ST_SPAN, S_RARROW"SPAN", menu_marker_op_cb },
|
|
|
|
|
|
|
|
// { MT_CALLBACK, 0, S_RARROW"EDELAY", menu_marker_op_cb },
|
|
|
|
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const menuitem_t menu_marker[] = {
|
|
|
|
static const menuitem_t menu_marker[] = {
|
|
|
|
{ MT_SUBMENU, 0, "\2SELECT\0MARKER", menu_marker_sel},
|
|
|
|
{ MT_SUBMENU, 0, "\2SELECT\0MARKERS", menu_marker_sel},
|
|
|
|
{ MT_SUBMENU, 0, "\2MARKER\0TYPE", menu_marker_type},
|
|
|
|
{ MT_SUBMENU, 0, "\2MARKER\0TYPE", menu_marker_type},
|
|
|
|
{ MT_CALLBACK, ST_START, S_RARROW"START", menu_marker_op_cb},
|
|
|
|
{ MT_SUBMENU, 0, "\2MARKER\0OPS", menu_marker_ops},
|
|
|
|
{ MT_CALLBACK, ST_STOP, S_RARROW"STOP", menu_marker_op_cb},
|
|
|
|
{ MT_SUBMENU, 0, "\2SEARCH\0MARKER", menu_marker_search},
|
|
|
|
{ MT_CALLBACK, ST_CENTER, S_RARROW"CENTER", menu_marker_op_cb},
|
|
|
|
|
|
|
|
{ MT_CALLBACK, ST_SPAN, S_RARROW"SPAN", menu_marker_op_cb},
|
|
|
|
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -884,12 +1069,12 @@ static const menuitem_t menu_dfu[] = {
|
|
|
|
|
|
|
|
|
|
|
|
static const menuitem_t menu_settings2[] =
|
|
|
|
static const menuitem_t menu_settings2[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
{ MT_CALLBACK, 0, "AGC", menu_settings2_cb},
|
|
|
|
{ MT_CALLBACK, 0, "AGC", menu_settings2_cb},
|
|
|
|
{ MT_CALLBACK, 1, "LNA", menu_settings2_cb},
|
|
|
|
{ MT_CALLBACK, 1, "LNA", menu_settings2_cb},
|
|
|
|
{ MT_CALLBACK, 2, "BPF", menu_settings2_cb},
|
|
|
|
{ MT_CALLBACK, 2, "BPF", menu_settings2_cb},
|
|
|
|
{ MT_KEYPAD, KM_DECAY, "\2HOLD\0TIME", NULL},
|
|
|
|
{ MT_KEYPAD, KM_DECAY,"\2HOLD\0TIME", NULL},
|
|
|
|
{ MT_KEYPAD, KM_NOISE, "\2NOISE\0LEVEL", NULL},
|
|
|
|
{ MT_KEYPAD, KM_NOISE,"\2NOISE\0LEVEL", NULL},
|
|
|
|
{ MT_KEYPAD, KM_10MHZ, "\00210MHZ\0ACTUAL", NULL},
|
|
|
|
{ MT_KEYPAD, KM_10MHZ,"\00210MHZ\0ACTUAL", NULL},
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -906,9 +1091,10 @@ static const menuitem_t menu_settings[] =
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static const menuitem_t menu_measure[] = {
|
|
|
|
static const menuitem_t menu_measure[] = {
|
|
|
|
{ MT_CALLBACK, M_OFF, "OFF", menu_measure_cb},
|
|
|
|
{ MT_CALLBACK, M_OFF, "OFF", menu_measure_cb},
|
|
|
|
{ MT_CALLBACK, M_IMD, "IMD", menu_measure_cb},
|
|
|
|
{ MT_CALLBACK, M_IMD, "IMD", menu_measure_cb},
|
|
|
|
{ MT_CALLBACK, M_OIP3, "OIP3", menu_measure_cb},
|
|
|
|
{ MT_CALLBACK, M_OIP3, "OIP3", menu_measure_cb},
|
|
|
|
|
|
|
|
{ MT_CALLBACK, M_PHASE_NOISE, "\2PHASE\0NOISE",menu_measure_cb},
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
{ MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -1015,12 +1201,12 @@ static const menuitem_t menu_stimulus[] = {
|
|
|
|
|
|
|
|
|
|
|
|
static const menuitem_t menu_mode[] = {
|
|
|
|
static const menuitem_t menu_mode[] = {
|
|
|
|
{ MT_FORM | MT_TITLE, 0, "MODE", NULL},
|
|
|
|
{ MT_FORM | MT_TITLE, 0, "MODE", NULL},
|
|
|
|
{ MT_FORM | MT_CALLBACK, 0, "LOW INPUT", menu_mode_cb},
|
|
|
|
{ MT_FORM | MT_CALLBACK | MT_ICON, I_LOW_INPUT+I_SA, "LOW INPUT", menu_mode_cb},
|
|
|
|
{ MT_FORM | MT_CALLBACK, 0, "HIGH INPUT", menu_mode_cb},
|
|
|
|
{ MT_FORM | MT_CALLBACK | MT_ICON, I_HIGH_INPUT+I_SA, "HIGH INPUT", menu_mode_cb},
|
|
|
|
{ MT_FORM | MT_CALLBACK, 0, "LOW OUTPUT", menu_mode_cb},
|
|
|
|
{ MT_FORM | MT_CALLBACK | MT_ICON, I_LOW_OUTPUT+I_SINUS, "LOW OUTPUT", menu_mode_cb},
|
|
|
|
{ MT_FORM | MT_CALLBACK, 0, "HIGH OUTPUT", menu_mode_cb},
|
|
|
|
{ MT_FORM | MT_CALLBACK | MT_ICON, I_HIGH_OUTPUT+I_GEN,"HIGH OUTPUT", menu_mode_cb},
|
|
|
|
{ MT_FORM | MT_SUBMENU, 0, "CAL OUTPUT: %s", menu_reffer},
|
|
|
|
{ MT_FORM | MT_SUBMENU | MT_ICON, I_CONNECT+I_GEN, "CAL OUTPUT: %s", menu_reffer},
|
|
|
|
{ MT_FORM | MT_SUBMENU, 0, "CONFIG", menu_config},
|
|
|
|
{ MT_FORM | MT_SUBMENU | MT_ICON, I_EMPTY+I_CONFIG,"CONFIG", menu_config},
|
|
|
|
// { MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
// { MT_CANCEL, 0, S_LARROW" BACK", NULL },
|
|
|
|
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -1137,7 +1323,7 @@ static void menu_item_modify_attribute(
|
|
|
|
mark = true;
|
|
|
|
mark = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else if (menu == menu_drive || menu == menu_drive_wide || menu == menu_drive_wide2|| menu == menu_drive_wide3) {
|
|
|
|
} else if (MT_MASK(menu[item].type) != MT_CALLBACK && (menu == menu_drive || menu == menu_drive_wide || menu == menu_drive_wide2|| menu == menu_drive_wide3)) {
|
|
|
|
if (data == setting_drive){
|
|
|
|
if (data == setting_drive){
|
|
|
|
mark = true;
|
|
|
|
mark = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1165,14 +1351,23 @@ static void menu_item_modify_attribute(
|
|
|
|
if (item == 2 && setting_tracking){ // should not happen in high mode
|
|
|
|
if (item == 2 && setting_tracking){ // should not happen in high mode
|
|
|
|
mark = true;
|
|
|
|
mark = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (menu == menu_marker_type && active_marker >= 0 && markers[active_marker].enabled) {
|
|
|
|
} else if (menu == menu_marker_type && active_marker >= 0 && markers[active_marker].enabled == M_ENABLED) {
|
|
|
|
if (item == 3 && markers[active_marker].enabled == M_TRACKING_ENABLED)
|
|
|
|
if (data & markers[active_marker].mtype)
|
|
|
|
|
|
|
|
mark = true;
|
|
|
|
|
|
|
|
else if (data==markers[active_marker].mtype) // This catches the M_NORMAL case
|
|
|
|
mark = true;
|
|
|
|
mark = true;
|
|
|
|
else if (item == markers[active_marker].mtype)
|
|
|
|
} else if (menu == menu_marker_search) {
|
|
|
|
|
|
|
|
if (item == 4 && markers[active_marker].mtype & M_TRACKING)
|
|
|
|
mark = true;
|
|
|
|
mark = true;
|
|
|
|
} else if (menu == menu_marker_sel) {
|
|
|
|
} else if (menu == menu_marker_sel) {
|
|
|
|
if (item < MARKERS_MAX && markers[item].enabled)
|
|
|
|
if (item < MARKERS_MAX && markers[item].enabled)
|
|
|
|
mark = true;
|
|
|
|
mark = true;
|
|
|
|
|
|
|
|
else if (item == 4 && uistat.marker_delta)
|
|
|
|
|
|
|
|
mark = true;
|
|
|
|
|
|
|
|
else if (item == 5 && uistat.marker_noise)
|
|
|
|
|
|
|
|
mark = true;
|
|
|
|
|
|
|
|
else if (item == 6 && uistat.marker_tracking)
|
|
|
|
|
|
|
|
mark = true;
|
|
|
|
} else if (menu == menu_reflevel) {
|
|
|
|
} else if (menu == menu_reflevel) {
|
|
|
|
if ((item == 0 && setting_auto_reflevel) || (item == 1 && !setting_auto_reflevel))
|
|
|
|
if ((item == 0 && setting_auto_reflevel) || (item == 1 && !setting_auto_reflevel))
|
|
|
|
mark = true;
|
|
|
|
mark = true;
|
|
|
|
|