More fixes for 4` display

Remove unused function definitions
Use printf format for time string
pull/4/head
DiSlord 6 years ago
parent bc5b5f8e5b
commit 1c1491fd2a

@ -2068,11 +2068,7 @@ draw_frequencies(void)
if (t < setting.sweep_time) if (t < setting.sweep_time)
t = setting.sweep_time; t = setting.sweep_time;
setting.actual_sweep_time = t; setting.actual_sweep_time = t;
; // in mS plot_printf(buf2, sizeof(buf2), " TIME %.3Fs",t/1000.0);
if (t>=1000)
plot_printf(buf2, sizeof(buf2), " TIME %.2fS",t/1000.0);
else
plot_printf(buf2, sizeof(buf2), " TIME %.2fmS", t);
} else if (FREQ_IS_STARTSTOP()) { } else if (FREQ_IS_STARTSTOP()) {
plot_printf(buf1, sizeof(buf1), " START %qHz", get_sweep_frequency(ST_START)); plot_printf(buf1, sizeof(buf1), " START %qHz", get_sweep_frequency(ST_START));
@ -2096,7 +2092,7 @@ draw_frequencies(void)
buf2[0] = S_SARROW[0]; buf2[0] = S_SARROW[0];
int p2 = FREQUENCIES_XPOS2; int p2 = FREQUENCIES_XPOS2;
if (FREQ_IS_CW()) { if (FREQ_IS_CW()) {
p2 = LCD_WIDTH - 7*strlen(buf2); p2 = LCD_WIDTH - FONT_MAX_WIDTH*strlen(buf2);
} }
ili9341_drawstring(buf1, FREQUENCIES_XPOS1, FREQUENCIES_YPOS); ili9341_drawstring(buf1, FREQUENCIES_XPOS1, FREQUENCIES_YPOS);
ili9341_drawstring(buf2, p2, FREQUENCIES_YPOS); ili9341_drawstring(buf2, p2, FREQUENCIES_YPOS);

@ -2300,8 +2300,6 @@ static void test_acquire(int i)
redraw_request |= REDRAW_CELLS | REDRAW_FREQUENCY; redraw_request |= REDRAW_CELLS | REDRAW_FREQUENCY;
} }
extern void cell_drawstring_5x7(int w, int h, char *str, int x, int y, uint16_t fg);
extern void cell_drawstring_7x13(int w, int h, char *str, int x, int y, uint16_t fg);
void cell_drawstring(char *str, int x, int y); void cell_drawstring(char *str, int x, int y);
static char self_test_status_buf[35]; static char self_test_status_buf[35];

Loading…
Cancel
Save

Powered by TurnKey Linux.