|
|
|
@ -322,6 +322,197 @@ static_assert(ARRAY_SIZE(_font) == 1280, "_font is correct size");
@@ -322,6 +322,197 @@ static_assert(ARRAY_SIZE(_font) == 1280, "_font is correct size");
|
|
|
|
|
static_assert(ARRAY_SIZE(_font) == 475, "_font is correct size"); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
static const unsigned char _font_16[]=
|
|
|
|
|
{ |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 0
|
|
|
|
|
0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 1
|
|
|
|
|
0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 2
|
|
|
|
|
0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 3
|
|
|
|
|
0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 4
|
|
|
|
|
0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 5
|
|
|
|
|
0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 6
|
|
|
|
|
0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7
|
|
|
|
|
0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 8
|
|
|
|
|
0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 9
|
|
|
|
|
0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 10
|
|
|
|
|
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 11
|
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 12
|
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 13
|
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 14
|
|
|
|
|
0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 15
|
|
|
|
|
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 16
|
|
|
|
|
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 17
|
|
|
|
|
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 18
|
|
|
|
|
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 19
|
|
|
|
|
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 20
|
|
|
|
|
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 21
|
|
|
|
|
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 22
|
|
|
|
|
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 23
|
|
|
|
|
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 24
|
|
|
|
|
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 25
|
|
|
|
|
0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 26
|
|
|
|
|
0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 27
|
|
|
|
|
0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 28
|
|
|
|
|
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 29
|
|
|
|
|
0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 30
|
|
|
|
|
0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 31
|
|
|
|
|
0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 32
|
|
|
|
|
0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 33
|
|
|
|
|
0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 34
|
|
|
|
|
0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 35
|
|
|
|
|
0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 36
|
|
|
|
|
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 37
|
|
|
|
|
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 38
|
|
|
|
|
0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 39
|
|
|
|
|
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 40
|
|
|
|
|
0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 41
|
|
|
|
|
0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 42
|
|
|
|
|
0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 43
|
|
|
|
|
0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 44
|
|
|
|
|
0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 45
|
|
|
|
|
0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 46
|
|
|
|
|
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 47
|
|
|
|
|
0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 48
|
|
|
|
|
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 49
|
|
|
|
|
0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 50
|
|
|
|
|
0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 51
|
|
|
|
|
0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 52
|
|
|
|
|
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 53
|
|
|
|
|
0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 54
|
|
|
|
|
0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 55
|
|
|
|
|
0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 56
|
|
|
|
|
0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 57
|
|
|
|
|
0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 58
|
|
|
|
|
0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 59
|
|
|
|
|
0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 60
|
|
|
|
|
0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 61
|
|
|
|
|
0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62
|
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 63
|
|
|
|
|
0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64
|
|
|
|
|
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 65
|
|
|
|
|
0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 66
|
|
|
|
|
0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 67
|
|
|
|
|
0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 68
|
|
|
|
|
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 69
|
|
|
|
|
0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 70
|
|
|
|
|
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 71
|
|
|
|
|
0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 72
|
|
|
|
|
0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 73
|
|
|
|
|
0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 74
|
|
|
|
|
0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 75
|
|
|
|
|
0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 76
|
|
|
|
|
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 77
|
|
|
|
|
0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 78
|
|
|
|
|
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 79
|
|
|
|
|
0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 80
|
|
|
|
|
0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 81
|
|
|
|
|
0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 82
|
|
|
|
|
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 83
|
|
|
|
|
0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 84
|
|
|
|
|
0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 85
|
|
|
|
|
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 86
|
|
|
|
|
0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 87
|
|
|
|
|
0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 88
|
|
|
|
|
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 89
|
|
|
|
|
0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 90
|
|
|
|
|
0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 91
|
|
|
|
|
0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 92
|
|
|
|
|
0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 93
|
|
|
|
|
0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// 致(0) 睿(1) 智(2) 控(3) 云(4) 台(5)
|
|
|
|
|
static unsigned char ZRZKYT[][32]={ |
|
|
|
|
|
|
|
|
|
{0x00,0x00,0xFF,0x05,0x05,0xF5,0x55,0x5D,0x55,0x55,0x55,0x55,0xF5,0x05,0x01,0x00}, |
|
|
|
|
{0x40,0x30,0x0F,0x80,0xA0,0x97,0xBD,0x55,0x55,0x55,0x55,0x55,0xB7,0x80,0x80,0x00},/*"厦",0*/ |
|
|
|
|
|
|
|
|
|
{0x00,0xF8,0x01,0x06,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0xFE,0x00,0x00}, |
|
|
|
|
{0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x80,0x7F,0x00,0x00},/*"门",1*/ |
|
|
|
|
|
|
|
|
|
{0x42,0x62,0x5A,0xC6,0x52,0x62,0xC2,0x20,0xD8,0x17,0x10,0x10,0xF0,0x10,0x10,0x00}, |
|
|
|
|
{0x40,0xC4,0x44,0x7F,0x24,0x24,0xA0,0x40,0x21,0x16,0x08,0x16,0x21,0x40,0x80,0x00},/*"致",2*/ |
|
|
|
|
|
|
|
|
|
{0x20,0x18,0x88,0xA8,0x68,0x28,0xA8,0x6F,0xAA,0x2A,0x6A,0xAA,0x0A,0x28,0x18,0x00}, |
|
|
|
|
{0x04,0x04,0x02,0xFE,0xAB,0xAB,0xAA,0xAA,0xAA,0xAB,0xAB,0xFE,0x02,0x04,0x04,0x00},/*"睿",3*/ |
|
|
|
|
|
|
|
|
|
{0x10,0x94,0x53,0x32,0x1E,0x32,0x52,0x10,0x00,0x7E,0x42,0x42,0x42,0x7E,0x00,0x00}, |
|
|
|
|
{0x00,0x00,0x00,0xFF,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0xFF,0x00,0x00,0x00,0x00},/*"智",4*/ |
|
|
|
|
|
|
|
|
|
{0x10,0x10,0x10,0xFF,0x90,0x20,0x98,0x48,0x28,0x09,0x0E,0x28,0x48,0xA8,0x18,0x00}, |
|
|
|
|
{0x02,0x42,0x81,0x7F,0x00,0x40,0x40,0x42,0x42,0x42,0x7E,0x42,0x42,0x42,0x40,0x00},/*"控",5*/ |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
unsigned char gImage_zr12864[] = { |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x08,0x38,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8, |
|
|
|
|
0xF8,0xF8,0xF8,0xF8,0x78,0x18,0x00,0xC0,0xF0,0xF0,0xF0,0xE0,0xC0,0x80,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xB0,0xF0,0x70,0x30,0x30,0x30,0xB0,0x30, |
|
|
|
|
0x00,0xC0,0xF0,0x30,0x30,0x30,0x30,0xF0,0xF0,0x30,0x00,0x00,0x00,0x00,0xC0,0xC0, |
|
|
|
|
0x40,0x78,0x78,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0xD0,0xD0,0xC0, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0xF0,0xB0,0x90,0xF0,0xF0,0xB0,0x90,0x90,0x80,0x00,0xF0, |
|
|
|
|
0xF0,0x30,0x30,0x30,0xF0,0xF0,0x00,0x00,0x00,0x00,0xC0,0xC0,0xF8,0xF0,0xC0,0x00, |
|
|
|
|
0x00,0xF0,0xF0,0x30,0x30,0x30,0x38,0x38,0x30,0x30,0xF0,0xF0,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x83,0xE3,0xFB,0xFF,0xFF,0xFF,0x7F, |
|
|
|
|
0x3F,0x0F,0x83,0xE0,0xF8,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x67,0x67,0x66,0xFE,0xFE,0x66,0x67,0x67, |
|
|
|
|
0x00,0x01,0x03,0x98,0xF8,0xF0,0xFC,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0xF5, |
|
|
|
|
0xF4,0xB5,0xBD,0xBF,0xBF,0xA9,0xA9,0xA9,0xAF,0xBF,0xBF,0xBD,0xBC,0xF4,0xF5,0x01, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0xEC,0xE4,0x36,0x37,0x33,0x37,0x34,0x3C,0x30,0x30,0x37, |
|
|
|
|
0x37,0x36,0x36,0xF6,0xE7,0xE7,0x00,0x00,0x00,0x00,0x60,0x60,0xFF,0xFF,0x30,0x10, |
|
|
|
|
0x00,0x05,0x67,0x66,0x63,0x63,0xE0,0xE0,0x63,0x66,0x66,0x65,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x80,0xC0,0xF0,0xFC,0xFF,0xFF,0xFF,0x7F,0x1F,0x87,0x01,0x10, |
|
|
|
|
0x7C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F,0x1F,0x0F,0x03, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x8C,0x8C,0x8F,0x0F,0x0C,0x8C,0x04, |
|
|
|
|
0x00,0x00,0x8E,0x07,0x01,0x80,0x03,0x07,0x0E,0x00,0x00,0x00,0x80,0x80,0x80,0x0F, |
|
|
|
|
0x0F,0x0A,0x8A,0x0A,0x0A,0x0A,0x8A,0x0A,0x0A,0x8A,0x0A,0x0A,0x0A,0x0F,0x0F,0x00, |
|
|
|
|
0x80,0x80,0x80,0x80,0x00,0x0F,0x8F,0x09,0x09,0x09,0x89,0x09,0x09,0x89,0x09,0x09, |
|
|
|
|
0x09,0x09,0x09,0x0F,0x8F,0x0F,0x00,0x00,0x80,0x00,0x08,0x88,0x8F,0x8F,0x00,0x00, |
|
|
|
|
0x00,0x88,0x88,0x08,0x08,0x88,0x0F,0x0F,0x08,0x08,0x88,0x88,0x80,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x3E,0x3F,0x3F,0x3F,0x1F,0x0F,0x03,0x20,0x38,0x3E,0x3F,0x3F,0x3E, |
|
|
|
|
0x38,0x01,0x03,0x0F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3E,0x38,0x20,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x38,0x24,0x23,0x21,0x00,0x00,0x3F,0x04, |
|
|
|
|
0x04,0x04,0x3F,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x04,0x04,0x3B, |
|
|
|
|
0x00,0x00,0x1F,0x20,0x20,0x20,0x1F,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x30,0x28,0x26,0x23,0x00,0x00,0x3F,0x04,0x04,0x04,0x3F,0x00,0x00,0x3F,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x3F,0x06,0x0A,0x11,0x20,0x00,0x1F,0x20,0x20,0x20,0x1F,0x00, |
|
|
|
|
0x00,0x3F,0x03,0x06,0x18,0x3F,0x00,0x00,0x0E,0x11,0x20,0x20,0x24,0x1C,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
|
|
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"d:\Users\z\Pictures\应用\转尺寸\ZR12864w2.bmp",0*/ |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Display::init(void) |
|
|
|
|
{ |
|
|
|
|
// exit immediately if already initialised
|
|
|
|
@ -399,6 +590,9 @@ void Display::update()
@@ -399,6 +590,9 @@ void Display::update()
|
|
|
|
|
|
|
|
|
|
void Display::update_all() |
|
|
|
|
{ |
|
|
|
|
update_display_manual(); |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
update_text(0); |
|
|
|
|
update_mode(1); |
|
|
|
|
update_battery(2); |
|
|
|
@ -433,15 +627,55 @@ void Display::draw_char(uint16_t x, uint16_t y, const char c)
@@ -433,15 +627,55 @@ void Display::draw_char(uint16_t x, uint16_t y, const char c)
|
|
|
|
|
{ |
|
|
|
|
uint8_t line; |
|
|
|
|
|
|
|
|
|
static uint8_t Size = 16; |
|
|
|
|
uint8_t i,j; |
|
|
|
|
// draw char to pixel
|
|
|
|
|
for (uint8_t i = 0; i < 6; i++) { |
|
|
|
|
if(Size == 16) |
|
|
|
|
{ |
|
|
|
|
for ( i = 0; i < 9; i++) { |
|
|
|
|
if (i == 8) { |
|
|
|
|
line = 0; |
|
|
|
|
} else { |
|
|
|
|
line = _font_16[(c * 16) + i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for ( j = 0; j < 8; j++) { |
|
|
|
|
if (line & 1) { |
|
|
|
|
_driver->set_pixel(x + i, y + j ); |
|
|
|
|
} else {
|
|
|
|
|
_driver->clear_pixel(x + i, y + j ); |
|
|
|
|
} |
|
|
|
|
line >>= 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for ( i = 0; i < 9; i++) { |
|
|
|
|
if (i == 8) { |
|
|
|
|
line = 0; |
|
|
|
|
} else { |
|
|
|
|
line = _font_16[(c * 16) + 8 + i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for ( j = 0; j < 8; j++) { |
|
|
|
|
if (line & 1) { |
|
|
|
|
_driver->set_pixel(x + i, y + 8 + j); |
|
|
|
|
} else { |
|
|
|
|
_driver->clear_pixel(x + i, y + 8 + j); |
|
|
|
|
} |
|
|
|
|
line >>= 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
for ( i = 0; i < 6; i++) { |
|
|
|
|
if (i == 5) { |
|
|
|
|
line = 0; |
|
|
|
|
} else { |
|
|
|
|
line = _font[(c * 5) + i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (uint8_t j = 0; j < 8; j++) { |
|
|
|
|
for ( j = 0; j < 8; j++) { |
|
|
|
|
if (line & 1) { |
|
|
|
|
_driver->set_pixel(x + i, y + j); |
|
|
|
|
} else { |
|
|
|
@ -451,6 +685,7 @@ void Display::draw_char(uint16_t x, uint16_t y, const char c)
@@ -451,6 +685,7 @@ void Display::draw_char(uint16_t x, uint16_t y, const char c)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Display::update_arm(uint8_t r) |
|
|
|
|
{ |
|
|
|
@ -523,9 +758,14 @@ void Display::update_ekf(uint8_t r)
@@ -523,9 +758,14 @@ void Display::update_ekf(uint8_t r)
|
|
|
|
|
|
|
|
|
|
void Display::update_battery(uint8_t r) |
|
|
|
|
{ |
|
|
|
|
// char msg [DISPLAY_MESSAGE_SIZE];
|
|
|
|
|
// snprintf(msg, DISPLAY_MESSAGE_SIZE, "BAT1: %4.2fV", (double)AP::battery().voltage()) ;
|
|
|
|
|
// draw_text(COLUMN(0), ROW(r), msg);
|
|
|
|
|
|
|
|
|
|
char msg [DISPLAY_MESSAGE_SIZE]; |
|
|
|
|
snprintf(msg, DISPLAY_MESSAGE_SIZE, "BAT1: %4.2fV", (double)AP::battery().voltage()) ; |
|
|
|
|
snprintf(msg, DISPLAY_MESSAGE_SIZE, "BAT1: %2.1fV,GPS:%2u", (double)AP::battery().voltage(), (unsigned)AP_Notify::flags.gps_num_sats) ; |
|
|
|
|
draw_text(COLUMN(0), ROW(r), msg); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Display::update_mode(uint8_t r) |
|
|
|
@ -580,3 +820,204 @@ void Display::update_text(uint8_t r)
@@ -580,3 +820,204 @@ void Display::update_text(uint8_t r)
|
|
|
|
|
|
|
|
|
|
draw_text(COLUMN(0), ROW(0), msg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Display::draw_chinese(uint8_t x,uint8_t y,unsigned char hz[][32],uint8_t no) |
|
|
|
|
{ |
|
|
|
|
uint8_t i,j,line = 0; |
|
|
|
|
for ( i = 0; i < 17; i++) { |
|
|
|
|
if (i == 16) { |
|
|
|
|
line = 0; |
|
|
|
|
} else { |
|
|
|
|
line = hz[2 * no][i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for ( j = 0; j < 8; j++) { |
|
|
|
|
if (line & 1) { |
|
|
|
|
_driver->set_pixel(x + i, y + j ); |
|
|
|
|
} else {
|
|
|
|
|
_driver->clear_pixel(x + i, y + j ); |
|
|
|
|
} |
|
|
|
|
line >>= 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for ( i = 0; i < 17; i++) { |
|
|
|
|
if (i == 16) { |
|
|
|
|
line = 0; |
|
|
|
|
} else { |
|
|
|
|
line = hz[2 * no + 1][i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for ( j = 0; j < 8; j++) { |
|
|
|
|
if (line & 1) { |
|
|
|
|
_driver->set_pixel(x + i, y + 8 + j); |
|
|
|
|
} else { |
|
|
|
|
_driver->clear_pixel(x + i, y + 8 + j); |
|
|
|
|
} |
|
|
|
|
line >>= 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Display::draw_BMP(uint8_t x0,uint8_t y0,uint8_t x1,uint8_t y1,unsigned char BMP[]) |
|
|
|
|
{ |
|
|
|
|
uint16_t i = 0; |
|
|
|
|
uint16_t j = 0; |
|
|
|
|
uint8_t x,y; |
|
|
|
|
uint8_t line = BMP[0]; |
|
|
|
|
|
|
|
|
|
// if(y1%8 == 0)
|
|
|
|
|
// y = y1/8;
|
|
|
|
|
// else
|
|
|
|
|
// y = y1/8 +1;
|
|
|
|
|
|
|
|
|
|
for(y=0; y<64; y+=8) |
|
|
|
|
{ |
|
|
|
|
for(x=0; x<128; x++) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
line = BMP[i++]; |
|
|
|
|
for ( j = 0; j < 8; j++) { |
|
|
|
|
if (line & 1) { |
|
|
|
|
_driver->set_pixel(x, y + j); |
|
|
|
|
} else { |
|
|
|
|
_driver->clear_pixel(x + i, y + j); |
|
|
|
|
} |
|
|
|
|
line >>= 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Display::display_clear(void) |
|
|
|
|
{ |
|
|
|
|
for(int i = 0; i < 64; i++) |
|
|
|
|
{ |
|
|
|
|
for(int j = 0; j<128; j++){ |
|
|
|
|
|
|
|
|
|
_driver->clear_pixel(j , i); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Display::update_chinese(uint8_t r) |
|
|
|
|
{ |
|
|
|
|
draw_chinese(COLUMN(0), ROW(r),ZRZKYT,0); |
|
|
|
|
draw_chinese(COLUMN(3), ROW(r),ZRZKYT,1); |
|
|
|
|
draw_chinese(COLUMN(6), ROW(r),ZRZKYT,2); |
|
|
|
|
draw_chinese(COLUMN(9), ROW(r),ZRZKYT,3); |
|
|
|
|
draw_chinese(COLUMN(12), ROW(r),ZRZKYT,4); |
|
|
|
|
draw_chinese(COLUMN(15), ROW(r),ZRZKYT,5); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Display::update_camera(uint8_t r) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
// char msg [DISPLAY_MESSAGE_SIZE];
|
|
|
|
|
// snprintf(msg, DISPLAY_MESSAGE_SIZE, "BAT1: %2.2fV,GPS:%2u", (double)AP::battery().voltage(), (unsigned)AP_Notify::flags.gps_num_sats) ;
|
|
|
|
|
// draw_text(COLUMN(0), ROW(r), msg);
|
|
|
|
|
|
|
|
|
|
char msg2 [DISPLAY_MESSAGE_SIZE];
|
|
|
|
|
snprintf(msg2, DISPLAY_MESSAGE_SIZE, "IMG: %4d,L: %4d ", AP_Notify::flags.image_index,AP_Notify::flags.image_index_log) ; |
|
|
|
|
draw_text(COLUMN(0), ROW(r), msg2); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Display::update_display_manual() |
|
|
|
|
{ |
|
|
|
|
static uint8_t time_cnt; |
|
|
|
|
|
|
|
|
|
static uint8_t display_stage = 1; |
|
|
|
|
|
|
|
|
|
// if (time_cnt++ > 10) {
|
|
|
|
|
// time_cnt = 0;
|
|
|
|
|
// display_stage++;
|
|
|
|
|
// }
|
|
|
|
|
// if(display_stage>5)
|
|
|
|
|
// display_stage = 1;
|
|
|
|
|
RESTART1: |
|
|
|
|
switch (display_stage) |
|
|
|
|
{ |
|
|
|
|
case 1: |
|
|
|
|
display_clear(); |
|
|
|
|
display_stage = 2; |
|
|
|
|
case 2: |
|
|
|
|
draw_BMP(0,0,128,8,gImage_zr12864); // 绘制图片
|
|
|
|
|
if (time_cnt++ > 10) { |
|
|
|
|
time_cnt = 0; |
|
|
|
|
display_stage++; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
display_clear(); |
|
|
|
|
display_stage = 4; |
|
|
|
|
case 4: |
|
|
|
|
// update_text(0);
|
|
|
|
|
update_chinese(0); |
|
|
|
|
update_camera(2); |
|
|
|
|
update_battery(4); |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
// case 5:
|
|
|
|
|
// // update_text(0);
|
|
|
|
|
// update_chinese(0);
|
|
|
|
|
// // update_gps(2);
|
|
|
|
|
// update_camera(4);
|
|
|
|
|
// break;
|
|
|
|
|
// case 6:
|
|
|
|
|
|
|
|
|
|
// display_stage = 1;
|
|
|
|
|
// goto RESTART1;
|
|
|
|
|
// // update_text(0);
|
|
|
|
|
// update_chinese(0);
|
|
|
|
|
// update_mode(2);
|
|
|
|
|
// update_battery(4);
|
|
|
|
|
// break;
|
|
|
|
|
// case 7:
|
|
|
|
|
// // update_text(0);
|
|
|
|
|
// update_chinese(0);
|
|
|
|
|
// update_gps(2);
|
|
|
|
|
// update_camera(4);
|
|
|
|
|
// break;
|
|
|
|
|
// case 8:
|
|
|
|
|
// display_stage = 1;
|
|
|
|
|
// goto RESTART1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
check if feedback pin is high |
|
|
|
|
*/ |
|
|
|
|
// void Display::trigger_pin_timer(void)
|
|
|
|
|
// {
|
|
|
|
|
// int8_t dpin = hal.gpio->analogPinToDigitalPin(_feedback_pin);
|
|
|
|
|
// if (dpin == -1) {
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// // ensure we are in input mode
|
|
|
|
|
// hal.gpio->pinMode(dpin, HAL_GPIO_INPUT);
|
|
|
|
|
|
|
|
|
|
// // enable pullup
|
|
|
|
|
// hal.gpio->write(dpin, 1);
|
|
|
|
|
|
|
|
|
|
// uint8_t pin_state = hal.gpio->read(dpin);
|
|
|
|
|
// uint8_t trigger_polarity = _feedback_polarity==0?0:1;
|
|
|
|
|
// if (pin_state == trigger_polarity &&
|
|
|
|
|
// _last_pin_state != trigger_polarity) {
|
|
|
|
|
// _page_turn = true;
|
|
|
|
|
// }
|
|
|
|
|
// _last_pin_state = pin_state;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|