mirror of
https://github.com/SemvdH/OBD2-car-display.git
synced 2025-12-15 20:21:03 +00:00
cleanup
This commit is contained in:
@@ -31,6 +31,9 @@ Program to create a car monitor display using:
|
||||
#define FLAG_INIT_UPDATE_TEXT_POS 0x01
|
||||
#define FLAG_INIT_CLEAR_POS 0x02
|
||||
#define FLAG_INIT_UPDATE_PERCENT_POS 0x03
|
||||
|
||||
#define LOGO_MIN_STEP 20
|
||||
#define LOGO_MAX_POS_Y 124
|
||||
#define FLAG_LOGO_UPDATE 0x00
|
||||
|
||||
#define LOGO_TEXT_WIDTH 16
|
||||
@@ -143,19 +146,16 @@ void on_init_run()
|
||||
|
||||
if (logo_flag & (1 << FLAG_LOGO_UPDATE))
|
||||
{
|
||||
if (logo_pos_y >= 124)
|
||||
if (logo_pos_y >= LOGO_MAX_POS_Y)
|
||||
{
|
||||
logo_flag &= ~(1 << FLAG_LOGO_UPDATE);
|
||||
Serial.println("Stopping update");
|
||||
}
|
||||
if (logo_pos_i > 20)
|
||||
if (logo_pos_i > LOGO_MIN_STEP)
|
||||
{
|
||||
display.setColor(VGA_BLACK);
|
||||
display.print(logo_text, CENTER, last_logo_pos_y);
|
||||
display.setColor(VGA_AQUA);
|
||||
display.print(logo_text, CENTER, logo_pos_y);
|
||||
|
||||
Serial.println(logo_pos_y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user