-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpressions.h
97 lines (85 loc) · 1.69 KB
/
expressions.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef EXPRESSIONS_H
#define EXPRESSIONS_H
#include <Arduino.h>
#include <avr/pgmspace.h>
#include "polygon.h"
// Fixed-sized array of points for the expressions. The arrays must all have
// the same number of points in order to interpolate between them and pass
// from an expression to another.
// All expressions are array of points with coordinates in [0, 1] range
// that will be scaled to the desired dimension.
/*
// Square look
const float expr_normal_points [][2] PROGMEM = {
{0, 0},
{0, 1},
{0.3, 1},
{0.7, 1},
{1, 1},
{1, 0},
{0.7, 0},
{0.3, 0}
};34
*/
const float expr_normal_points[][2] PROGMEM = {
{ 0, 0.05 },
{ 0, 0.95 },
{ 0.05, 1 },
{ 0.95, 1 },
{ 1, 0.95 },
{ 1, 0.05 },
{ 0.95, 0 },
{ 0.05, 0 }
};
const uint8_t num_points = sizeof(expr_normal_points) / sizeof(expr_normal_points[0]);
const float expr_blinking_points[][2] PROGMEM = {
{ 0, 0.2 },
{ 0, 0.3 },
{ 0.3, 0.3 },
{ 0.7, 0.3 },
{ 1, 0.3 },
{ 1, 0.2 },
{ 0.7, 0.2 },
{ 0.3, 0.2 }
};
const float expr_angry_points[][2] PROGMEM = {
{ 0, 0.05 },
{ 0, 0.6 },
{ 0.1, 0.65 },
{ 0.2, 0.65 },
{ 1, 0.2 },
{ 1, 0.05 },
{ 0.95, 0 },
{ 0.05, 0 }
};
const float expr_confused_points[][2] PROGMEM = {
{ 0, 0.25 },
{ 0, 0.75 },
{ 0.05, 0.8 },
{ 0.95, 0.8 },
{ 1, 0.75 },
{ 1, 0.25 },
{ 0.95, 0.2 },
{ 0.05, 0.2 }
};
const float expr_worried_points[][2] PROGMEM = {
{ 0, 0.05},
{ 0, 0.35},
{ 0.05, 0.4},
{ 0.9, 0.55},
{ 1, 0.45},
{ 1, 0.1},
{ 0.9, 0},
{ 0.05, 0}
};
const float expr_happy_points[][2] PROGMEM = {
{ 0, 0.4 },
{ 0, 0.95 },
{ 0.05, 1 },
{ 0.95, 1 },
{ 1, 0.95 },
{ 1, 0.4 },
{ 0.90, 0.55 },
{ 0.1, 0.55 }
};
#endif // EXPRESSIONS_H