mirror of
https://github.com/SemvdH/OBD2-car-display.git
synced 2025-12-14 19:51:04 +00:00
Don't clear outline of temp bars
This commit is contained in:
@@ -336,7 +336,7 @@ void on_main_run()
|
||||
// if the current temp is lower than the last temp (bar dropped) remove part of the drawn bar instead of drawing a new one
|
||||
if (last_coolant_temp > elm327.engine_coolant_temp)
|
||||
{
|
||||
bar_clear_part_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_COOLANT_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.engine_coolant_temp, COOLANT_TEMP_MAX, VGA_BLACK, 1, &display);
|
||||
bar_clear_part_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_COOLANT_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.engine_coolant_temp, COOLANT_TEMP_MAX, VGA_BLACK, 0, &display);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -375,7 +375,7 @@ void on_main_run()
|
||||
// if the current temp is lower than the last temp (bar dropped) remove part of the drawn bar instead of drawing a new one
|
||||
if (last_intake_air_temp > elm327.intake_air_temp)
|
||||
{
|
||||
bar_clear_part_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_INTAKE_AIR_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.intake_air_temp, INTAKE_AIR_TEMP_MAX, VGA_BLACK, 1, &display);
|
||||
bar_clear_part_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_INTAKE_AIR_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.intake_air_temp, INTAKE_AIR_TEMP_MAX, VGA_BLACK, 0, &display);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -400,7 +400,7 @@ void on_main_run()
|
||||
// if the current temp is lower than the last temp (bar dropped) remove part of the drawn bar instead of drawing a new one
|
||||
if (last_ambient_air_temp > elm327.ambient_air_temp)
|
||||
{
|
||||
bar_clear_part_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_AMBIENT_AIR_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.ambient_air_temp, AMBIENT_AIR_TEMP_MAX, VGA_BLACK, 1, &display);
|
||||
bar_clear_part_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_AMBIENT_AIR_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.ambient_air_temp, AMBIENT_AIR_TEMP_MAX, VGA_BLACK, 0, &display);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -425,13 +425,13 @@ void on_main_run()
|
||||
// if the current temp is lower than the last temp (bar dropped) remove part of the drawn bar instead of drawing a new one
|
||||
if (last_engine_oil_temp > elm327.engine_oil_temp)
|
||||
{
|
||||
bar_clear_part_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_OIL_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.engine_oil_temp, OIL_TEMP_MAX, VGA_BLACK, 1, &display);
|
||||
bar_clear_part_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_OIL_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.engine_oil_temp, OIL_TEMP_MAX, VGA_BLACK, 0, &display);
|
||||
}
|
||||
else
|
||||
{
|
||||
bar_draw_horizontal(TEMP_BOX_CONTENT_X_START, TEMP_BOX_OIL_BAR_Y_START, TEMP_BOX_BAR_WIDTH, TEMP_BOX_BAR_HEIGHT, elm327.engine_oil_temp, OIL_TEMP_MAX, COLOR_LIGHT_GRAY, 1, &display);
|
||||
}
|
||||
|
||||
|
||||
last_engine_oil_temp = elm327.engine_oil_temp;
|
||||
|
||||
#if (DEBUG == 1)
|
||||
|
||||
Reference in New Issue
Block a user