Fixes for temp display and start defines for engine load

This commit is contained in:
SemvdH
2025-05-04 22:08:24 +02:00
parent 48933e2bab
commit 34b287f871
4 changed files with 118 additions and 32 deletions

View File

@@ -10,6 +10,9 @@
#define OBD2_SLOW_VALUES_QUERY_INTERVAL_MS 5000
#define SCREEN_WIDTH 480
#define SCREEN_HEIGHT 320
#define INIT_TEXT_WIDTH 15
#define INIT_PERCENTAGE_WIDTH 4
#define FLAG_INIT_UPDATE_TEXT_POS 0x01
@@ -31,7 +34,7 @@
#define RAM_TEXT_WIDTH 9
#define DEV_LABEL_LENGTH 10
#define COLOR_ORANGE 255, 96, 33
#define COLOR_LIGHT_GRAY 217, 217, 217
/****************************************/
/* x and y positions for several gauges */
@@ -42,12 +45,12 @@
#define TEMP_BOX_Y_START TEMP_BOX_PADDING
#define TEMP_BOX_CONTENT_WIDTH 180 // witdth of the box to calculate the content in it
#define TEMP_BOX_WIDTH TEMP_BOX_CONTENT_WIDTH - TEMP_BOX_PADDING // width of the box to draw the outline
#define TEMP_BOX_HEIGHT 210 - TEMP_BOX_PADDING
#define TEMP_BOX_COLOR VGA_GRAY
#define TEMP_BOX_HEIGHT 193 - TEMP_BOX_PADDING
#define TEMP_BOX_COLOR VGA_TEAL
#define TEMP_BOX_BAR_AMOUNT 4 // amount of bars to display in the temperature box
#define TEMP_BOX_BAR_PADDING 2
#define TEMP_BOX_BAR_HEIGHT (((TEMP_BOX_HEIGHT) / ((TEMP_BOX_BAR_AMOUNT) * 2)) - TEMP_BOX_BAR_PADDING)
#define TEMP_BOX_BAR_HEIGHT 23
#define TEMP_BOX_BAR_WIDTH TEMP_BOX_CONTENT_WIDTH - (TEMP_BOX_BAR_PADDING * 4)
#define TEMP_BOX_COOLANT_POS 0
@@ -65,4 +68,11 @@
#define TEMP_BOX_OIL_TEXT_Y_START TEMP_BOX_Y_START + TEMP_BOX_BAR_PADDING + (2 * TEMP_BOX_OIL_POS * TEMP_BOX_BAR_HEIGHT) + 2
#define TEMP_BOX_OIL_BAR_Y_START TEMP_BOX_Y_START + TEMP_BOX_BAR_PADDING + ((2 * TEMP_BOX_OIL_POS * TEMP_BOX_BAR_HEIGHT) + TEMP_BOX_BAR_HEIGHT)
/* box that holds the engine load */
#define ENGINE_LOAD_BOX_X_START TEMP_BOX_X_START
#define ENGINE_LOAD_BOX_Y_START TEMP_BOX_Y_START + TEMP_BOX_HEIGHT + TEMP_BOX_PADDING
#define ENGINE_LOAD_BOX_WIDTH TEMP_BOX_WIDTH
#define ENGINE_LOAD_BOX_HEIGHT (SCREEN_HEIGHT - TEMP_BOX_HEIGHT - TEMP_BOX_PADDING)
#define ENGINE_LOAD_BOX_COLOR VGA_TEAL
#endif // !DEFINES_H