Not store unused font glyph (index < 0x17)

Add 10x14 bold font
Now all ili9341_drawstring_size replaced by use this font
Change some text for align in menus vs new font
pull/4/head
DiSlord 5 years ago
parent 037453fc8d
commit 7dd31965f0

File diff suppressed because it is too large Load Diff

@ -6,13 +6,18 @@
#include <stdint.h> #include <stdint.h>
/* /*
* Check 1 byte of char bitmap data for get width * Check 0 byte of char bitmap data for get width
*/ */
#define FONT_GET_DATA(ch) (&x5x7_bits[ch*7]) // Font definitions
#define FONT_GET_WIDTH(ch) (8-x5x7_bits[ch*7]&7) #define FONT_START_CHAR 0x17
#define FONT_MAX_WIDTH 7 #define FONT_MAX_WIDTH 7
#define FONT_WIDTH 5
#define FONT_GET_HEIGHT 7 #define FONT_GET_HEIGHT 7
#define FONT_STR_HEIGHT 8
#define FONT_GET_DATA(ch) ( &x5x7_bits[(ch-FONT_START_CHAR)*FONT_GET_HEIGHT])
#define FONT_GET_WIDTH(ch) (8-(x5x7_bits[(ch-FONT_START_CHAR)*FONT_GET_HEIGHT]&7))
#define CHAR5x7_WIDTH_1px 0x07 #define CHAR5x7_WIDTH_1px 0x07
#define CHAR5x7_WIDTH_2px 0x06 #define CHAR5x7_WIDTH_2px 0x06
@ -24,8 +29,9 @@
#define CHAR5x7_WIDTH_8px 0x00 #define CHAR5x7_WIDTH_8px 0x00
/* Font character bitmap data. */ /* Font character bitmap data. */
const uint8_t x5x7_bits[127*7] = const uint8_t x5x7_bits[] =
{ {
#if 0
/* Character (0x00): /* Character (0x00):
width=5 width=5
+--------+ +--------+
@ -103,23 +109,23 @@ const uint8_t x5x7_bits[127*7] =
0b00100000, 0b00100000,
/* Character (0x04): /* Character (0x04):
width=6 width=5
+--------+ +--------+
| | | ** |
|** | | *** |
|**** | | *** |
|****** | | *** |
|**** | | *** |
|** | | *** |
| | | ** |
+--------+ */ +--------+ */
0b00000000|CHAR5x7_WIDTH_6px, 0b00100000|CHAR5x7_WIDTH_5px,
0b11000000, 0b00100000,
0b11110000, 0b00100000,
0b00011100, 0b11100000,
0b11110000, 0b00100000,
0b11000000, 0b00100000,
0b00000000, 0b00100000,
/* Character (0x05): /* Character (0x05):
width=5 width=5
@ -445,24 +451,25 @@ const uint8_t x5x7_bits[127*7] =
0b00100000, 0b00100000,
/* Character (0x16): /* Character (0x16):
width=5 width=6
+--------+ +--------+
| ** | | |
| *** | |** |
| *** | |**** |
| *** | |****** |
| *** | |**** |
| *** | |** |
| ** | | |
+--------+ */ +--------+ */
0b00100000|CHAR5x7_WIDTH_5px, 0b00000000|CHAR5x7_WIDTH_6px,
0b00100000, 0b11000000,
0b00100000, 0b11110000,
0b11100000, 0b00011100,
0b00100000, 0b11110000,
0b00100000, 0b11000000,
0b00100000, 0b00000000,
#endif
// FONT_START_CHAR = 0x17
/* Character (0x17): /* Character (0x17):
width=6 width=6
+--------+ +--------+

@ -6,16 +6,18 @@
#include <stdint.h> #include <stdint.h>
/* /*
* Check 1 byte of char bitmap data for get width * Check 0 byte of char bitmap data for get width
*/ */
// Font definitions // Font definitions
#define FONT_GET_DATA(ch) (&x7x11b_bits[ch*11]) #define FONT_START_CHAR 0x17
#define FONT_GET_WIDTH(ch) (8-(x7x11b_bits[ch*11]&7))
#define FONT_MAX_WIDTH 8 #define FONT_MAX_WIDTH 8
#define FONT_WIDTH 7 #define FONT_WIDTH 7
#define FONT_GET_HEIGHT 11 #define FONT_GET_HEIGHT 11
#define FONT_STR_HEIGHT 11 #define FONT_STR_HEIGHT 11
#define FONT_GET_DATA(ch) ( &x7x11b_bits[(ch-FONT_START_CHAR)*FONT_GET_HEIGHT])
#define FONT_GET_WIDTH(ch) (8-(x7x11b_bits[(ch-FONT_START_CHAR)*FONT_GET_HEIGHT]&7))
#define CHAR7x11_WIDTH_MASK 0x07 #define CHAR7x11_WIDTH_MASK 0x07
#define CHAR7x11_WIDTH_4px 0x04 #define CHAR7x11_WIDTH_4px 0x04
#define CHAR7x11_WIDTH_5px 0x03 #define CHAR7x11_WIDTH_5px 0x03
@ -24,8 +26,9 @@
#define CHAR7x11_WIDTH_8px 0x00 #define CHAR7x11_WIDTH_8px 0x00
/* Font character bitmap data. */ /* Font character bitmap data. */
const uint8_t x7x11b_bits[127*11] = const uint8_t x7x11b_bits[] =
{ {
#if 0
/* Character 0 (0x00): /* Character 0 (0x00):
width 7 width 7
+-------+ +-------+
@ -646,7 +649,8 @@ const uint8_t x7x11b_bits[127*11] =
0b00110000, 0b00110000,
0b00110000, 0b00110000,
0b00110000, 0b00110000,
#endif
// FONT_START_CHAR = 23
/* Character 23 (0x17): /* Character 23 (0x17):
width 8 width 8
+-------+ +-------+

@ -122,7 +122,7 @@ CSRC = $(STARTUPSRC) \
$(BOARDSRC) \ $(BOARDSRC) \
$(STREAMSSRC) \ $(STREAMSSRC) \
usbcfg.c \ usbcfg.c \
main.c plot.c ui.c ili9341.c numfont20x22.c Font5x7.c flash.c adc.c si4432.c Font7x13b.c main.c plot.c ui.c ili9341.c numfont20x22.c Font5x7.c Font10x14.c flash.c adc.c si4432.c Font7x13b.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global # C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting. # setting.

@ -597,18 +597,19 @@ void ili9341_set_rotation(uint8_t r)
send_command(ILI9341_MEMORY_ACCESS_CONTROL, 1, &r); send_command(ILI9341_MEMORY_ACCESS_CONTROL, 1, &r);
} }
static uint8_t bit_align = 0;
void blit8BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height, void blit8BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height,
const void *bitmap) const uint8_t *b)
{ {
uint16_t *buf = spi_buffer; uint16_t *buf = spi_buffer;
uint8_t bits = 0; uint8_t bits = 0;
const uint8_t *b = bitmap;
for (uint16_t c = 0; c < height; c++) { for (uint16_t c = 0; c < height; c++) {
for (uint16_t r = 0; r < width; r++) { for (uint16_t r = 0; r < width; r++) {
if ((r&7) == 0) bits = *b++; if ((r&7) == 0) bits = *b++;
*buf++ = (0x80 & bits) ? foreground_color : background_color; *buf++ = (0x80 & bits) ? foreground_color : background_color;
bits <<= 1; bits <<= 1;
} }
if (bit_align) b+=bit_align;
} }
ili9341_bulk(x, y, width, height); ili9341_bulk(x, y, width, height);
} }
@ -660,6 +661,21 @@ void ili9341_drawstring_7x13(const char *str, int x, int y)
} }
} }
void ili9341_drawstring_10x14(const char *str, int x, int y)
{
int x_pos = x;
while (*str) {
uint8_t ch = *str++;
if (ch == '\n') {x = x_pos; y+=wFONT_STR_HEIGHT; continue;}
const uint8_t *char_buf = wFONT_GET_DATA(ch);
uint16_t w = wFONT_GET_WIDTH(ch);
bit_align = (w<=8) ? 1 : 0;
blit8BitWidthBitmap(x, y, w, wFONT_GET_HEIGHT, char_buf);
x += w;
}
bit_align = 0;
}
void ili9341_drawstringV(const char *str, int x, int y) void ili9341_drawstringV(const char *str, int x, int y)
{ {
ili9341_set_rotation(DISPLAY_ROTATION_270); ili9341_set_rotation(DISPLAY_ROTATION_270);

@ -332,23 +332,36 @@ extern int16_t area_height;
// font // font
extern const uint8_t x5x7_bits []; extern const uint8_t x5x7_bits [];
extern const uint8_t x7x11b_bits []; extern const uint8_t x7x11b_bits [];
#define FONT_GET_DATA(ch) (&x5x7_bits[ch*7]) extern const uint8_t x10x14_bits[];
#define FONT_GET_WIDTH(ch) (8-(x5x7_bits[ch*7]&7)) extern const uint8_t numfont16x22[];
#define FONT_START_CHAR 0x17
#define FONT_MAX_WIDTH 7 #define FONT_MAX_WIDTH 7
#define FONT_WIDTH 5
#define FONT_GET_HEIGHT 7 #define FONT_GET_HEIGHT 7
#define FONT_STR_HEIGHT 8 #define FONT_STR_HEIGHT 8
#define FONT_GET_DATA(ch) ( &x5x7_bits[(ch-FONT_START_CHAR)*FONT_GET_HEIGHT])
#define FONT_GET_WIDTH(ch) (8-(x5x7_bits[(ch-FONT_START_CHAR)*FONT_GET_HEIGHT]&7))
#define bFONT_GET_DATA(ch) (&x7x11b_bits[ch*11]) #define bFONT_START_CHAR 0x17
#define bFONT_GET_WIDTH(ch) (8-(x7x11b_bits[ch*11]&7))
#define bFONT_MAX_WIDTH 8 #define bFONT_MAX_WIDTH 8
#define bFONT_WIDTH 7 #define bFONT_WIDTH 7
#define bFONT_GET_HEIGHT 11 #define bFONT_GET_HEIGHT 11
#define bFONT_STR_HEIGHT 11 #define bFONT_STR_HEIGHT 11
extern const uint8_t numfont16x22[]; #define bFONT_GET_DATA(ch) ( &x7x11b_bits[(ch-bFONT_START_CHAR)*bFONT_GET_HEIGHT])
#define NUM_FONT_GET_DATA(ch) (&numfont16x22[ch*2*22]) #define bFONT_GET_WIDTH(ch) (8-(x7x11b_bits[(ch-bFONT_START_CHAR)*bFONT_GET_HEIGHT]&7))
#define wFONT_START_CHAR 0x17
#define wFONT_MAX_WIDTH 12
#define wFONT_GET_HEIGHT 14
#define wFONT_STR_HEIGHT 16
#define wFONT_GET_DATA(ch) ( &x10x14_bits[(ch-wFONT_START_CHAR)*2*wFONT_GET_HEIGHT ])
#define wFONT_GET_WIDTH(ch) (14-(x10x14_bits[(ch-wFONT_START_CHAR)*2*wFONT_GET_HEIGHT+1]&0x7))
#define NUM_FONT_GET_WIDTH 16 #define NUM_FONT_GET_WIDTH 16
#define NUM_FONT_GET_HEIGHT 22 #define NUM_FONT_GET_HEIGHT 22
#define NUM_FONT_GET_DATA(ch) (&numfont16x22[ch*2*NUM_FONT_GET_HEIGHT])
#if 1 #if 1
#define KP_WIDTH ((LCD_WIDTH) / 4)// numeric keypad button width #define KP_WIDTH ((LCD_WIDTH) / 4)// numeric keypad button width
@ -373,8 +386,8 @@ extern const uint8_t numfont16x22[];
#define S_MICRO "\035" // 0x1D #define S_MICRO "\035" // 0x1D
#define S_OHM "\036" // 0x1E #define S_OHM "\036" // 0x1E
#define S_DEGREE "\037" // 0x1F #define S_DEGREE "\037" // 0x1F
// trace
// trace
#define MAX_TRACE_TYPE 12 #define MAX_TRACE_TYPE 12
enum trace_type { enum trace_type {
TRC_LOGMAG=0, TRC_PHASE, TRC_DELAY, TRC_SMITH, TRC_POLAR, TRC_LINEAR, TRC_SWR, TRC_REAL, TRC_IMAG, TRC_R, TRC_X, TRC_OFF TRC_LOGMAG=0, TRC_PHASE, TRC_DELAY, TRC_SMITH, TRC_POLAR, TRC_LINEAR, TRC_SWR, TRC_REAL, TRC_IMAG, TRC_R, TRC_X, TRC_OFF
@ -558,9 +571,10 @@ extern uint16_t background_color;
extern uint16_t spi_buffer[SPI_BUFFER_SIZE]; extern uint16_t spi_buffer[SPI_BUFFER_SIZE];
// Used for easy define big Bitmap as 0bXXXXXXXXX image // Used for easy define big Bitmap as 0bXXXXXXXXX image
#define _BMP16(d) ((d>>8)&0xFF), ((d)&0xFF) #define _BMP8(d) ((d)&0xFF)
#define _BMP24(d) ((d>>16)&0xFF), ((d>>8)&0xFF), ((d)&0xFF) #define _BMP16(d) (((d)>>8)&0xFF), ((d)&0xFF)
#define _BMP32(d) ((d>>24)&0xFF), ((d>>16)&0xFF), ((d>>8)&0xFF), ((d)&0xFF) #define _BMP24(d) (((d)>>16)&0xFF), (((d)>>8)&0xFF), ((d)&0xFF)
#define _BMP32(d) (((d)>>24)&0xFF), (((d)>>16)&0xFF), (((d)>>8)&0xFF), ((d)&0xFF)
void ili9341_init(void); void ili9341_init(void);
void ili9341_test(int mode); void ili9341_test(int mode);
@ -576,11 +590,12 @@ void ili9341_set_background(uint16_t fg);
#endif #endif
void ili9341_clear_screen(void); void ili9341_clear_screen(void);
void blit8BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const void *bitmap); void blit8BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t *bitmap);
void blit16BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint16_t *bitmap); void blit16BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint16_t *bitmap);
void ili9341_drawchar(uint8_t ch, int x, int y); void ili9341_drawchar(uint8_t ch, int x, int y);
void ili9341_drawstring(const char *str, int x, int y); void ili9341_drawstring(const char *str, int x, int y);
void ili9341_drawstring_7x13(const char *str, int x, int y); void ili9341_drawstring_7x13(const char *str, int x, int y);
void ili9341_drawstring_10x14(const char *str, int x, int y);
void ili9341_drawstringV(const char *str, int x, int y); void ili9341_drawstringV(const char *str, int x, int y);
int ili9341_drawchar_size(uint8_t ch, int x, int y, uint8_t size); int ili9341_drawchar_size(uint8_t ch, int x, int y, uint8_t size);
void ili9341_drawstring_size(const char *str, int x, int y, uint8_t size); void ili9341_drawstring_size(const char *str, int x, int y, uint8_t size);

@ -1703,11 +1703,11 @@ request_to_draw_cells_behind_numeric_input(void)
redraw_request |= REDRAW_CELLS; redraw_request |= REDRAW_CELLS;
} }
static int static void
cell_blit_char_bitmap(int x, int y, uint16_t w, uint16_t h, const uint8_t *char_buf) cell_blit_bitmap(int x, int y, uint16_t w, uint16_t h, const uint8_t *char_buf)
{ {
if (x <= -w) if (x <= -w)
return w; return;
uint8_t bits = 0; uint8_t bits = 0;
int c = h+y, r; int c = h+y, r;
for (; y < c; y++) { for (; y < c; y++) {
@ -1718,7 +1718,6 @@ cell_blit_char_bitmap(int x, int y, uint16_t w, uint16_t h, const uint8_t *char_
bits <<= 1; bits <<= 1;
} }
} }
return w;
} }
void void
@ -1730,7 +1729,9 @@ cell_drawstring(char *str, int x, int y)
if (x >= CELLWIDTH) if (x >= CELLWIDTH)
return; return;
uint8_t ch = *str++; uint8_t ch = *str++;
x += cell_blit_char_bitmap(x, y, FONT_GET_WIDTH(ch), FONT_GET_HEIGHT, FONT_GET_DATA(ch)); uint16_t w = FONT_GET_WIDTH(ch);
cell_blit_bitmap(x, y, w, FONT_GET_HEIGHT, FONT_GET_DATA(ch));
x += w;
} }
} }
@ -1743,7 +1744,24 @@ cell_drawstring_7x13(char *str, int x, int y)
if (x >= CELLWIDTH) if (x >= CELLWIDTH)
return; return;
uint8_t ch = *str++; uint8_t ch = *str++;
x += cell_blit_char_bitmap(x, y, bFONT_GET_WIDTH(ch), bFONT_GET_HEIGHT, bFONT_GET_DATA(ch)); uint16_t w = bFONT_GET_WIDTH(ch);
cell_blit_bitmap(x, y, w, bFONT_GET_HEIGHT, bFONT_GET_DATA(ch));
x += w;
}
}
void
cell_drawstring_10x14(char *str, int x, int y)
{
if (y <= -wFONT_GET_HEIGHT || y >= CELLHEIGHT)
return;
while (*str) {
if (x >= CELLWIDTH)
return;
uint8_t ch = *str++;
uint16_t w = wFONT_GET_WIDTH(ch);
cell_blit_bitmap(x, y, w <=8 ? 9 : w, wFONT_GET_HEIGHT, wFONT_GET_DATA(ch));
x+=w;
} }
} }

22
ui.c

@ -414,7 +414,7 @@ show_version(void)
ili9341_clear_screen(); ili9341_clear_screen();
uint16_t shift = 0b0000010000111110; uint16_t shift = 0b0000010000111110;
ili9341_drawstring_size(info_about[i++], x , y, 4); ili9341_drawstring_10x14(info_about[i++], x , y);
while (info_about[i]) { while (info_about[i]) {
do {shift>>=1; y+=5;} while (shift&1); do {shift>>=1; y+=5;} while (shift&1);
ili9341_drawstring(info_about[i++], x, y+=5); ili9341_drawstring(info_about[i++], x, y+=5);
@ -1420,7 +1420,7 @@ static const char * const keypad_mode_label[] = {
}; };
#endif #endif
static const char * const keypad_scale_text[] = { "1", "2", "5", "10", "20" , "50", "100", "200", "500"}; static const char * const keypad_scale_text[] = {"0", "1", "2", "5", "10", "20" , "50", "100", "200", "500"};
//static const int keypad_scale_value[] = { 1, 2, 5, 10, 20 , 50, 100, 200, 500}; //static const int keypad_scale_value[] = { 1, 2, 5, 10, 20 , 50, 100, 200, 500};
static void static void
@ -1457,15 +1457,15 @@ draw_keypad(void)
int x = KP_GET_X(keypads[i].x); int x = KP_GET_X(keypads[i].x);
int y = KP_GET_Y(keypads[i].y); int y = KP_GET_Y(keypads[i].y);
draw_button(x, y, KP_WIDTH, KP_HEIGHT, &button); draw_button(x, y, KP_WIDTH, KP_HEIGHT, &button);
if (keypads[i].c < 32) { // KP_1 if (keypads[i].c < KP_0) { // KP_0
ili9341_drawfont(keypads[i].c, ili9341_drawfont(keypads[i].c,
x + (KP_WIDTH - NUM_FONT_GET_WIDTH) / 2, x + (KP_WIDTH - NUM_FONT_GET_WIDTH) / 2,
y + (KP_HEIGHT - NUM_FONT_GET_HEIGHT) / 2); y + (KP_HEIGHT - NUM_FONT_GET_HEIGHT) / 2);
} else { } else {
const char *t = keypad_scale_text[keypads[i].c - KP_1]; const char *t = keypad_scale_text[keypads[i].c - KP_0];
ili9341_drawstring_size(t, ili9341_drawstring_10x14(t,
x + (KP_WIDTH - 5*strlen(t)*2) / 2, x + (KP_WIDTH - wFONT_MAX_WIDTH*strlen(t)) / 2,
y + (KP_HEIGHT - 13) / 2,2); y + (KP_HEIGHT - wFONT_GET_HEIGHT) / 2);
} }
i++; i++;
} }
@ -1770,8 +1770,8 @@ draw_menu_buttons(const menuitem_t *menu)
blit8BitWidthBitmap(button_start+3, y+(MENU_BUTTON_HEIGHT-ICON_HEIGHT)/2, ICON_WIDTH, ICON_HEIGHT, &check_box[button.icon*2*ICON_HEIGHT]); blit8BitWidthBitmap(button_start+3, y+(MENU_BUTTON_HEIGHT-ICON_HEIGHT)/2, ICON_WIDTH, ICON_HEIGHT, &check_box[button.icon*2*ICON_HEIGHT]);
text_offs = button_start+6+ICON_WIDTH+1; text_offs = button_start+6+ICON_WIDTH+1;
} }
ili9341_drawstring_size(button.text, text_offs, y+(button_height-2*FONT_GET_HEIGHT)/2, 2); // ili9341_drawstring_size(button.text, text_offs, y+(button_height-2*FONT_GET_HEIGHT)/2, 2);
// ili9341_drawstring_7x13(button.text, text_offs, y+(button_height-bFONT_GET_HEIGHT)/2); ili9341_drawstring_10x14(button.text, text_offs, y+(button_height-wFONT_GET_HEIGHT)/2);
#ifdef __ICONS__ #ifdef __ICONS__
if (menu[i].type & MT_ICON) { if (menu[i].type & MT_ICON) {
blit8BitWidthBitmap(button_start+MENU_FORM_WIDTH-2*FORM_ICON_WIDTH-8,y+(button_height-FORM_ICON_HEIGHT)/2,FORM_ICON_WIDTH,FORM_ICON_HEIGHT,& left_icons[((menu[i].data >>4)&0xf)*2*FORM_ICON_HEIGHT]); blit8BitWidthBitmap(button_start+MENU_FORM_WIDTH-2*FORM_ICON_WIDTH-8,y+(button_height-FORM_ICON_HEIGHT)/2,FORM_ICON_WIDTH,FORM_ICON_HEIGHT,& left_icons[((menu[i].data >>4)&0xf)*2*FORM_ICON_HEIGHT]);
@ -2305,8 +2305,8 @@ keypad_click(int key)
return KP_DONE; return KP_DONE;
} else if (c <= 9 && kp_index < NUMINPUT_LEN) { } else if (c <= 9 && kp_index < NUMINPUT_LEN) {
kp_buf[kp_index++] = '0' + c; kp_buf[kp_index++] = '0' + c;
} else if (c>=KP_1) { } else if (c>=KP_0) {
kp_buf[kp_index++] = keypad_scale_text[c-KP_1][0]; kp_buf[kp_index++] = keypad_scale_text[c-KP_0][0];
if (c >=KP_10) if (c >=KP_10)
kp_buf[kp_index++] = '0'; kp_buf[kp_index++] = '0';
if (c >=KP_100) if (c >=KP_100)

@ -240,6 +240,7 @@ enum {
#define KP_n 23 #define KP_n 23
#define KP_p 24 #define KP_p 24
#define KP_0 31
#define KP_1 32 #define KP_1 32
#define KP_2 33 #define KP_2 33
#define KP_5 34 #define KP_5 34
@ -316,9 +317,9 @@ static const keypads_t keypads_positive[] = {
static const keypads_t keypads_pos_unit[] = { static const keypads_t keypads_pos_unit[] = {
{ 1, 3, KP_PERIOD }, { 1, 3, KP_PERIOD },
{ 0, 3, 0 }, { 0, 3, 0 },
{ 0, 2, KP_1 }, { 0, 2, 1 },
{ 1, 2, KP_2 }, { 1, 2, 2 },
{ 2, 2, KP_5 }, { 2, 2, 5 },
{ 0, 1, KP_10 }, { 0, 1, KP_10 },
{ 1, 1, KP_20 }, { 1, 1, KP_20 },
{ 2, 1, KP_50 }, { 2, 1, KP_50 },
@ -453,12 +454,12 @@ static UI_FUNCTION_ADV_CALLBACK(menu_mode_acb)
(void)data; (void)data;
if (b){ if (b){
if (item == setting.mode) { if (item == setting.mode) {
b->param_1.text = "RETURN"; b->param_1.text = "Return";
b->bg = RGB565(200,200,200);//config.menu_active_color; b->bg = RGB565(200,200,200);//config.menu_active_color;
b->border = BUTTON_BORDER_FALLING | MENU_BUTTON_BORDER; b->border = BUTTON_BORDER_FALLING | MENU_BUTTON_BORDER;
} }
else else
b->param_1.text = "SWITCH"; b->param_1.text = "Switch";
return; return;
} }
set_mode(item); set_mode(item);
@ -1196,7 +1197,7 @@ static const menuitem_t menu_store_preset_high[8] =
{ MT_ADV_CALLBACK, 7, "STORE %d", menu_store_preset_acb}, { MT_ADV_CALLBACK, 7, "STORE %d", menu_store_preset_acb},
{ MT_ADV_CALLBACK, 8, "STORE %d", menu_store_preset_acb}, { MT_ADV_CALLBACK, 8, "STORE %d", menu_store_preset_acb},
{ MT_ADV_CALLBACK, 100,"FACTORY\nDEFAULTS",menu_store_preset_acb}, { MT_ADV_CALLBACK, 100,"FACTORY\nDEFAULTS",menu_store_preset_acb},
{ MT_CANCEL, 255, "\032 BACK", NULL }, { MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1208,7 +1209,7 @@ static const menuitem_t menu_load_preset_high[] =
{ MT_ADV_CALLBACK, 7, "LOAD %d", menu_load_preset_acb}, { MT_ADV_CALLBACK, 7, "LOAD %d", menu_load_preset_acb},
{ MT_ADV_CALLBACK, 8, "LOAD %s", menu_load_preset_acb}, { MT_ADV_CALLBACK, 8, "LOAD %s", menu_load_preset_acb},
{ MT_SUBMENU, 0, "STORE" , menu_store_preset_high}, { MT_SUBMENU, 0, "STORE" , menu_store_preset_high},
{ MT_CANCEL, 255, "\032 BACK", NULL }, { MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
#endif #endif
@ -1221,7 +1222,7 @@ static const menuitem_t menu_store_preset[] =
{ MT_ADV_CALLBACK, 3, "STORE %d", menu_store_preset_acb}, { MT_ADV_CALLBACK, 3, "STORE %d", menu_store_preset_acb},
{ MT_ADV_CALLBACK, 4, "STORE %d", menu_store_preset_acb}, { MT_ADV_CALLBACK, 4, "STORE %d", menu_store_preset_acb},
{ MT_ADV_CALLBACK, 100,"FACTORY\nDEFAULTS",menu_store_preset_acb}, { MT_ADV_CALLBACK, 100,"FACTORY\nDEFAULTS",menu_store_preset_acb},
{ MT_CANCEL, 255, "\032 BACK", NULL }, { MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1233,7 +1234,7 @@ static const menuitem_t menu_load_preset[] =
{ MT_ADV_CALLBACK, 3, "LOAD %d" , menu_load_preset_acb}, { MT_ADV_CALLBACK, 3, "LOAD %d" , menu_load_preset_acb},
{ MT_ADV_CALLBACK, 4, "LOAD %d" , menu_load_preset_acb}, { MT_ADV_CALLBACK, 4, "LOAD %d" , menu_load_preset_acb},
{ MT_SUBMENU, 0, "STORE" , menu_store_preset}, { MT_SUBMENU, 0, "STORE" , menu_store_preset},
{ MT_CANCEL, 255, "\032 BACK", NULL }, { MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1242,7 +1243,7 @@ static const menuitem_t menu_drive[] = {
{ MT_ADV_CALLBACK, 14, "%+ddBm", menu_drive_acb}, { MT_ADV_CALLBACK, 14, "%+ddBm", menu_drive_acb},
{ MT_ADV_CALLBACK, 13, "%+ddBm", menu_drive_acb}, { MT_ADV_CALLBACK, 13, "%+ddBm", menu_drive_acb},
{ MT_ADV_CALLBACK, 12, "%+ddBm", menu_drive_acb}, { MT_ADV_CALLBACK, 12, "%+ddBm", menu_drive_acb},
{ MT_CANCEL, 255, "\032 BACK", NULL }, { MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1253,7 +1254,7 @@ static const menuitem_t menu_drive_wide3[] = {
{ MT_FORM | MT_ADV_CALLBACK, 2, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 2, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_ADV_CALLBACK, 1, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 1, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_ADV_CALLBACK, 0, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 0, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_CANCEL, 255, "\032 BACK", NULL }, { MT_FORM | MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1263,8 +1264,8 @@ static const menuitem_t menu_drive_wide2[] = {
{ MT_FORM | MT_ADV_CALLBACK, 8, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 8, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_ADV_CALLBACK, 7, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 7, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_ADV_CALLBACK, 6, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 6, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_SUBMENU, 255, "\033 MORE", menu_drive_wide3}, { MT_FORM | MT_SUBMENU, 255, S_RARROW" MORE", menu_drive_wide3},
{ MT_FORM | MT_CANCEL, 255, "\032 BACK", NULL }, { MT_FORM | MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1274,8 +1275,8 @@ static const menuitem_t menu_drive_wide[] = {
{ MT_FORM | MT_ADV_CALLBACK, 13, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 13, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_ADV_CALLBACK, 12, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 12, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_ADV_CALLBACK, 11, "%+ddBm", menu_drive_acb}, { MT_FORM | MT_ADV_CALLBACK, 11, "%+ddBm", menu_drive_acb},
{ MT_FORM | MT_SUBMENU, 255, "\033 MORE", menu_drive_wide2}, { MT_FORM | MT_SUBMENU, 255, S_RARROW" MORE", menu_drive_wide2},
{ MT_FORM | MT_CANCEL, 255, "\032 BACK", NULL }, { MT_FORM | MT_CANCEL, 255, S_LARROW" BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1287,7 +1288,7 @@ static const menuitem_t menu_modulation[] = {
{ MT_FORM | MT_ADV_CALLBACK, MO_NFM, "NARROW FM", menu_modulation_acb}, { MT_FORM | MT_ADV_CALLBACK, MO_NFM, "NARROW FM", menu_modulation_acb},
{ MT_FORM | MT_ADV_CALLBACK, MO_WFM, "WIDE FM", menu_modulation_acb}, { MT_FORM | MT_ADV_CALLBACK, MO_WFM, "WIDE FM", menu_modulation_acb},
{ MT_FORM | MT_ADV_CALLBACK | MT_LOW, MO_EXTERNAL, "EXTERNAL", menu_modulation_acb}, { MT_FORM | MT_ADV_CALLBACK | MT_LOW, MO_EXTERNAL, "EXTERNAL", menu_modulation_acb},
{ MT_FORM | MT_CANCEL, 0, "\032 BACK",NULL }, { MT_FORM | MT_CANCEL, 0, S_LARROW" BACK",NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1321,7 +1322,7 @@ static const menuitem_t menu_average[] = {
{ MT_ADV_CALLBACK, 3, "MAX\nDECAY", menu_average_acb}, { MT_ADV_CALLBACK, 3, "MAX\nDECAY", menu_average_acb},
{ MT_ADV_CALLBACK, 4, "AVER 4", menu_average_acb}, { MT_ADV_CALLBACK, 4, "AVER 4", menu_average_acb},
{ MT_ADV_CALLBACK, 5, "AVER 16", menu_average_acb}, { MT_ADV_CALLBACK, 5, "AVER 16", menu_average_acb},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1333,7 +1334,7 @@ static const menuitem_t menu_rbw[] = {
{ MT_ADV_CALLBACK, 4, "%4dkHz", menu_rbw_acb}, { MT_ADV_CALLBACK, 4, "%4dkHz", menu_rbw_acb},
{ MT_ADV_CALLBACK, 5, "%4dkHz", menu_rbw_acb}, { MT_ADV_CALLBACK, 5, "%4dkHz", menu_rbw_acb},
{ MT_ADV_CALLBACK, 6, "%4dkHz", menu_rbw_acb}, { MT_ADV_CALLBACK, 6, "%4dkHz", menu_rbw_acb},
{ MT_CANCEL, -1, "\032 BACK", NULL }, { MT_CANCEL, -1, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1345,8 +1346,8 @@ static const menuitem_t menu_scale_per2[] = {
{ MT_ADV_CALLBACK, 9, "0.02/", menu_scale_per_acb}, { MT_ADV_CALLBACK, 9, "0.02/", menu_scale_per_acb},
{ MT_ADV_CALLBACK,10, "0.01/", menu_scale_per_acb}, { MT_ADV_CALLBACK,10, "0.01/", menu_scale_per_acb},
//{ MT_ADV_CALLBACK,11, "0.005/", menu_scale_per_acb}, //{ MT_ADV_CALLBACK,11, "0.005/", menu_scale_per_acb},
//{ MT_SUBMENU, 0, "\033 MORE", menu_scale_per2}, //{ MT_SUBMENU, 0, S_RARROW" MORE", menu_scale_per2},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1357,8 +1358,8 @@ static const menuitem_t menu_scale_per[] = {
{ MT_ADV_CALLBACK, 3, " 2/", menu_scale_per_acb}, { MT_ADV_CALLBACK, 3, " 2/", menu_scale_per_acb},
{ M_ADVT_CALLBACK, 4, " 1/", menu_scale_per_acb}, { M_ADVT_CALLBACK, 4, " 1/", menu_scale_per_acb},
{ MT_ADV_CALLBACK, 5, "0.5/", menu_scale_per_acb}, { MT_ADV_CALLBACK, 5, "0.5/", menu_scale_per_acb},
{ MT_SUBMENU, 0, "\033 MORE", menu_scale_per2}, { MT_SUBMENU, 0, S_RARROW" MORE", menu_scale_per2},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
#endif #endif
@ -1368,7 +1369,7 @@ static const menuitem_t menu_reffer2[] = {
{ MT_FORM | MT_ADV_CALLBACK, 5, "%s", menu_reffer_acb}, { MT_FORM | MT_ADV_CALLBACK, 5, "%s", menu_reffer_acb},
{ MT_FORM | MT_ADV_CALLBACK, 6, "%s", menu_reffer_acb}, { MT_FORM | MT_ADV_CALLBACK, 6, "%s", menu_reffer_acb},
{ MT_FORM | MT_ADV_CALLBACK, 7, "%s", menu_reffer_acb}, { MT_FORM | MT_ADV_CALLBACK, 7, "%s", menu_reffer_acb},
{ MT_FORM | MT_CANCEL, 0, "\032 BACK", NULL }, { MT_FORM | MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };
#endif #endif
@ -1381,8 +1382,8 @@ static const menuitem_t menu_reffer[] = {
{ MT_FORM | MT_ADV_CALLBACK, 4, "%s", menu_reffer_acb}, { MT_FORM | MT_ADV_CALLBACK, 4, "%s", menu_reffer_acb},
{ MT_FORM | MT_ADV_CALLBACK, 6, "%s", menu_reffer_acb}, { MT_FORM | MT_ADV_CALLBACK, 6, "%s", menu_reffer_acb},
{ MT_FORM | MT_ADV_CALLBACK, 7, "%s", menu_reffer_acb}, { MT_FORM | MT_ADV_CALLBACK, 7, "%s", menu_reffer_acb},
// { MT_FORM | MT_SUBMENU, 0, "\033 MORE", menu_reffer2}, //{ MT_FORM | MT_SUBMENU, 0, S_RARROW" MORE", menu_reffer2},
{ MT_FORM | MT_CANCEL, 0, "\032 BACK", NULL }, { MT_FORM | MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1391,25 +1392,25 @@ static const menuitem_t menu_atten[] = {
{ MT_KEYPAD | MT_LOW, KM_ATTENUATION, "MANUAL", "0 - 30dB"}, { MT_KEYPAD | MT_LOW, KM_ATTENUATION, "MANUAL", "0 - 30dB"},
{ MT_ADV_CALLBACK | MT_HIGH,0, "0dB", menu_atten_high_acb}, { MT_ADV_CALLBACK | MT_HIGH,0, "0dB", menu_atten_high_acb},
{ MT_ADV_CALLBACK | MT_HIGH,30, "22.5 - 40dB", menu_atten_high_acb}, { MT_ADV_CALLBACK | MT_HIGH,30, "22.5 - 40dB", menu_atten_high_acb},
{ MT_CANCEL, 0, "\032 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
}; };
static const menuitem_t menu_reflevel[] = { static const menuitem_t menu_reflevel[] = {
{ MT_ADV_CALLBACK,0, "AUTO", menu_reflevel_acb}, { MT_ADV_CALLBACK,0, "AUTO", menu_reflevel_acb},
{ MT_KEYPAD, KM_REFLEVEL, "MANUAL", NULL}, { MT_KEYPAD, KM_REFLEVEL, "MANUAL", NULL},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
const menuitem_t menu_marker_search[] = { const menuitem_t menu_marker_search[] = {
//{ MT_CALLBACK, "OFF", menu_marker_search_cb }, //{ MT_CALLBACK, "OFF", menu_marker_search_cb },
{ MT_CALLBACK, 0, "MIN\n" "\032 LEFT", menu_marker_search_cb }, { MT_CALLBACK, 0, "MIN\n" S_LARROW" LEFT", menu_marker_search_cb },
{ MT_CALLBACK, 1, "MIN\n" "\033 RIGHT", menu_marker_search_cb }, { MT_CALLBACK, 1, "MIN\n" S_RARROW" RIGHT", menu_marker_search_cb },
{ MT_CALLBACK, 2, "MAX\n" "\032 LEFT", menu_marker_search_cb }, { MT_CALLBACK, 2, "MAX\n" S_LARROW" LEFT", menu_marker_search_cb },
{ MT_CALLBACK, 3, "MAX\n" "\033 RIGHT", menu_marker_search_cb }, { MT_CALLBACK, 3, "MAX\n" S_RARROW" RIGHT", menu_marker_search_cb },
{ MT_ADV_CALLBACK, 0, "TRACKING", menu_marker_tracking_acb }, { MT_ADV_CALLBACK, 0, "TRACKING",menu_marker_tracking_acb },
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1421,7 +1422,7 @@ const menuitem_t menu_marker_modify[] = {
{ MT_ADV_CALLBACK, M_NORMAL, "NORMAL", menu_marker_modify_acb}, { MT_ADV_CALLBACK, M_NORMAL, "NORMAL", menu_marker_modify_acb},
{ MT_SUBMENU, 0, "SEARCH", menu_marker_search}, { MT_SUBMENU, 0, "SEARCH", menu_marker_search},
{ MT_CALLBACK, M_DELETE, "DELETE", menu_marker_delete_cb}, { MT_CALLBACK, M_DELETE, "DELETE", menu_marker_delete_cb},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1435,7 +1436,7 @@ const menuitem_t menu_marker_sel[] = {
{ MT_CALLBACK, 0, "DELTA", menu_marker_sel_cb }, { MT_CALLBACK, 0, "DELTA", menu_marker_sel_cb },
{ MT_CALLBACK, 0, "NOISE", menu_marker_sel_cb }, { MT_CALLBACK, 0, "NOISE", menu_marker_sel_cb },
{ MT_CALLBACK, 0, "TRACKING", menu_marker_sel_cb }, { MT_CALLBACK, 0, "TRACKING", menu_marker_sel_cb },
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
#endif #endif
@ -1445,17 +1446,17 @@ const menuitem_t menu_marker_select[] = {
{ MT_ADV_CALLBACK, 2, "MARKER %d", menu_marker_select_acb }, { MT_ADV_CALLBACK, 2, "MARKER %d", menu_marker_select_acb },
{ MT_ADV_CALLBACK, 3, "MARKER %d", menu_marker_select_acb }, { MT_ADV_CALLBACK, 3, "MARKER %d", menu_marker_select_acb },
{ MT_ADV_CALLBACK, 4, "MARKER %d", menu_marker_select_acb }, { MT_ADV_CALLBACK, 4, "MARKER %d", menu_marker_select_acb },
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
const menuitem_t menu_marker_ops[] = { const menuitem_t menu_marker_ops[] = {
{ MT_CALLBACK, ST_START, "\033 START", menu_marker_op_cb }, { MT_CALLBACK, ST_START, S_RARROW" START", menu_marker_op_cb },
{ MT_CALLBACK, ST_STOP, "\033 STOP", menu_marker_op_cb }, { MT_CALLBACK, ST_STOP, S_RARROW" STOP", menu_marker_op_cb },
{ MT_CALLBACK, ST_CENTER, "\033 CENTER", menu_marker_op_cb }, { MT_CALLBACK, ST_CENTER, S_RARROW" CENTER", menu_marker_op_cb },
{ MT_CALLBACK, ST_SPAN, "\033 SPAN", menu_marker_op_cb }, { MT_CALLBACK, ST_SPAN, S_RARROW" SPAN", menu_marker_op_cb },
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1466,13 +1467,13 @@ static const menuitem_t menu_marker[] = {
{ MT_SUBMENU, 0, "MODIFY\nMARKERS", menu_marker_select}, { MT_SUBMENU, 0, "MODIFY\nMARKERS", menu_marker_select},
{ MT_SUBMENU, 0, "MARKER OPS", menu_marker_ops}, { MT_SUBMENU, 0, "MARKER OPS", menu_marker_ops},
{ MT_SUBMENU, 0, "SEARCH\nMARKER", menu_marker_search}, { MT_SUBMENU, 0, "SEARCH\nMARKER", menu_marker_search},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
static const menuitem_t menu_dfu[] = { static const menuitem_t menu_dfu[] = {
{ MT_FORM | MT_CALLBACK, 0, "ENTER DFU", menu_dfu_cb}, { MT_FORM | MT_CALLBACK, 0, "ENTER DFU", menu_dfu_cb},
{ MT_FORM | MT_CANCEL, 0, "\032 BACK", NULL }, { MT_FORM | MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1483,7 +1484,7 @@ static const menuitem_t menu_harmonic[] =
{ MT_ADV_CALLBACK, 3, "3", menu_harmonic_acb}, { MT_ADV_CALLBACK, 3, "3", menu_harmonic_acb},
{ MT_ADV_CALLBACK, 4, "4", menu_harmonic_acb}, { MT_ADV_CALLBACK, 4, "4", menu_harmonic_acb},
{ MT_ADV_CALLBACK, 5, "5", menu_harmonic_acb}, { MT_ADV_CALLBACK, 5, "5", menu_harmonic_acb},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
#endif #endif
@ -1497,7 +1498,7 @@ static const menuitem_t menu_scanning_speed[] =
// { MT_KEYPAD | MT_LOW,KM_FAST_SPEEDUP, "FAST\nSPEEDUP", "2..20"}, // { MT_KEYPAD | MT_LOW,KM_FAST_SPEEDUP, "FAST\nSPEEDUP", "2..20"},
{ MT_KEYPAD, KM_SAMPLETIME, "SAMPLE\nDELAY", "300..30000"}, // This must be item 4 to match highlighting { MT_KEYPAD, KM_SAMPLETIME, "SAMPLE\nDELAY", "300..30000"}, // This must be item 4 to match highlighting
{ MT_KEYPAD, KM_OFFSET_DELAY, "OFFSET\nDELAY", "300..30000"}, // This must be item 5 to match highlighting { MT_KEYPAD, KM_OFFSET_DELAY, "OFFSET\nDELAY", "300..30000"}, // This must be item 5 to match highlighting
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1516,7 +1517,7 @@ static const menuitem_t menu_sweep_speed[] =
{ MT_KEYPAD, KM_SWEEP_TIME, "SWEEP\nTIME", "0..600s, 0=disable"}, // This must be item 3 to match highlighting { MT_KEYPAD, KM_SWEEP_TIME, "SWEEP\nTIME", "0..600s, 0=disable"}, // This must be item 3 to match highlighting
{ MT_SUBMENU, 0, "SWEEP\nPOINTS", menu_sweep_points}, { MT_SUBMENU, 0, "SWEEP\nPOINTS", menu_sweep_points},
{ MT_KEYPAD | MT_LOW,KM_FAST_SPEEDUP,"FAST\nSPEEDUP", "2..20, 0=disable"}, { MT_KEYPAD | MT_LOW,KM_FAST_SPEEDUP,"FAST\nSPEEDUP", "2..20, 0=disable"},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1532,7 +1533,7 @@ static const menuitem_t menu_settings2[] =
#ifdef __ULTRA__ #ifdef __ULTRA__
{ MT_SUBMENU,0, "HARMONIC", menu_harmonic}, { MT_SUBMENU,0, "HARMONIC", menu_harmonic},
#endif #endif
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1544,8 +1545,8 @@ static const menuitem_t menu_settings[] =
{ MT_SUBMENU,0, "SCAN SPEED", menu_scanning_speed}, { MT_SUBMENU,0, "SCAN SPEED", menu_scanning_speed},
{ MT_KEYPAD, KM_REPEAT, "SAMPLE\nREPEAT", "1..100"}, { MT_KEYPAD, KM_REPEAT, "SAMPLE\nREPEAT", "1..100"},
{ MT_SUBMENU | MT_LOW,0, "MIXER\nDRIVE", menu_drive}, { MT_SUBMENU | MT_LOW,0, "MIXER\nDRIVE", menu_drive},
{ MT_SUBMENU, 0, "\033 MORE", menu_settings2}, { MT_SUBMENU, 0, S_RARROW" MORE", menu_settings2},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1557,7 +1558,7 @@ static const menuitem_t menu_measure[] = {
// { MT_ADV_CALLBACK, M_STOP_BAND, "STOP\nBAND", menu_measure_acb}, // { MT_ADV_CALLBACK, M_STOP_BAND, "STOP\nBAND", menu_measure_acb},
// { MT_ADV_CALLBACK, M_PASS_BAND, "PASS\nBAND", menu_measure_acb}, // { MT_ADV_CALLBACK, M_PASS_BAND, "PASS\nBAND", menu_measure_acb},
// { MT_ADV_CALLBACK | MT_LOW, M_LINEARITY, "LINEAR", menu_measure_acb}, // { MT_ADV_CALLBACK | MT_LOW, M_LINEARITY, "LINEAR", menu_measure_acb},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1566,7 +1567,7 @@ static const menuitem_t menu_calibrate[] =
{ MT_FORM | MT_TITLE, 0, "CONNECT INPUT AND OUTPUT", NULL}, { MT_FORM | MT_TITLE, 0, "CONNECT INPUT AND OUTPUT", NULL},
{ MT_FORM | MT_CALLBACK, 0, "CALIBRATE", menu_calibrate_cb}, { MT_FORM | MT_CALLBACK, 0, "CALIBRATE", menu_calibrate_cb},
{ MT_FORM | MT_CALLBACK, 0, "RESET CALBRATION", menu_calibrate_cb}, { MT_FORM | MT_CALLBACK, 0, "RESET CALBRATION", menu_calibrate_cb},
{ MT_FORM | MT_CANCEL, 0, "\032 BACK", NULL }, { MT_FORM | MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1577,8 +1578,8 @@ static const menuitem_t menu_config[] = {
{ MT_SUBMENU, 0, "LEVEL CAL", menu_calibrate}, { MT_SUBMENU, 0, "LEVEL CAL", menu_calibrate},
{ MT_CALLBACK, 0, "VERSION", menu_config_cb}, { MT_CALLBACK, 0, "VERSION", menu_config_cb},
{ MT_SUBMENU, 0, "EXPERT\nCONFIG", menu_settings}, { MT_SUBMENU, 0, "EXPERT\nCONFIG", menu_settings},
{ MT_SUBMENU, 0, "\033 DFU", menu_dfu}, { MT_SUBMENU, 0, S_RARROW" DFU", menu_dfu},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1592,7 +1593,7 @@ static const menuitem_t menu_display[] = {
{ MT_SUBMENU, 0, "SWEEP\nSETTINGS", menu_sweep_speed}, { MT_SUBMENU, 0, "SWEEP\nSETTINGS", menu_sweep_speed},
// { MT_KEYPAD, KM_SWEEP_TIME, "SWEEP\nTIME", NULL}, // { MT_KEYPAD, KM_SWEEP_TIME, "SWEEP\nTIME", NULL},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1605,7 +1606,7 @@ static const menuitem_t menu_unit[] =
//{ MT_ADV_CALLBACK,U_UVOLT, S_MICRO"Volt", menu_unit_acb}, //{ MT_ADV_CALLBACK,U_UVOLT, S_MICRO"Volt", menu_unit_acb},
{ MT_ADV_CALLBACK,U_WATT, "Watt", menu_unit_acb}, { MT_ADV_CALLBACK,U_WATT, "Watt", menu_unit_acb},
//{ MT_ADV_CALLBACK,U_UWATT, S_MICRO"Watt", menu_unit_acb}, //{ MT_ADV_CALLBACK,U_UWATT, S_MICRO"Watt", menu_unit_acb},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1616,7 +1617,7 @@ static const menuitem_t menu_trigger[] = {
{ MT_KEYPAD, KM_TRIGGER, "TRIGGER\nLEVEL", NULL}, { MT_KEYPAD, KM_TRIGGER, "TRIGGER\nLEVEL", NULL},
{ MT_ADV_CALLBACK, T_UP, "UP\nEDGE", menu_trigger_acb}, { MT_ADV_CALLBACK, T_UP, "UP\nEDGE", menu_trigger_acb},
{ MT_ADV_CALLBACK, T_DOWN, "DOWN\nEDGE", menu_trigger_acb}, { MT_ADV_CALLBACK, T_DOWN, "DOWN\nEDGE", menu_trigger_acb},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1629,7 +1630,7 @@ static const menuitem_t menu_level[] = {
{ MT_SUBMENU, 0, "UNIT", menu_unit}, { MT_SUBMENU, 0, "UNIT", menu_unit},
{ MT_KEYPAD, KM_OFFSET, "EXTERNAL\nAMP",NULL}, { MT_KEYPAD, KM_OFFSET, "EXTERNAL\nAMP",NULL},
{ MT_SUBMENU, 0, "TRIGGER", menu_trigger}, { MT_SUBMENU, 0, "TRIGGER", menu_trigger},
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1643,21 +1644,21 @@ static const menuitem_t menu_stimulus[] = {
#ifdef __SPUR__ #ifdef __SPUR__
{ MT_ADV_CALLBACK | MT_LOW,0, "SPUR\nREMOVAL", menu_spur_acb}, { MT_ADV_CALLBACK | MT_LOW,0, "SPUR\nREMOVAL", menu_spur_acb},
#endif #endif
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, S_LARROW" BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
static const menuitem_t menu_mode[] = { static const menuitem_t menu_mode[] = {
// { MT_FORM | MT_TITLE, 0, "tinySA MODE", NULL}, // { MT_FORM | MT_TITLE, 0, "tinySA MODE", NULL},
{ MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_LOW_INPUT+I_SA, "%s TO LOW INPUT", menu_mode_acb}, { MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_LOW_INPUT+I_SA, "%s to LOW in", menu_mode_acb},
{ MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_HIGH_INPUT+I_SA, "%s TO HIGH INPUT", menu_mode_acb}, { MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_HIGH_INPUT+I_SA, "%s to HIGH in", menu_mode_acb},
{ MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_LOW_OUTPUT+I_SINUS, "%s TO LOW OUTPUT", menu_mode_acb}, { MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_LOW_OUTPUT+I_SINUS, "%s to LOW out", menu_mode_acb},
{ MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_HIGH_OUTPUT+I_GEN, "%s TO HIGH OUTPUT", menu_mode_acb}, { MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_HIGH_OUTPUT+I_GEN, "%s to HIGH out", menu_mode_acb},
{ MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_CONNECT+I_GEN, "CAL OUTPUT: %s", menu_sreffer_acb}, { MT_FORM | MT_ADV_CALLBACK | MT_ICON, I_CONNECT+I_GEN, "Cal. output: %s", menu_sreffer_acb},
#ifdef __ULTRA__ #ifdef __ULTRA__
{ MT_FORM | MT_CALLBACK | MT_ICON, I_LOW_INPUT+I_SA, "ULTRA HIGH INPUT",menu_mode_cb}, { MT_FORM | MT_CALLBACK | MT_ICON, I_LOW_INPUT+I_SA, "ULTRA HIGH INPUT",menu_mode_cb},
#endif #endif
// { MT_FORM | MT_CANCEL, 0, "\032 BACK", NULL }, // { MT_FORM | MT_CANCEL, 0, S_RARROW" BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };

Loading…
Cancel
Save

Powered by TurnKey Linux.