diff --git a/sketch/obd2_gauge/meter.h b/sketch/obd2_gauge/meter.h index 93c73fb..9706f5a 100644 --- a/sketch/obd2_gauge/meter.h +++ b/sketch/obd2_gauge/meter.h @@ -679,17 +679,26 @@ void plotArc4(uint8_t cell, float data, int warn, int min, int max, bool digit, void plotFullScreen(uint8_t cell, float data, int warn, int min, int max, bool digit, String unit); +// 4-quadrant divider styling (2px visible automotive slate grey) +const uint16_t QUAD_DIV_COLOR = 0x632C; + +inline void drawQuadrantDividers() { + tft.fillRect(159, 0, 2, 240, QUAD_DIV_COLOR); + tft.fillRect(0, 119, 320, 2, QUAD_DIV_COLOR); +} + // 4-quadrant Numeric Meter (160x120 px) void numericMeter4(uint8_t cell, uint8_t pid, bool redrawHeader = true) { int w = 160; int h = 120; int x = cell4_x[cell]; int y = cell4_y[cell]; + int rx = (cell & 1) ? 161 : 0; + int ry = (cell & 2) ? 121 : 0; - tft.fillRect(x, y, w, h, TFT_BLACK); + tft.fillRect(rx, ry, 159, 119, TFT_BLACK); drawPidIcon(x + 5, y + 5, pidConfig[pid][2]); - tft.drawFastVLine(159, 0, 240, 0x2104); - tft.drawFastHLine(0, 119, 320, 0x2104); + drawQuadrantDividers(); if (last_valid_data[cell] != -999) { old_data[cell] = -999; @@ -731,11 +740,12 @@ void plotNumeric4(uint8_t cell, float data, int warn, bool digit, String unit) { void arcMeter4(uint8_t cell, uint8_t pid, bool redrawHeader = true) { int x = cell4_x[cell]; int y = cell4_y[cell]; + int rx = (cell & 1) ? 161 : 0; + int ry = (cell & 2) ? 121 : 0; - tft.fillRect(x, y, 160, 120, TFT_BLACK); + tft.fillRect(rx, ry, 159, 119, TFT_BLACK); drawPidIcon(x + 5, y + 3, pidConfig[pid][2]); - tft.drawFastVLine(159, 0, 240, 0x2104); - tft.drawFastHLine(0, 119, 320, 0x2104); + drawQuadrantDividers(); // Initialize all 20 blocks in DARKGREY for (uint8_t i = 0; i < NUM_BAR_BLOCKS; i++) { @@ -992,8 +1002,7 @@ void initScreen() { arcMeter4(c, pid); } } - tft.drawFastVLine(159, 0, 240, 0x2104); - tft.drawFastHLine(0, 119, 320, 0x2104); + drawQuadrantDividers(); } } /*-------------------------------*/