-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDisplayManager.h
More file actions
38 lines (34 loc) · 1.05 KB
/
Copy pathDisplayManager.h
File metadata and controls
38 lines (34 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
/*
* DisplayManager.h
* Owns the LiquidCrystal_I2C instance. Single responsibility: rendering
* named screen states. Nothing here decides *when* to show a screen --
* that's SystemController's job.
*/
#include <Arduino.h>
#include <LiquidCrystal_I2C.h>
#include "Config.h"
class DisplayManager {
public:
void begin();
void showBoot();
void showIdle();
void showAccessGranted(const String& name);
void showAccessDenied(const String& reason = "Unknown Card");
void showUid(const String& uid);
void showDatabaseUpdating();
void showSavingDatabase();
void showLoadingDatabase();
void showScanMode();
void showSerialConnected();
void showSerialDisconnected();
void showWifiConnecting();
void showWifiResult(bool connected);
void showError(const String& message);
void showRenewingTag();
void showLockout(uint32_t secondsRemaining);
private:
LiquidCrystal_I2C lcd_{LCD_I2C_ADDR, LCD_COLS, LCD_ROWS};
void printTwoLines_(const String& line1, const String& line2);
static String truncate_(const String& s, uint8_t maxLen);
};