More status panel space

master
erikkaashoek 5 years ago
parent 90e5119470
commit 561547a48e

@ -335,6 +335,8 @@ extern uint16_t graph_bottom;
#define GRIDY (CHART_BOTTOM / NGRIDY)
#endif
#define BATTERY_START (LCD_HEIGHT-40)
#define WIDTH (LCD_WIDTH - 1 - OFFSETX)
#define HEIGHT (GRIDY*NGRIDY)

@ -2291,14 +2291,14 @@ draw_frequencies(void)
#endif
ili9341_set_foreground(LCD_FG_COLOR);
ili9341_set_background(LCD_BG_COLOR);
ili9341_fill(0, FREQUENCIES_YPOS, LCD_WIDTH, FONT_GET_HEIGHT);
ili9341_fill(FREQUENCIES_XPOS1, FREQUENCIES_YPOS, LCD_WIDTH- FREQUENCIES_XPOS1, FONT_GET_HEIGHT);
if (uistat.lever_mode == LM_CENTER)
buf1[0] = S_SARROW[0];
if (uistat.lever_mode == LM_SPAN)
buf2[0] = S_SARROW[0];
// int p2 = FREQUENCIES_XPOS2;
// if (FREQ_IS_CW()) {
int p2 = LCD_WIDTH - FONT_MAX_WIDTH*strlen(buf2);
int p2 = LCD_WIDTH - FONT_WIDTH*strlen(buf2);
// }
ili9341_drawstring(buf2, p2, FREQUENCIES_YPOS);
ili9341_drawstring(buf1, FREQUENCIES_XPOS1, FREQUENCIES_YPOS);
@ -2367,9 +2367,9 @@ static void draw_battery_status(void)
string_buf[x++] = 0b10000001;
string_buf[x++] = 0b11111111;
// Draw battery
blit8BitWidthBitmap(7, LCD_HEIGHT-50, 8, x, string_buf);
blit8BitWidthBitmap(7, BATTERY_START, 8, x, string_buf);
plot_printf((char*)string_buf, sizeof string_buf, "%.2fv", vbat/1000.0);
ili9341_drawstring((char*)string_buf, 1, LCD_HEIGHT-50+x+3);
ili9341_drawstring((char*)string_buf, 1, BATTERY_START+x+3);
}
void

@ -2314,7 +2314,7 @@ redraw_cal_status:
x = 0;
y = OFFSETY;
ili9341_set_background(LCD_BG_COLOR);
ili9341_fill(0, 0, OFFSETX, CHART_BOTTOM);
ili9341_fill(0, 0, OFFSETX, LCD_HEIGHT);
max_quick_menu = 0;
if (MODE_OUTPUT(setting.mode)) { // No cal status during output
return;
@ -2591,11 +2591,11 @@ redraw_cal_status:
ili9341_drawstring(buf, x, y);
if (y*4 >= LCD_HEIGHT*3 && item_space > ITEM_NO_SPACE) {
if (y >= BATTERY_START && item_space > ITEM_NO_SPACE) {
item_space--; // Reduce item spacing
goto redraw_cal_status;
}
if ((y + (max_quick_menu+1) * YSTEP/2)* 4 < LCD_HEIGHT*3 && item_space < ITEM_DOUBLE_SPACE) {
if ((y + (max_quick_menu+1) * YSTEP/2) < BATTERY_START && item_space < ITEM_DOUBLE_SPACE) {
item_space++; // Increase item spacing
goto redraw_cal_status;
}
@ -2603,7 +2603,7 @@ redraw_cal_status:
// ili9341_set_background(LCD_BG_COLOR);
if (!get_waterfall()) { // Do not draw bottom level if in waterfall mode
// Bottom level
y = area_height - 8 + OFFSETY;
y = area_height + OFFSETY;
if (rounding)
plot_printf(buf, BLEN, "%4d", (int)(yMax - setting.scale * NGRIDY));
else

Loading…
Cancel
Save

Powered by TurnKey Linux.