17f888a11c
Rename Projekt.ino to Projekt_Arduino.ino - Rename the main sketch file and adjust references accordingly. - Clean up Config.h spacing and delete unused turn‑signal constants. - Remove direction‑related LCD character data and its update logic. - Introduce Display::startOrEnd to control LCD power on/off. - Simplify display initialization and eliminate the old delay in the loop. - Add serial debug output for the car enable state.
27 lines
379 B
C++
27 lines
379 B
C++
#pragma once
|
|
#include <rgb_lcd.h>
|
|
#include <Arduino.h>
|
|
|
|
enum LcdChar : uint8_t {
|
|
CHAR_LEFT = 0,
|
|
CHAR_RIGHT = 1,
|
|
CHAR_LEFT_BLINK = 2,
|
|
CHAR_RIGHT_BLINK = 3
|
|
};
|
|
|
|
class Display {
|
|
public:
|
|
void begin(int cols, int rows);
|
|
|
|
void startOrEnd(bool enable);
|
|
|
|
void updateSpeed(int kmh);
|
|
|
|
void updateRPM(int rpm);
|
|
|
|
void updateGear(char gearChar);
|
|
|
|
private:
|
|
rgb_lcd _lcd;
|
|
};
|