-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplay.h
More file actions
36 lines (29 loc) · 970 Bytes
/
Copy pathDisplay.h
File metadata and controls
36 lines (29 loc) · 970 Bytes
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
// Display.h
#ifndef _DISPLAY_h
#define _DISPLAY_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#endif
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Wire.h>
#include "Globals.h"
#include "Font.h"
#include "DisplayContentObserver.h"
class Display : public DisplayContentObserver
{
public:
void Begin();
// Inherited via DisplayStateObserver
virtual void LeftDisplay(String s, FontType f) override;
virtual void RightDisplay(String s, FontType f) override;
private:
Adafruit_SSD1306 *left;
Adafruit_SSD1306 *right;
void updateDisplay(Adafruit_SSD1306 *display, String content, FontType fontType);
const GFXfont *fontNormal = &SairaSemiCondensed_Regular74pt7b;
const GFXfont *fontCondensed = &SairaCondensed_Regular74pt7b;
const GFXfont *fontExtraCondensed = &SairaExtraCondensed_Regular74pt7b;
const GFXfont *fontExtraCondensedShrunk = &SairaExtraCondensed_Regular54pt7b;
};
#endif