diff --git a/ili9341.c b/ili9341.c index 4620adc..bcca3ec 100644 --- a/ili9341.c +++ b/ili9341.c @@ -568,7 +568,7 @@ void blit8BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height ili9341_bulk(x, y, width, height); } -static 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) { uint16_t *buf = spi_buffer; diff --git a/plot.c b/plot.c index 555d553..0e57e0f 100644 --- a/plot.c +++ b/plot.c @@ -1558,7 +1558,10 @@ void request_to_draw_cells_behind_menu(void) { // Values Hardcoded from ui.c - invalidate_rect(320-70, 0, 319, 239); + if (current_menu_is_form()) + invalidate_rect(25, 0, 319, 239); + else + invalidate_rect(320-60, 0, 319, 239); redraw_request |= REDRAW_CELLS; } @@ -1843,8 +1846,8 @@ static void cell_draw_marker_info(int x0, int y0) if (i >= 2 && in_selftest) { plot_printf(buf, sizeof buf, "DO NOT SWITCH OFF!!"); j = 2; - int xpos = 1 + (j%2)*(WIDTH/2) + CELLOFFSETX - x0; - int ypos = 1 + (j/2)*(16) - y0; + int xpos = 1 + CELLOFFSETX +25 - x0; + int ypos = 1 + 16 - y0; cell_drawstring_7x13(buf, xpos, ypos); break; diff --git a/sa_core.c b/sa_core.c index fcfdf72..da76f41 100644 --- a/sa_core.c +++ b/sa_core.c @@ -1238,8 +1238,8 @@ static const struct { float stop; } test_case [TEST_COUNT] = {// Condition Preparation Center Span Pass Width Stop - {TC_BELOW, TP_SILENT, 0.001, 0.0005, -10,0, 0}, // 1 Zero Hz leakage - {TC_BELOW, TP_SILENT, 0.01, 0.01, -40, 0, 0}, // 2 Phase noise of zero Hz + {TC_BELOW, TP_SILENT, 0.005, 0.01, -10,0, 0}, // 1 Zero Hz leakage + {TC_BELOW, TP_SILENT, 0.01, 0.01, -40, 0, 0}, // 2 Phase noise of zero Hz {TC_SIGNAL, TP_10MHZ, 20, 7, -40, 30, -90 }, // 3 {TC_SIGNAL, TP_10MHZ, 30, 7, -30, 30, -90 }, // 4 {TC_BELOW, TP_SILENT, 200, 100, -75, 0, 0}, // 5 Wide band noise floor low mode @@ -1280,11 +1280,11 @@ static void test_acquire(int i) else setting_mode = M_HIGH; #endif - SetAverage(4); - sweep(false); - sweep(false); - sweep(false); +// SetAverage(4); sweep(false); +// sweep(false); +// sweep(false); +// sweep(false); plot_into_index(measured); redraw_request |= REDRAW_CELLS | REDRAW_FREQUENCY; } @@ -1463,7 +1463,8 @@ int test_validate(int i) if (current_test_status != TS_PASS || test_case[i+1].kind == TC_END) test_wait = true; -// draw_frequencies(); + test_status[i] = current_test_status; // Must be set before draw_all() !!!!!!!! + // draw_frequencies(); // draw_cal_status(); draw_all(TRUE); resume_sweep(); @@ -1654,8 +1655,8 @@ void self_test(void) i++; } ili9341_set_foreground(BRIGHT_COLOR_GREEN); - ili9341_drawstring_7x13("Self test complete", 30, 120); - ili9341_drawstring_7x13("Touch screen to continue", 30, 140); + ili9341_drawstring_7x13("Self test complete", 50, 200); + ili9341_drawstring_7x13("Touch screen to continue", 50, 215); wait_user(); ili9341_clear_screen(); diff --git a/ui.c b/ui.c index 35a7b30..83e9ce9 100644 --- a/ui.c +++ b/ui.c @@ -1554,6 +1554,9 @@ draw_menu_buttons(const menuitem_t *menu) if (menu[i].type & MT_FORM) { ili9341_fill(active_button_start+2, y+2, active_button_width-4, FONT_GET_HEIGHT*2+8, bg); ili9341_drawstring_size(text, active_button_start+6, y+6, 2); +// blit16BitWidthBitmap(240,y+6,16,16,&icons[3*16]); +// blit16BitWidthBitmap(256,y+6,16,16,&icons[0]); + } else { if (menu_is_multiline(menu[i].label, &l1, &l2)) { #define BIG_BUTTON_FONT 1 diff --git a/ui_sa.c b/ui_sa.c index a721dbd..408eb41 100644 --- a/ui_sa.c +++ b/ui_sa.c @@ -62,6 +62,142 @@ void set_measurement(int); // extern int settingSpeed; extern int setting_step_delay; +void blit16BitWidthBitmap(uint16_t x, uint16_t y, uint16_t width, uint16_t height, + const uint16_t *bitmap); + +const uint16_t icons [] = +{ + + /* Character 0 (0x00): + width 16 + +-----------------+ + | | + | *************** | + | * * | + |** * | + | * * * | + | * * * | + | * * * * | + | * * * * | + | * * * * * | + | * * * * * * | + | * * * * * * * | + | * * * * * * * | + |** *********** * | + | * * | + | *************** | + | | + +-----------------+ */ + 0x0000, + 0x7fff, + 0x4001, + 0xc001, + 0x4001, + 0x4001, + 0x4801, + 0x4801, + 0x4a89, + 0x4aa9, + 0x4aa9, + 0x5ffd, + 0xc001, + 0x4001, + 0x7fff, + 0x0000, + + /* Character 1 (0x01: + width 16 + +-----------------+ + | | + | ** | + | **** | + | ************ | + | **** | + | ** | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + +-----------------+ */ + 0x0000, + 0x0060, + 0x0038, + 0x0ffe, + 0x0038, + 0x0060, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character 2 (0x02): + width 16 + +-----------------+ + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | ** | + | **** | + | ************ | + | **** | + | ** | + | | + +-----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0060, + 0x0038, + 0x0ffe, + 0x0038, + 0x0060, + 0x0000, + + /* High arrow left 0x03 */ + + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000110000000, + 0b0000011110000000, + 0b0000111111111110, + 0b0000011110000000, + 0b0000000110000000, + 0b0000000000000000, +}; enum { @@ -279,6 +415,7 @@ static void menu_config_cb(int item, uint8_t data) draw_menu(); break; case 2: + sweep_mode = 0; // Suspend sweep to save time menu_move_back(); ui_mode_normal(); sweep_mode = SWEEP_SELFTEST;