38 static const uint8_t
_font[] = {
39 #ifdef AP_NOTIFY_DISPLAY_USE_EMOJI 41 0x00, 0x00, 0x00, 0x00, 0x00,
42 0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
43 0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
44 0x1C, 0x3E, 0x7C, 0x3E, 0x1C,
45 0x18, 0x3C, 0x7E, 0x3C, 0x18,
46 0x1C, 0x57, 0x7D, 0x57, 0x1C,
47 0x1C, 0x5E, 0x7F, 0x5E, 0x1C,
48 0x00, 0x18, 0x3C, 0x18, 0x00,
49 0xFF, 0xE7, 0xC3, 0xE7, 0xFF,
50 0x00, 0x18, 0x24, 0x18, 0x00,
51 0xFF, 0xE7, 0xDB, 0xE7, 0xFF,
52 0x30, 0x48, 0x3A, 0x06, 0x0E,
53 0x26, 0x29, 0x79, 0x29, 0x26,
54 0x40, 0x7F, 0x05, 0x05, 0x07,
55 0x40, 0x7F, 0x05, 0x25, 0x3F,
56 0x5A, 0x3C, 0xE7, 0x3C, 0x5A,
58 0x7F, 0x3E, 0x1C, 0x1C, 0x08,
59 0x08, 0x1C, 0x1C, 0x3E, 0x7F,
60 0x14, 0x22, 0x7F, 0x22, 0x14,
61 0x5F, 0x5F, 0x00, 0x5F, 0x5F,
62 0x06, 0x09, 0x7F, 0x01, 0x7F,
63 0x00, 0x66, 0x89, 0x95, 0x6A,
64 0x60, 0x60, 0x60, 0x60, 0x60,
65 0x94, 0xA2, 0xFF, 0xA2, 0x94,
66 0x08, 0x04, 0x7E, 0x04, 0x08,
67 0x10, 0x20, 0x7E, 0x20, 0x10,
68 0x08, 0x08, 0x2A, 0x1C, 0x08,
69 0x08, 0x1C, 0x2A, 0x08, 0x08,
70 0x1E, 0x10, 0x10, 0x10, 0x10,
71 0x0C, 0x1E, 0x0C, 0x1E, 0x0C,
72 0x30, 0x38, 0x3E, 0x38, 0x30,
73 0x06, 0x0E, 0x3E, 0x0E, 0x06,
76 0x00, 0x00, 0x00, 0x00, 0x00,
77 0x00, 0x00, 0x5F, 0x00, 0x00,
78 0x00, 0x07, 0x00, 0x07, 0x00,
79 0x14, 0x7F, 0x14, 0x7F, 0x14,
80 0x24, 0x2A, 0x7F, 0x2A, 0x12,
81 0x23, 0x13, 0x08, 0x64, 0x62,
82 0x36, 0x49, 0x56, 0x20, 0x50,
83 0x00, 0x08, 0x07, 0x03, 0x00,
84 0x00, 0x1C, 0x22, 0x41, 0x00,
85 0x00, 0x41, 0x22, 0x1C, 0x00,
86 0x2A, 0x1C, 0x7F, 0x1C, 0x2A,
87 0x08, 0x08, 0x3E, 0x08, 0x08,
88 0x00, 0x80, 0x70, 0x30, 0x00,
89 0x08, 0x08, 0x08, 0x08, 0x08,
90 0x00, 0x00, 0x60, 0x60, 0x00,
91 0x20, 0x10, 0x08, 0x04, 0x02,
93 0x3E, 0x51, 0x49, 0x45, 0x3E,
94 0x00, 0x42, 0x7F, 0x40, 0x00,
95 0x72, 0x49, 0x49, 0x49, 0x46,
96 0x21, 0x41, 0x49, 0x4D, 0x33,
97 0x18, 0x14, 0x12, 0x7F, 0x10,
98 0x27, 0x45, 0x45, 0x45, 0x39,
99 0x3C, 0x4A, 0x49, 0x49, 0x31,
100 0x41, 0x21, 0x11, 0x09, 0x07,
101 0x36, 0x49, 0x49, 0x49, 0x36,
102 0x46, 0x49, 0x49, 0x29, 0x1E,
103 0x00, 0x00, 0x14, 0x00, 0x00,
104 0x00, 0x40, 0x34, 0x00, 0x00,
105 0x00, 0x08, 0x14, 0x22, 0x41,
106 0x14, 0x14, 0x14, 0x14, 0x14,
107 0x00, 0x41, 0x22, 0x14, 0x08,
108 0x02, 0x01, 0x59, 0x09, 0x06,
110 0x3E, 0x41, 0x5D, 0x59, 0x4E,
111 0x7C, 0x12, 0x11, 0x12, 0x7C,
112 0x7F, 0x49, 0x49, 0x49, 0x36,
113 0x3E, 0x41, 0x41, 0x41, 0x22,
114 0x7F, 0x41, 0x41, 0x41, 0x3E,
115 0x7F, 0x49, 0x49, 0x49, 0x41,
116 0x7F, 0x09, 0x09, 0x09, 0x01,
117 0x3E, 0x41, 0x41, 0x51, 0x73,
118 0x7F, 0x08, 0x08, 0x08, 0x7F,
119 0x00, 0x41, 0x7F, 0x41, 0x00,
120 0x20, 0x40, 0x41, 0x3F, 0x01,
121 0x7F, 0x08, 0x14, 0x22, 0x41,
122 0x7F, 0x40, 0x40, 0x40, 0x40,
123 0x7F, 0x02, 0x1C, 0x02, 0x7F,
124 0x7F, 0x04, 0x08, 0x10, 0x7F,
125 0x3E, 0x41, 0x41, 0x41, 0x3E,
127 0x7F, 0x09, 0x09, 0x09, 0x06,
128 0x3E, 0x41, 0x51, 0x21, 0x5E,
129 0x7F, 0x09, 0x19, 0x29, 0x46,
130 0x26, 0x49, 0x49, 0x49, 0x32,
131 0x03, 0x01, 0x7F, 0x01, 0x03,
132 0x3F, 0x40, 0x40, 0x40, 0x3F,
133 0x1F, 0x20, 0x40, 0x20, 0x1F,
134 0x3F, 0x40, 0x38, 0x40, 0x3F,
135 0x63, 0x14, 0x08, 0x14, 0x63,
136 0x03, 0x04, 0x78, 0x04, 0x03,
137 0x61, 0x59, 0x49, 0x4D, 0x43,
138 0x00, 0x7F, 0x41, 0x41, 0x41,
139 0x02, 0x04, 0x08, 0x10, 0x20,
140 0x00, 0x41, 0x41, 0x41, 0x7F,
141 0x04, 0x02, 0x01, 0x02, 0x04,
142 0x40, 0x40, 0x40, 0x40, 0x40,
144 0x00, 0x03, 0x07, 0x08, 0x00,
145 0x20, 0x54, 0x54, 0x78, 0x40,
146 0x7F, 0x28, 0x44, 0x44, 0x38,
147 0x38, 0x44, 0x44, 0x44, 0x28,
148 0x38, 0x44, 0x44, 0x28, 0x7F,
149 0x38, 0x54, 0x54, 0x54, 0x18,
150 0x00, 0x08, 0x7E, 0x09, 0x02,
151 0x18, 0xA4, 0xA4, 0x9C, 0x78,
152 0x7F, 0x08, 0x04, 0x04, 0x78,
153 0x00, 0x44, 0x7D, 0x40, 0x00,
154 0x20, 0x40, 0x40, 0x3D, 0x00,
155 0x7F, 0x10, 0x28, 0x44, 0x00,
156 0x00, 0x41, 0x7F, 0x40, 0x00,
157 0x7C, 0x04, 0x78, 0x04, 0x78,
158 0x7C, 0x08, 0x04, 0x04, 0x78,
159 0x38, 0x44, 0x44, 0x44, 0x38,
161 0xFC, 0x18, 0x24, 0x24, 0x18,
162 0x18, 0x24, 0x24, 0x18, 0xFC,
163 0x7C, 0x08, 0x04, 0x04, 0x08,
164 0x48, 0x54, 0x54, 0x54, 0x24,
165 0x04, 0x04, 0x3F, 0x44, 0x24,
166 0x3C, 0x40, 0x40, 0x20, 0x7C,
167 0x1C, 0x20, 0x40, 0x20, 0x1C,
168 0x3C, 0x40, 0x30, 0x40, 0x3C,
169 0x44, 0x28, 0x10, 0x28, 0x44,
170 0x4C, 0x90, 0x90, 0x90, 0x7C,
171 0x44, 0x64, 0x54, 0x4C, 0x44,
172 0x00, 0x08, 0x36, 0x41, 0x00,
173 0x00, 0x00, 0x77, 0x00, 0x00,
174 0x00, 0x41, 0x36, 0x08, 0x00,
175 0x02, 0x01, 0x02, 0x04, 0x02,
176 #ifdef AP_NOTIFY_DISPLAY_USE_EMOJI 177 0x3C, 0x26, 0x23, 0x26, 0x3C,
179 0x1E, 0xA1, 0xA1, 0x61, 0x12,
180 0x3A, 0x40, 0x40, 0x20, 0x7A,
181 0x38, 0x54, 0x54, 0x55, 0x59,
182 0x21, 0x55, 0x55, 0x79, 0x41,
183 0x22, 0x54, 0x54, 0x78, 0x42,
184 0x21, 0x55, 0x54, 0x78, 0x40,
185 0x20, 0x54, 0x55, 0x79, 0x40,
186 0x0C, 0x1E, 0x52, 0x72, 0x12,
187 0x39, 0x55, 0x55, 0x55, 0x59,
188 0x39, 0x54, 0x54, 0x54, 0x59,
189 0x39, 0x55, 0x54, 0x54, 0x58,
190 0x00, 0x00, 0x45, 0x7C, 0x41,
191 0x00, 0x02, 0x45, 0x7D, 0x42,
192 0x00, 0x01, 0x45, 0x7C, 0x40,
193 0x7D, 0x12, 0x11, 0x12, 0x7D,
194 0xF0, 0x28, 0x25, 0x28, 0xF0,
196 0x7C, 0x54, 0x55, 0x45, 0x00,
197 0x20, 0x54, 0x54, 0x7C, 0x54,
198 0x7C, 0x0A, 0x09, 0x7F, 0x49,
199 0x32, 0x49, 0x49, 0x49, 0x32,
200 0x3A, 0x44, 0x44, 0x44, 0x3A,
201 0x32, 0x4A, 0x48, 0x48, 0x30,
202 0x3A, 0x41, 0x41, 0x21, 0x7A,
203 0x3A, 0x42, 0x40, 0x20, 0x78,
204 0x00, 0x9D, 0xA0, 0xA0, 0x7D,
205 0x3D, 0x42, 0x42, 0x42, 0x3D,
206 0x3D, 0x40, 0x40, 0x40, 0x3D,
207 0x3C, 0x24, 0xFF, 0x24, 0x24,
208 0x48, 0x7E, 0x49, 0x43, 0x66,
209 0x2B, 0x2F, 0xFC, 0x2F, 0x2B,
210 0xFF, 0x09, 0x29, 0xF6, 0x20,
211 0xC0, 0x88, 0x7E, 0x09, 0x03,
213 0x20, 0x54, 0x54, 0x79, 0x41,
214 0x00, 0x00, 0x44, 0x7D, 0x41,
215 0x30, 0x48, 0x48, 0x4A, 0x32,
216 0x38, 0x40, 0x40, 0x22, 0x7A,
217 0x00, 0x7A, 0x0A, 0x0A, 0x72,
218 0x7D, 0x0D, 0x19, 0x31, 0x7D,
219 0x26, 0x29, 0x29, 0x2F, 0x28,
220 0x26, 0x29, 0x29, 0x29, 0x26,
221 0x30, 0x48, 0x4D, 0x40, 0x20,
222 0x38, 0x08, 0x08, 0x08, 0x08,
223 0x08, 0x08, 0x08, 0x08, 0x38,
224 0x2F, 0x10, 0xC8, 0xAC, 0xBA,
225 0x2F, 0x10, 0x28, 0x34, 0xFA,
226 0x00, 0x00, 0x7B, 0x00, 0x00,
227 0x08, 0x14, 0x2A, 0x14, 0x22,
228 0x22, 0x14, 0x2A, 0x14, 0x08,
230 0x55, 0x00, 0x55, 0x00, 0x55,
231 0xAA, 0x55, 0xAA, 0x55, 0xAA,
232 0xFF, 0x55, 0xFF, 0x55, 0xFF,
233 0x00, 0x00, 0x00, 0xFF, 0x00,
234 0x10, 0x10, 0x10, 0xFF, 0x00,
235 0x14, 0x14, 0x14, 0xFF, 0x00,
236 0x10, 0x10, 0xFF, 0x00, 0xFF,
237 0x10, 0x10, 0xF0, 0x10, 0xF0,
238 0x14, 0x14, 0x14, 0xFC, 0x00,
239 0x14, 0x14, 0xF7, 0x00, 0xFF,
240 0x00, 0x00, 0xFF, 0x00, 0xFF,
241 0x14, 0x14, 0xF4, 0x04, 0xFC,
242 0x14, 0x14, 0x17, 0x10, 0x1F,
243 0x10, 0x10, 0x1F, 0x10, 0x1F,
244 0x14, 0x14, 0x14, 0x1F, 0x00,
245 0x10, 0x10, 0x10, 0xF0, 0x00,
247 0x00, 0x00, 0x00, 0x1F, 0x10,
248 0x10, 0x10, 0x10, 0x1F, 0x10,
249 0x10, 0x10, 0x10, 0xF0, 0x10,
250 0x00, 0x00, 0x00, 0xFF, 0x10,
251 0x10, 0x10, 0x10, 0x10, 0x10,
252 0x10, 0x10, 0x10, 0xFF, 0x10,
253 0x00, 0x00, 0x00, 0xFF, 0x14,
254 0x00, 0x00, 0xFF, 0x00, 0xFF,
255 0x00, 0x00, 0x1F, 0x10, 0x17,
256 0x00, 0x00, 0xFC, 0x04, 0xF4,
257 0x14, 0x14, 0x17, 0x10, 0x17,
258 0x14, 0x14, 0xF4, 0x04, 0xF4,
259 0x00, 0x00, 0xFF, 0x00, 0xF7,
260 0x14, 0x14, 0x14, 0x14, 0x14,
261 0x14, 0x14, 0xF7, 0x00, 0xF7,
262 0x14, 0x14, 0x14, 0x17, 0x14,
264 0x10, 0x10, 0x1F, 0x10, 0x1F,
265 0x14, 0x14, 0x14, 0xF4, 0x14,
266 0x10, 0x10, 0xF0, 0x10, 0xF0,
267 0x00, 0x00, 0x1F, 0x10, 0x1F,
268 0x00, 0x00, 0x00, 0x1F, 0x14,
269 0x00, 0x00, 0x00, 0xFC, 0x14,
270 0x00, 0x00, 0xF0, 0x10, 0xF0,
271 0x10, 0x10, 0xFF, 0x10, 0xFF,
272 0x14, 0x14, 0x14, 0xFF, 0x14,
273 0x10, 0x10, 0x10, 0x1F, 0x00,
274 0x00, 0x00, 0x00, 0xF0, 0x10,
275 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
276 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
277 0xFF, 0xFF, 0xFF, 0x00, 0x00,
278 0x00, 0x00, 0x00, 0xFF, 0xFF,
279 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
281 0x38, 0x44, 0x44, 0x38, 0x44,
282 0xFC, 0x4A, 0x4A, 0x4A, 0x34,
283 0x7E, 0x02, 0x02, 0x06, 0x06,
284 0x02, 0x7E, 0x02, 0x7E, 0x02,
285 0x63, 0x55, 0x49, 0x41, 0x63,
286 0x38, 0x44, 0x44, 0x3C, 0x04,
287 0x40, 0x7E, 0x20, 0x1E, 0x20,
288 0x06, 0x02, 0x7E, 0x02, 0x02,
289 0x99, 0xA5, 0xE7, 0xA5, 0x99,
290 0x1C, 0x2A, 0x49, 0x2A, 0x1C,
291 0x4C, 0x72, 0x01, 0x72, 0x4C,
292 0x30, 0x4A, 0x4D, 0x4D, 0x30,
293 0x30, 0x48, 0x78, 0x48, 0x30,
294 0xBC, 0x62, 0x5A, 0x46, 0x3D,
295 0x3E, 0x49, 0x49, 0x49, 0x00,
296 0x7E, 0x01, 0x01, 0x01, 0x7E,
298 0x2A, 0x2A, 0x2A, 0x2A, 0x2A,
299 0x44, 0x44, 0x5F, 0x44, 0x44,
300 0x40, 0x51, 0x4A, 0x44, 0x40,
301 0x40, 0x44, 0x4A, 0x51, 0x40,
302 0x00, 0x00, 0xFF, 0x01, 0x03,
303 0xE0, 0x80, 0xFF, 0x00, 0x00,
304 0x08, 0x08, 0x6B, 0x6B, 0x08,
305 0x36, 0x12, 0x36, 0x24, 0x36,
306 0x06, 0x0F, 0x09, 0x0F, 0x06,
307 0x00, 0x00, 0x18, 0x18, 0x00,
308 0x00, 0x00, 0x10, 0x10, 0x00,
309 0x30, 0x40, 0xFF, 0x01, 0x01,
310 0x00, 0x1F, 0x01, 0x01, 0x1E,
311 0x00, 0x19, 0x1D, 0x17, 0x12,
312 0x00, 0x3C, 0x3C, 0x3C, 0x3C,
313 0x00, 0x00, 0x00, 0x00, 0x00
328 for(uint8_t i=0; i<8 &&
_driver ==
nullptr; i++) {
347 if (_driver ==
nullptr) {
355 _driver->hw_update();
368 static uint8_t
timer = 0;
411 #ifndef AP_NOTIFY_DISPLAY_USE_EMOJI 412 if (*c >=
' ' && *c <=
'~') {
431 for (uint8_t i = 0; i < 6; i++) {
435 line =
_font[(c * 5) + i];
438 for (uint8_t j = 0; j < 8; j++) {
469 static const char * gpsfixname[] = {
"Other",
"NoGPS",
"NoFix",
"2D",
"3D",
"DGPS",
"RTK f",
"RTK F"};
471 const char * fixname;
474 fixname = gpsfixname[1];
477 fixname = gpsfixname[2];
480 fixname = gpsfixname[3];
483 fixname = gpsfixname[4];
486 fixname = gpsfixname[5];
489 fixname = gpsfixname[6];
492 fixname = gpsfixname[7];
495 fixname = gpsfixname[0];
537 memset(msg,
' ',
sizeof(msg)-1);
549 if (!text_is_valid) {
561 memset(msg,
' ',
sizeof(msg)-1);
563 const uint8_t to_copy = (len <
sizeof(msg)-1) ? len : (
sizeof(msg)-1);
564 memcpy(msg, &txt[_mstartpos], to_copy);
566 if (len <=
sizeof(msg)-1) {
void update_prearm(uint8_t r)
void update_text_empty(uint8_t r)
void update_battery(uint8_t r)
static Display_SSD1306_I2C * probe(AP_HAL::OwnPtr< AP_HAL::Device > dev)
virtual void set_pixel(uint16_t x, uint16_t y)=0
void update_gps_sats(uint8_t r)
virtual void hw_update()=0
const char * get_flight_mode_str() const
void update_text(uint8_t r)
void update_mode(uint8_t r)
Receiving valid messages and 3D RTK Fixed.
void draw_char(uint16_t x, uint16_t y, const char c)
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
void update_ekf(uint8_t r)
virtual void clear_screen()=0
#define NOTIFY_TEXT_BUFFER_SIZE
#define DISPLAY_MESSAGE_SIZE
Receiving valid messages and 3D lock with differential improvements.
Receiving valid messages and 3D RTK Float.
const char * get_text() const
uint32_t _send_text_updated_millis
Receiving valid messages and 2D lock.
const uint16_t _send_text_valid_millis
const AP_Notify * pNotify
AP_HAL::I2CDeviceManager * i2c_mgr
Display_Backend * _driver
static const uint8_t _font[]
Receiving valid GPS messages but no lock.
static struct notify_flags_and_values_type flags
static const uint8_t I2C_BUS_PROBE_MASK
No GPS connected/detected.
void update_gps(uint8_t r)
int snprintf(char *str, size_t size, const char *fmt,...)
static Display_SH1106_I2C * probe(AP_HAL::OwnPtr< AP_HAL::Device > dev)
Receiving valid messages and 3D lock.
virtual OwnPtr< AP_HAL::I2CDevice > get_device(uint8_t bus, uint8_t address, uint32_t bus_clock=400000, bool use_smbus=false, uint32_t timeout_ms=4)=0
void update_arm(uint8_t r)
#define NOTIFY_DISPLAY_I2C_ADDR
void draw_text(uint16_t x, uint16_t y, const char *c)
virtual void clear_pixel(uint16_t x, uint16_t y)=0