diff --git a/ESP32_Oscilloscope/screen.ino b/ESP32_Oscilloscope/screen.ino index 6ac4457..d373bb7 100644 --- a/ESP32_Oscilloscope/screen.ino +++ b/ESP32_Oscilloscope/screen.ino @@ -149,11 +149,11 @@ void draw_sprite(float freq, draw_channel1(trigger, 0, i2s_buff, sample_rate); } - int shift = 150; + int shift = HEIGHT - 110; if (menu) { - spr.drawLine( 0, 120, HEIGHT, 120, TFT_WHITE); //center line - spr.fillRect(shift, 0, 102, 135, TFT_BLACK); - spr.drawRect(shift, 0, 102, 135, TFT_WHITE); + spr.drawLine( 0, WIDTH/2, HEIGHT, WIDTH/2, TFT_WHITE); //center line + spr.fillRect(shift, 0, (WIDTH/2)-18, (WIDTH/2)+15, TFT_BLACK); + spr.drawRect(shift, 0, (WIDTH/2)-18, (WIDTH/2)+15, TFT_WHITE); spr.fillRect(shift + 1, 3 + 10 * (opt - 1), 100, 11, TFT_RED); spr.drawString("AUTOSCALE", shift + 5, 5); @@ -180,7 +180,7 @@ void draw_sprite(float freq, spr.drawString(frequency, shift + 5, 15); //String offset_line = String((2.0 * v_div) / 1000.0 - offset) + "V"; String offset_line = String((3.0 * v_div) / 1000.0 - offset) + "V"; - spr.drawString(offset_line, shift + 40, 59); + spr.drawString(offset_line, shift + 25, 59); if (set_value) { spr.fillRect(229, 0, 11, 11, TFT_BLUE); @@ -203,7 +203,7 @@ void draw_sprite(float freq, spr.drawString(String(int(s_div)) + "uS/div", shift - 100, 15); //String offset_line = String((2.0 * v_div) / 1000.0 - offset) + "V"; String offset_line = String((3.0 * v_div) / 1000.0 - offset) + "V"; - spr.drawString(offset_line, shift + 100, 112); + spr.drawString(offset_line, shift + 75, 112); }