-
Notifications
You must be signed in to change notification settings - Fork 0
/
Displays.h
66 lines (56 loc) · 1.54 KB
/
Displays.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
** Serial print helpers with debug and printf support
*/
#pragma once
#include <UTFT.h>
#include <UTFT_Geometry.h>
typedef struct {
int x;
int y;
} POINT; // Point coordinates
typedef struct {
POINT tl; // Top left corner
POINT br; // Bottom right corner
} AREA; // Area coordinates
typedef struct {
int X;
int Y;
int radius;
} COMPASS;
typedef enum {
Main = 1,
Angles = 2
} UI_FONT;
typedef enum {
Black = 0x0000,
Blue = 0x001F,
Red = 0xF800,
Green = 0x07E0,
Cyan = 0x07FF,
Magenta = 0xF81F,
Yellow = 0xFFE0,
White = 0xFFFF,
Orange = 0xF400,
} COLORS; // UTFT Display module color constants
typedef struct {
BHTYPE type;
const char* angle;
COLORS color;
} HUD_BEAM;
typedef enum {
RotationDirection = 1,
CurrentSpeed = 2,
AutoManual = 3,
OverlapAlert = 4,
SpeedMeter = 5,
BeamAngle = 6,
BeamLeftArrow = 7,
BeamRightArrow = 8,
#ifdef DEBUG
RawRotorPotentiometer = 0x7FF4,
#endif
} HUD;
#define NOREDRAW 0x7FFE // Initial state of lastBeam/lastSet
void InitializeDisplay();
void DrawHudElement(const void* data, const HUD& hud);
void DrawBeamArrows(const int* angles[4]);