commit f193e8d81997b252d1ecb5f054d3336c9e3cf717 Author: zhangyu Date: Mon Jan 5 09:10:47 2026 +0800 first commit diff --git a/01.png b/01.png new file mode 100644 index 0000000..e8ab022 Binary files /dev/null and b/01.png differ diff --git a/01_OFF.png b/01_OFF.png new file mode 100644 index 0000000..b2612b2 Binary files /dev/null and b/01_OFF.png differ diff --git a/01_on.png b/01_on.png new file mode 100644 index 0000000..9fec44d Binary files /dev/null and b/01_on.png differ diff --git a/02.png b/02.png new file mode 100644 index 0000000..de57ee4 Binary files /dev/null and b/02.png differ diff --git a/02_OFF.png b/02_OFF.png new file mode 100644 index 0000000..f51edee Binary files /dev/null and b/02_OFF.png differ diff --git a/02_on.png b/02_on.png new file mode 100644 index 0000000..ae9d961 Binary files /dev/null and b/02_on.png differ diff --git a/03.png b/03.png new file mode 100644 index 0000000..11eda2c Binary files /dev/null and b/03.png differ diff --git a/03_OFF.png b/03_OFF.png new file mode 100644 index 0000000..20bcfdf Binary files /dev/null and b/03_OFF.png differ diff --git a/03_on.png b/03_on.png new file mode 100644 index 0000000..9f164de Binary files /dev/null and b/03_on.png differ diff --git a/04.png b/04.png new file mode 100644 index 0000000..a553b13 Binary files /dev/null and b/04.png differ diff --git a/04_OFF.png b/04_OFF.png new file mode 100644 index 0000000..af3c3d6 Binary files /dev/null and b/04_OFF.png differ diff --git a/04_on.png b/04_on.png new file mode 100644 index 0000000..8197e82 Binary files /dev/null and b/04_on.png differ diff --git a/05.png b/05.png new file mode 100644 index 0000000..e6b1672 Binary files /dev/null and b/05.png differ diff --git a/05_OFF.png b/05_OFF.png new file mode 100644 index 0000000..620fe99 Binary files /dev/null and b/05_OFF.png differ diff --git a/05_on.png b/05_on.png new file mode 100644 index 0000000..4376506 Binary files /dev/null and b/05_on.png differ diff --git a/06.png b/06.png new file mode 100644 index 0000000..d580356 Binary files /dev/null and b/06.png differ diff --git a/06_OFF.png b/06_OFF.png new file mode 100644 index 0000000..e1778a2 Binary files /dev/null and b/06_OFF.png differ diff --git a/06_on.png b/06_on.png new file mode 100644 index 0000000..191983f Binary files /dev/null and b/06_on.png differ diff --git a/07.png b/07.png new file mode 100644 index 0000000..d7c038e Binary files /dev/null and b/07.png differ diff --git a/07_OFF.png b/07_OFF.png new file mode 100644 index 0000000..930fa0b Binary files /dev/null and b/07_OFF.png differ diff --git a/07_on.png b/07_on.png new file mode 100644 index 0000000..809c43b Binary files /dev/null and b/07_on.png differ diff --git a/08.png b/08.png new file mode 100644 index 0000000..ac8ca27 Binary files /dev/null and b/08.png differ diff --git a/08_OFF.png b/08_OFF.png new file mode 100644 index 0000000..f575311 Binary files /dev/null and b/08_OFF.png differ diff --git a/08_on.png b/08_on.png new file mode 100644 index 0000000..f368abd Binary files /dev/null and b/08_on.png differ diff --git a/09.png b/09.png new file mode 100644 index 0000000..9456c28 Binary files /dev/null and b/09.png differ diff --git a/09_OFF.png b/09_OFF.png new file mode 100644 index 0000000..087f22b Binary files /dev/null and b/09_OFF.png differ diff --git a/09_on.png b/09_on.png new file mode 100644 index 0000000..f1220a9 Binary files /dev/null and b/09_on.png differ diff --git a/10.png b/10.png new file mode 100644 index 0000000..68d98fb Binary files /dev/null and b/10.png differ diff --git a/10_OFF.png b/10_OFF.png new file mode 100644 index 0000000..f35b7d2 Binary files /dev/null and b/10_OFF.png differ diff --git a/10_on.png b/10_on.png new file mode 100644 index 0000000..39d983b Binary files /dev/null and b/10_on.png differ diff --git a/11.png b/11.png new file mode 100644 index 0000000..77031c3 Binary files /dev/null and b/11.png differ diff --git a/11_OFF.png b/11_OFF.png new file mode 100644 index 0000000..e5263a5 Binary files /dev/null and b/11_OFF.png differ diff --git a/12.png b/12.png new file mode 100644 index 0000000..1aba56c Binary files /dev/null and b/12.png differ diff --git a/12_OFF.png b/12_OFF.png new file mode 100644 index 0000000..c3826a4 Binary files /dev/null and b/12_OFF.png differ diff --git a/13.png b/13.png new file mode 100644 index 0000000..e7b3b23 Binary files /dev/null and b/13.png differ diff --git a/13_OFF.png b/13_OFF.png new file mode 100644 index 0000000..1ca817a Binary files /dev/null and b/13_OFF.png differ diff --git a/14.png b/14.png new file mode 100644 index 0000000..183ef07 Binary files /dev/null and b/14.png differ diff --git a/14_OFF.png b/14_OFF.png new file mode 100644 index 0000000..f0f9ac4 Binary files /dev/null and b/14_OFF.png differ diff --git a/15.png b/15.png new file mode 100644 index 0000000..9a43898 Binary files /dev/null and b/15.png differ diff --git a/15_OFF.png b/15_OFF.png new file mode 100644 index 0000000..d2209e8 Binary files /dev/null and b/15_OFF.png differ diff --git a/16.png b/16.png new file mode 100644 index 0000000..cc5f339 Binary files /dev/null and b/16.png differ diff --git a/16_OFF.png b/16_OFF.png new file mode 100644 index 0000000..12fb8cf Binary files /dev/null and b/16_OFF.png differ diff --git a/17.png b/17.png new file mode 100644 index 0000000..5aa8f58 Binary files /dev/null and b/17.png differ diff --git a/17_OFF.png b/17_OFF.png new file mode 100644 index 0000000..8552310 Binary files /dev/null and b/17_OFF.png differ diff --git a/18.png b/18.png new file mode 100644 index 0000000..9ead0c3 Binary files /dev/null and b/18.png differ diff --git a/18_OFF.png b/18_OFF.png new file mode 100644 index 0000000..f9a68e2 Binary files /dev/null and b/18_OFF.png differ diff --git a/19.png b/19.png new file mode 100644 index 0000000..0f7ebad Binary files /dev/null and b/19.png differ diff --git a/19_OFF.png b/19_OFF.png new file mode 100644 index 0000000..fdb1ff9 Binary files /dev/null and b/19_OFF.png differ diff --git a/20.png b/20.png new file mode 100644 index 0000000..4f80e7a Binary files /dev/null and b/20.png differ diff --git a/2024-11-28_1136.png b/2024-11-28_1136.png new file mode 100644 index 0000000..3d5f5b8 Binary files /dev/null and b/2024-11-28_1136.png differ diff --git a/2024-11-28_1142.png b/2024-11-28_1142.png new file mode 100644 index 0000000..26e30e5 Binary files /dev/null and b/2024-11-28_1142.png differ diff --git a/20_OFF.png b/20_OFF.png new file mode 100644 index 0000000..36f5563 Binary files /dev/null and b/20_OFF.png differ diff --git a/31_0x1F.lua b/31_0x1F.lua new file mode 100644 index 0000000..9b687f9 --- /dev/null +++ b/31_0x1F.lua @@ -0,0 +1,618 @@ +uart_free_protocol = 1 -- 设置全局变量uart_free_protocol,使用自由串口协议 + +-- 开锁指令数组(按地址1-5和锁编号1-12顺序) +openlock = { + -- 0x01地址 + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x01,0x05}, -- 01锁 + [1] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x02,0x06}, -- 02锁 + [2] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x03,0x07}, -- 03锁 + [3] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x04,0x00}, -- 04锁 + [4] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x05,0x01}, -- 05锁 + [5] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x06,0x02}, -- 06锁 + [6] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x07,0x03}, -- 07锁 + [7] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x08,0x0C}, -- 08锁 + [8] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x09,0x0D}, -- 09锁 + [9] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0A,0x0E}, -- 10锁 + [10] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0B,0x0F}, -- 11锁 + [11] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0C,0x08}, -- 12锁 + + -- 0x02地址 + [12] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x01,0x06}, -- 13锁 + [13] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x02,0x05}, -- 14锁 + [14] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x03,0x04}, -- 15锁 + [15] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x04,0x03}, -- 16锁 + [16] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x05,0x02}, -- 17锁 + [17] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x06,0x01}, -- 18锁 + [18] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x07,0x00}, -- 19锁 + [19] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x08,0x0F}, -- 20锁 + [20] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x09,0x0E}, -- 21锁 + [21] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0A,0x0D}, -- 22锁 + [22] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0B,0x0C}, -- 23锁 + [23] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0C,0x0B}, -- 24锁 + + -- 0x03地址 + [24] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x01,0x07}, -- 25锁 + [25] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x02,0x04}, -- 26锁 + [26] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x03,0x05}, -- 27锁 + [27] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x04,0x02}, -- 28锁 + [28] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x05,0x03}, -- 29锁 + [29] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x06,0x00}, -- 30锁 + [30] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x07,0x01}, -- 31锁 + [31] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x08,0x0E}, -- 32锁 + [32] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x09,0x0F}, -- 33锁 + [33] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0A,0x0C}, -- 34锁 + [34] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0B,0x0D}, -- 35锁 + [35] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0C,0x0A}, -- 36锁 + + -- 0x04地址 + [36] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x01,0x00}, -- 37锁 + [37] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x02,0x03}, -- 38锁 + [38] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x03,0x02}, -- 39锁 + [39] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x04,0x05}, -- 40锁 + [40] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x05,0x04}, -- 41锁 + [41] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x06,0x07}, -- 42锁 + [42] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x07,0x06}, -- 43锁 + [43] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x08,0x09}, -- 44锁 + [44] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x09,0x08}, -- 45锁 + [45] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0A,0x0B}, -- 46锁 + [46] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0B,0x0A}, -- 47锁 + [47] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0C,0x0D}, -- 48锁 + + -- 0x05地址 + [48] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x01,0x01}, -- 49锁 + [49] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x02,0x02}, -- 50锁 + [50] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x03,0x03}, -- 51锁 + [51] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x04,0x04}, -- 52锁 + [52] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x05,0x05}, -- 53锁 + [53] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x06,0x06}, -- 54锁 + [54] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x07,0x07}, -- 55锁 + [55] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x08,0x08}, -- 56锁 + [56] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x09,0x09}, -- 57锁 + [57] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0A,0x0A}, -- 58锁 + [58] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0B,0x0B}, -- 59锁 + [59] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0C,0x0C} -- 60锁 +} + +-- 一键全开指令数组(按地址1-5顺序) +openAlllock = { + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x05,0x00,0x00,0x04}, -- 0x01地址 + [1] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x05,0x00,0x00,0x07}, -- 0x02地址 + [2] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x05,0x00,0x00,0x06}, -- 0x03地址 + [3] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x05,0x00,0x00,0x01}, -- 0x04地址 + [4] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x05,0x00,0x00,0x00} -- 0x05地址 +} + +-- 读取所有通道状态指令数组(按地址1-5顺序) +readLockState = { + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x0A,0x00,0x00,0x0B}, -- 0x01地址 + [1] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x0A,0x00,0x00,0x08}, -- 0x02地址 + [2] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x0A,0x00,0x00,0x09}, -- 0x03地址 + [3] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x0A,0x00,0x00,0x0E}, -- 0x04地址 + [4] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x0A,0x00,0x00,0x0F} -- 0x05地址 +} + +sendID = 0 -- 全局发送ID +sendFlag = 0 -- 全局发送状态,设置优先级 0-查询状态 1-发送开锁 + +-- 系统加载LUA脚本文件之后,立即调用此回调函数,通常用于执行初始化操作,仅执行一次。 +-- on_timer(timer_id)函数是LUA定时器中断函数,timer_id值范围为0-31。 +function on_init() + start_timer(1, 200, 0, 0) +end + +-- 接收查询所有通道状态指令,改变状态 +function on_uart_recv_data(packet, bytelen) + + -- 第3个字节packet[2]为锁控板地址,第9个字节packet[8 + i]为所有锁状态(一个锁控板有12把锁) + if packet[0] == 0xA5 and packet[1] == 0xA5 and packet[2] ~= 0x00 and packet[3] == 0x00 and packet[5] == 0x0A and packet[6] == 0x00 and packet[7] == 0x0C then + + -- 采用遍历赋值,待验证 + -- local screenId = 0 + -- if packet[2] == 1 then + -- screenId = 0 + -- elseif packet[2] == 2 then + -- screenId = 1 + -- elseif packet[2] == 3 then + -- screenId = 2 + -- elseif packet[2] == 4 then + -- screenId = 3 + -- elseif packet[2] == 5 then + -- screenId = 4 + -- end + + -- for i = 0, 11 do + -- if packet[8 + i] == 0 then + -- set_value(screenId, i + 1, 1) + -- else + -- set_value(screenId, i + 1, 0) + -- end + -- end + + if packet[2] == 1 then -- 0x01地址 + if packet[8] == 0 then + set_value(0, 1, 1) + else + set_value(0, 1, 0) + end + if packet[9] == 0 then + set_value(0, 2, 1) + else + set_value(0, 2, 0) + end + if packet[10] == 0 then + set_value(0, 3, 1) + else + set_value(0, 3, 0) + end + if packet[11] == 0 then + set_value(0, 4, 1) + else + set_value(0, 4, 0) + end + if packet[12] == 0 then + set_value(0, 5, 1) + else + set_value(0, 5, 0) + end + if packet[13] == 0 then + set_value(0, 6, 1) + else + set_value(0, 6, 0) + end + if packet[14] == 0 then + set_value(0, 7, 1) + else + set_value(0, 7, 0) + end + if packet[15] == 0 then + set_value(0, 8, 1) + else + set_value(0, 8, 0) + end + if packet[16] == 0 then + set_value(0, 9, 1) + else + set_value(0, 9, 0) + end + if packet[17] == 0 then + set_value(0, 10, 1) + else + set_value(0, 10, 0) + end + end + + if packet[2] == 2 then -- 0x02地址 + if packet[8] == 0 then + set_value(1, 1, 1) + else + set_value(1, 1, 0) + end + if packet[9] == 0 then + set_value(1, 2, 1) + else + set_value(1, 2, 0) + end + if packet[10] == 0 then + set_value(1, 3, 1) + else + set_value(1, 3, 0) + end + if packet[11] == 0 then + set_value(1, 4, 1) + else + set_value(1, 4, 0) + end + if packet[12] == 0 then + set_value(1, 5, 1) + else + set_value(1, 5, 0) + end + if packet[13] == 0 then + set_value(1, 6, 1) + else + set_value(1, 6, 0) + end + if packet[14] == 0 then + set_value(1, 7, 1) + else + set_value(1, 7, 0) + end + if packet[15] == 0 then + set_value(1, 8, 1) + else + set_value(1, 8, 0) + end + if packet[16] == 0 then + set_value(1, 9, 1) + else + set_value(1, 9, 0) + end + if packet[17] == 0 then + set_value(1, 10, 1) + else + set_value(1, 10, 0) + end + end + + if packet[2] == 3 then -- 0x03地址 + if packet[8] == 0 then + set_value(2, 1, 1) + else + set_value(2, 1, 0) + end + if packet[9] == 0 then + set_value(2, 2, 1) + else + set_value(2, 2, 0) + end + if packet[10] == 0 then + set_value(2, 3, 1) + else + set_value(2, 3, 0) + end + if packet[11] == 0 then + set_value(2, 4, 1) + else + set_value(2, 4, 0) + end + if packet[12] == 0 then + set_value(2, 5, 1) + else + set_value(2, 5, 0) + end + if packet[13] == 0 then + set_value(2, 6, 1) + else + set_value(2, 6, 0) + end + if packet[14] == 0 then + set_value(2, 7, 1) + else + set_value(2, 7, 0) + end + if packet[15] == 0 then + set_value(2, 8, 1) + else + set_value(2, 8, 0) + end + if packet[16] == 0 then + set_value(2, 9, 1) + else + set_value(2, 9, 0) + end + if packet[17] == 0 then + set_value(2, 10, 1) + else + set_value(2, 10, 0) + end + end + + if packet[2] == 4 then -- 0x04地址 + if packet[8] == 0 then + set_value(3, 1, 1) + else + set_value(3, 1, 0) + end + if packet[9] == 0 then + set_value(3, 2, 1) + else + set_value(3, 2, 0) + end + if packet[10] == 0 then + set_value(3, 3, 1) + else + set_value(3, 3, 0) + end + if packet[11] == 0 then + set_value(3, 4, 1) + else + set_value(3, 4, 0) + end + if packet[12] == 0 then + set_value(3, 5, 1) + else + set_value(3, 5, 0) + end + if packet[13] == 0 then + set_value(3, 6, 1) + else + set_value(3, 6, 0) + end + if packet[14] == 0 then + set_value(3, 7, 1) + else + set_value(3, 7, 0) + end + if packet[15] == 0 then + set_value(3, 8, 1) + else + set_value(3, 8, 0) + end + if packet[16] == 0 then + set_value(3, 9, 1) + else + set_value(3, 9, 0) + end + if packet[17] == 0 then + set_value(3, 10, 1) + else + set_value(3, 10, 0) + end + end + + if packet[2] == 5 then -- 0x05地址 + if packet[8] == 0 then + set_value(4, 1, 1) + else + set_value(4, 1, 0) + end + if packet[9] == 0 then + set_value(4, 2, 1) + else + set_value(4, 2, 0) + end + if packet[10] == 0 then + set_value(4, 3, 1) + else + set_value(4, 3, 0) + end + if packet[11] == 0 then + set_value(4, 4, 1) + else + set_value(4, 4, 0) + end + if packet[12] == 0 then + set_value(4, 5, 1) + else + set_value(4, 5, 0) + end + if packet[13] == 0 then + set_value(4, 6, 1) + else + set_value(4, 6, 0) + end + if packet[14] == 0 then + set_value(4, 7, 1) + else + set_value(4, 7, 0) + end + if packet[15] == 0 then + set_value(4, 8, 1) + else + set_value(4, 8, 0) + end + if packet[16] == 0 then + set_value(4, 9, 1) + else + set_value(4, 9, 0) + end + if packet[17] == 0 then + set_value(4, 10, 1) + else + set_value(4, 10, 0) + end + end + + end + +end + +-- 用户触摸修改控件后,执行此回调函数.点击按钮控件,修改文本控件、修改滑动条、滑动选择都会触发此事件。 +-- screen 画面ID +-- control 控件ID +-- value 控件值 +function on_control_notify(screen, control, value) + -- 按钮点击事件开锁,后期考虑采用一定的规律定制计算公式,如sendID = (screen * 12) + (control - 11) + if screen == 0 and control == 11 and value == 1 then -- 画面0, 0x01地址 + sendID = 0 + sendFlag = 1 + elseif screen == 0 and control == 12 and value == 1 then + sendID = 1 + sendFlag = 1 + elseif screen == 0 and control == 13 and value == 1 then + sendID = 2 + sendFlag = 1 + elseif screen == 0 and control == 14 and value == 1 then + sendID = 3 + sendFlag = 1 + elseif screen == 0 and control == 15 and value == 1 then + sendID = 4 + sendFlag = 1 + elseif screen == 0 and control == 16 and value == 1 then + sendID = 5 + sendFlag = 1 + elseif screen == 0 and control == 17 and value == 1 then + sendID = 6 + sendFlag = 1 + elseif screen == 0 and control == 18 and value == 1 then + sendID = 7 + sendFlag = 1 + elseif screen == 0 and control == 19 and value == 1 then + sendID = 8 + sendFlag = 1 + elseif screen == 0 and control == 20 and value == 1 then + sendID = 9 + sendFlag = 1 + elseif screen == 1 and control == 11 and value == 1 then -- 画面1,0x02地址 + sendID = 12 + sendFlag = 1 + elseif screen == 1 and control == 12 and value == 1 then + sendID = 13 + sendFlag = 1 + elseif screen == 1 and control == 13 and value == 1 then + sendID = 14 + sendFlag = 1 + elseif screen == 1 and control == 14 and value == 1 then + sendID = 15 + sendFlag = 1 + elseif screen == 1 and control == 15 and value == 1 then + sendID = 16 + sendFlag = 1 + elseif screen == 1 and control == 16 and value == 1 then + sendID = 17 + sendFlag = 1 + elseif screen == 1 and control == 17 and value == 1 then + sendID = 18 + sendFlag = 1 + elseif screen == 1 and control == 18 and value == 1 then + sendID = 19 + sendFlag = 1 + elseif screen == 1 and control == 19 and value == 1 then + sendID = 20 + sendFlag = 1 + elseif screen == 1 and control == 20 and value == 1 then + sendID = 21 + sendFlag = 1 + elseif screen == 2 and control == 11 and value == 1 then -- 画面2,0x03地址 + sendID = 24 + sendFlag = 1 + elseif screen == 2 and control == 12 and value == 1 then + sendID = 25 + sendFlag = 1 + elseif screen == 2 and control == 13 and value == 1 then + sendID = 26 + sendFlag = 1 + elseif screen == 2 and control == 14 and value == 1 then + sendID = 27 + sendFlag = 1 + elseif screen == 2 and control == 15 and value == 1 then + sendID = 28 + sendFlag = 1 + elseif screen == 2 and control == 16 and value == 1 then + sendID = 29 + sendFlag = 1 + elseif screen == 2 and control == 17 and value == 1 then + sendID = 30 + sendFlag = 1 + elseif screen == 2 and control == 18 and value == 1 then + sendID = 31 + sendFlag = 1 + elseif screen == 2 and control == 19 and value == 1 then + sendID = 32 + sendFlag = 1 + elseif screen == 2 and control == 20 and value == 1 then + sendID = 33 + sendFlag = 1 + elseif screen == 3 and control == 11 and value == 1 then -- 画面3,0x04地址 + sendID = 36 + sendFlag = 1 + elseif screen == 3 and control == 12 and value == 1 then + sendID = 37 + sendFlag = 1 + elseif screen == 3 and control == 13 and value == 1 then + sendID = 38 + sendFlag = 1 + elseif screen == 3 and control == 14 and value == 1 then + sendID = 39 + sendFlag = 1 + elseif screen == 3 and control == 15 and value == 1 then + sendID = 40 + sendFlag = 1 + elseif screen == 3 and control == 16 and value == 1 then + sendID = 41 + sendFlag = 1 + elseif screen == 3 and control == 17 and value == 1 then + sendID = 42 + sendFlag = 1 + elseif screen == 3 and control == 18 and value == 1 then + sendID = 43 + sendFlag = 1 + elseif screen == 3 and control == 19 and value == 1 then + sendID = 44 + sendFlag = 1 + elseif screen == 3 and control == 20 and value == 1 then + sendID = 45 + sendFlag = 1 + elseif screen == 4 and control == 11 and value == 1 then -- 画面4,0x05地址 + sendID = 48 + sendFlag = 1 + elseif screen == 4 and control == 12 and value == 1 then + sendID = 49 + sendFlag = 1 + elseif screen == 4 and control == 13 and value == 1 then + sendID = 50 + sendFlag = 1 + elseif screen == 4 and control == 14 and value == 1 then + sendID = 51 + sendFlag = 1 + elseif screen == 4 and control == 15 and value == 1 then + sendID = 52 + sendFlag = 1 + elseif screen == 4 and control == 16 and value == 1 then + sendID = 53 + sendFlag = 1 + elseif screen == 4 and control == 17 and value == 1 then + sendID = 54 + sendFlag = 1 + elseif screen == 4 and control == 18 and value == 1 then + sendID = 55 + sendFlag = 1 + elseif screen == 4 and control == 19 and value == 1 then + sendID = 56 + sendFlag = 1 + elseif screen == 4 and control == 20 and value == 1 then + sendID = 57 + sendFlag = 1 + elseif screen == 0 and control == 100 and value == 1 then -- 一键全开,控件ID统一为100 + sendID = 100 + sendFlag = 1 + elseif screen == 1 and control == 100 and value == 1 then + sendID = 200 + sendFlag = 1 + elseif screen == 2 and control == 100 and value == 1 then + sendID = 300 + sendFlag = 1 + elseif screen == 3 and control == 100 and value == 1 then + sendID = 400 + sendFlag = 1 + elseif screen == 4 and control == 100 and value == 1 then + sendID = 500 + sendFlag = 1 + end +end + +-- 系统每隔1秒钟会自动调用此回调函数。 +function on_systick() + +end + +-- 当画面切换时,执行此回调函数,screen为切换后的画面ID。 +function on_screen_change(screen) + +end + +-- LUA定时器中断函数,timer_id值范围为0-31。 +-- 单独使用该函数不生效,该函数触发回调需要配合 start_timer(timer_id, timeout, countdown, repeatNum) ,来开启定时器,定时器溢出超时了,才会触发on_timer(timer_id)。 +function on_timer(timer_id) + + if sendFlag == 1 then + sendFlag = 0 -- 发送开锁的优先级更高 + if sendID == 100 then + uart_send_data(openAlllock[0]) -- 0x01地址全开 + elseif sendID == 200 then + uart_send_data(openAlllock[1]) -- 0x02地址全开 + elseif sendID == 300 then + uart_send_data(openAlllock[2]) -- 0x03地址全开 + elseif sendID == 400 then + uart_send_data(openAlllock[3]) -- 0x04地址全开 + elseif sendID == 500 then + uart_send_data(openAlllock[4]) -- 0x05地址全开 + else + uart_send_data(openlock[sendID]) -- 根据sendId获取对应的openlock数组开锁指令发送 + end + else -- 读取锁控板所有通道状态, 根据当前画面ID获取对应的查询所有锁状态的指令发送 + local currentScreenId = get_current_screen() + if currentScreenId == 0 then + uart_send_data(readLockState[0]) + elseif currentScreenId == 1 then + uart_send_data(readLockState[1]) + elseif currentScreenId == 2 then + uart_send_data(readLockState[2]) + elseif currentScreenId == 3 then + uart_send_data(readLockState[3]) + else + uart_send_data(readLockState[4]) + end + end + +end \ No newline at end of file diff --git a/Button-Project.cfprj b/Button-Project.cfprj new file mode 100644 index 0000000..ca3efee --- /dev/null +++ b/Button-Project.cfprj @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/OFF/01_OFF.png b/OFF/01_OFF.png new file mode 100644 index 0000000..db29adf Binary files /dev/null and b/OFF/01_OFF.png differ diff --git a/OFF/02_OFF.png b/OFF/02_OFF.png new file mode 100644 index 0000000..4163222 Binary files /dev/null and b/OFF/02_OFF.png differ diff --git a/OFF/03_OFF.png b/OFF/03_OFF.png new file mode 100644 index 0000000..d30011d Binary files /dev/null and b/OFF/03_OFF.png differ diff --git a/OFF/04_OFF.png b/OFF/04_OFF.png new file mode 100644 index 0000000..30b6456 Binary files /dev/null and b/OFF/04_OFF.png differ diff --git a/OFF/05_OFF.png b/OFF/05_OFF.png new file mode 100644 index 0000000..cdb546b Binary files /dev/null and b/OFF/05_OFF.png differ diff --git a/OFF/06_OFF.png b/OFF/06_OFF.png new file mode 100644 index 0000000..52b68a0 Binary files /dev/null and b/OFF/06_OFF.png differ diff --git a/OFF/07_OFF.png b/OFF/07_OFF.png new file mode 100644 index 0000000..860c8f5 Binary files /dev/null and b/OFF/07_OFF.png differ diff --git a/OFF/08_OFF.png b/OFF/08_OFF.png new file mode 100644 index 0000000..86ef092 Binary files /dev/null and b/OFF/08_OFF.png differ diff --git a/OFF/09_OFF.png b/OFF/09_OFF.png new file mode 100644 index 0000000..3aba66f Binary files /dev/null and b/OFF/09_OFF.png differ diff --git a/OFF/10_OFF.png b/OFF/10_OFF.png new file mode 100644 index 0000000..2009e03 Binary files /dev/null and b/OFF/10_OFF.png differ diff --git a/OFF/11_OFF.png b/OFF/11_OFF.png new file mode 100644 index 0000000..e5263a5 Binary files /dev/null and b/OFF/11_OFF.png differ diff --git a/OFF/12_OFF.png b/OFF/12_OFF.png new file mode 100644 index 0000000..c3826a4 Binary files /dev/null and b/OFF/12_OFF.png differ diff --git a/OFF/13_OFF.png b/OFF/13_OFF.png new file mode 100644 index 0000000..1ca817a Binary files /dev/null and b/OFF/13_OFF.png differ diff --git a/OFF/14_OFF.png b/OFF/14_OFF.png new file mode 100644 index 0000000..f0f9ac4 Binary files /dev/null and b/OFF/14_OFF.png differ diff --git a/OFF/15_OFF.png b/OFF/15_OFF.png new file mode 100644 index 0000000..d2209e8 Binary files /dev/null and b/OFF/15_OFF.png differ diff --git a/OFF/16_OFF.png b/OFF/16_OFF.png new file mode 100644 index 0000000..12fb8cf Binary files /dev/null and b/OFF/16_OFF.png differ diff --git a/OFF/17_OFF.png b/OFF/17_OFF.png new file mode 100644 index 0000000..8552310 Binary files /dev/null and b/OFF/17_OFF.png differ diff --git a/OFF/18_OFF.png b/OFF/18_OFF.png new file mode 100644 index 0000000..f9a68e2 Binary files /dev/null and b/OFF/18_OFF.png differ diff --git a/OFF/19_OFF.png b/OFF/19_OFF.png new file mode 100644 index 0000000..fdb1ff9 Binary files /dev/null and b/OFF/19_OFF.png differ diff --git a/OFF/20_OFF.png b/OFF/20_OFF.png new file mode 100644 index 0000000..36f5563 Binary files /dev/null and b/OFF/20_OFF.png differ diff --git a/Off.png b/Off.png new file mode 100644 index 0000000..edd23e8 Binary files /dev/null and b/Off.png differ diff --git a/Pic0.tft b/Pic0.tft new file mode 100644 index 0000000..c67a335 --- /dev/null +++ b/Pic0.tft @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pic1.tft b/Pic1.tft new file mode 100644 index 0000000..d8c0abd --- /dev/null +++ b/Pic1.tft @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pic2.tft b/Pic2.tft new file mode 100644 index 0000000..0b718dc --- /dev/null +++ b/Pic2.tft @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pic3.tft b/Pic3.tft new file mode 100644 index 0000000..2454e5f --- /dev/null +++ b/Pic3.tft @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pic4.tft b/Pic4.tft new file mode 100644 index 0000000..d3de930 --- /dev/null +++ b/Pic4.tft @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PictureTemp/0_Pic.bmp b/PictureTemp/0_Pic.bmp new file mode 100644 index 0000000..c5f7d5b Binary files /dev/null and b/PictureTemp/0_Pic.bmp differ diff --git a/PictureTemp/1_Pic.bmp b/PictureTemp/1_Pic.bmp new file mode 100644 index 0000000..c5f7d5b Binary files /dev/null and b/PictureTemp/1_Pic.bmp differ diff --git a/PictureTemp/2_Pic.bmp b/PictureTemp/2_Pic.bmp new file mode 100644 index 0000000..c5f7d5b Binary files /dev/null and b/PictureTemp/2_Pic.bmp differ diff --git a/PictureTemp/3000_Pic.bmp b/PictureTemp/3000_Pic.bmp new file mode 100644 index 0000000..f3aa31a Binary files /dev/null and b/PictureTemp/3000_Pic.bmp differ diff --git a/PictureTemp/3001_Pic.bmp b/PictureTemp/3001_Pic.bmp new file mode 100644 index 0000000..e9157cf Binary files /dev/null and b/PictureTemp/3001_Pic.bmp differ diff --git a/PictureTemp/3002_Pic.bmp b/PictureTemp/3002_Pic.bmp new file mode 100644 index 0000000..226d4f1 Binary files /dev/null and b/PictureTemp/3002_Pic.bmp differ diff --git a/PictureTemp/3003_Pic.bmp b/PictureTemp/3003_Pic.bmp new file mode 100644 index 0000000..f0bbb43 Binary files /dev/null and b/PictureTemp/3003_Pic.bmp differ diff --git a/PictureTemp/3004_Pic.bmp b/PictureTemp/3004_Pic.bmp new file mode 100644 index 0000000..51e3a38 Binary files /dev/null and b/PictureTemp/3004_Pic.bmp differ diff --git a/PictureTemp/3005_Pic.bmp b/PictureTemp/3005_Pic.bmp new file mode 100644 index 0000000..778d2cd Binary files /dev/null and b/PictureTemp/3005_Pic.bmp differ diff --git a/PictureTemp/3006_Pic.bmp b/PictureTemp/3006_Pic.bmp new file mode 100644 index 0000000..c413cae Binary files /dev/null and b/PictureTemp/3006_Pic.bmp differ diff --git a/PictureTemp/3007_Pic.bmp b/PictureTemp/3007_Pic.bmp new file mode 100644 index 0000000..72277f3 Binary files /dev/null and b/PictureTemp/3007_Pic.bmp differ diff --git a/PictureTemp/3008_Pic.bmp b/PictureTemp/3008_Pic.bmp new file mode 100644 index 0000000..156e1bb Binary files /dev/null and b/PictureTemp/3008_Pic.bmp differ diff --git a/PictureTemp/3009_Pic.bmp b/PictureTemp/3009_Pic.bmp new file mode 100644 index 0000000..661d1a9 Binary files /dev/null and b/PictureTemp/3009_Pic.bmp differ diff --git a/PictureTemp/3010_Pic.bmp b/PictureTemp/3010_Pic.bmp new file mode 100644 index 0000000..506c3f1 Binary files /dev/null and b/PictureTemp/3010_Pic.bmp differ diff --git a/PictureTemp/3011_Pic.bmp b/PictureTemp/3011_Pic.bmp new file mode 100644 index 0000000..8e7a988 Binary files /dev/null and b/PictureTemp/3011_Pic.bmp differ diff --git a/PictureTemp/3012_Pic.bmp b/PictureTemp/3012_Pic.bmp new file mode 100644 index 0000000..0b7168d Binary files /dev/null and b/PictureTemp/3012_Pic.bmp differ diff --git a/PictureTemp/3013_Pic.bmp b/PictureTemp/3013_Pic.bmp new file mode 100644 index 0000000..70d6b9c Binary files /dev/null and b/PictureTemp/3013_Pic.bmp differ diff --git a/PictureTemp/3014_Pic.bmp b/PictureTemp/3014_Pic.bmp new file mode 100644 index 0000000..0a9521c Binary files /dev/null and b/PictureTemp/3014_Pic.bmp differ diff --git a/PictureTemp/3015_Pic.bmp b/PictureTemp/3015_Pic.bmp new file mode 100644 index 0000000..b79c824 Binary files /dev/null and b/PictureTemp/3015_Pic.bmp differ diff --git a/PictureTemp/3016_Pic.bmp b/PictureTemp/3016_Pic.bmp new file mode 100644 index 0000000..9231b46 Binary files /dev/null and b/PictureTemp/3016_Pic.bmp differ diff --git a/PictureTemp/3017_Pic.bmp b/PictureTemp/3017_Pic.bmp new file mode 100644 index 0000000..a45eb81 Binary files /dev/null and b/PictureTemp/3017_Pic.bmp differ diff --git a/PictureTemp/3018_Pic.bmp b/PictureTemp/3018_Pic.bmp new file mode 100644 index 0000000..01eeee8 Binary files /dev/null and b/PictureTemp/3018_Pic.bmp differ diff --git a/PictureTemp/3019_Pic.bmp b/PictureTemp/3019_Pic.bmp new file mode 100644 index 0000000..eb04a9b Binary files /dev/null and b/PictureTemp/3019_Pic.bmp differ diff --git a/PictureTemp/3020_Pic.bmp b/PictureTemp/3020_Pic.bmp new file mode 100644 index 0000000..f3aa31a Binary files /dev/null and b/PictureTemp/3020_Pic.bmp differ diff --git a/PictureTemp/3021_Pic.bmp b/PictureTemp/3021_Pic.bmp new file mode 100644 index 0000000..e9157cf Binary files /dev/null and b/PictureTemp/3021_Pic.bmp differ diff --git a/PictureTemp/3022_Pic.bmp b/PictureTemp/3022_Pic.bmp new file mode 100644 index 0000000..226d4f1 Binary files /dev/null and b/PictureTemp/3022_Pic.bmp differ diff --git a/PictureTemp/3023_Pic.bmp b/PictureTemp/3023_Pic.bmp new file mode 100644 index 0000000..f0bbb43 Binary files /dev/null and b/PictureTemp/3023_Pic.bmp differ diff --git a/PictureTemp/3024_Pic.bmp b/PictureTemp/3024_Pic.bmp new file mode 100644 index 0000000..51e3a38 Binary files /dev/null and b/PictureTemp/3024_Pic.bmp differ diff --git a/PictureTemp/3025_Pic.bmp b/PictureTemp/3025_Pic.bmp new file mode 100644 index 0000000..778d2cd Binary files /dev/null and b/PictureTemp/3025_Pic.bmp differ diff --git a/PictureTemp/3026_Pic.bmp b/PictureTemp/3026_Pic.bmp new file mode 100644 index 0000000..c413cae Binary files /dev/null and b/PictureTemp/3026_Pic.bmp differ diff --git a/PictureTemp/3027_Pic.bmp b/PictureTemp/3027_Pic.bmp new file mode 100644 index 0000000..72277f3 Binary files /dev/null and b/PictureTemp/3027_Pic.bmp differ diff --git a/PictureTemp/3028_Pic.bmp b/PictureTemp/3028_Pic.bmp new file mode 100644 index 0000000..156e1bb Binary files /dev/null and b/PictureTemp/3028_Pic.bmp differ diff --git a/PictureTemp/3029_Pic.bmp b/PictureTemp/3029_Pic.bmp new file mode 100644 index 0000000..661d1a9 Binary files /dev/null and b/PictureTemp/3029_Pic.bmp differ diff --git a/PictureTemp/3030_Pic.bmp b/PictureTemp/3030_Pic.bmp new file mode 100644 index 0000000..506c3f1 Binary files /dev/null and b/PictureTemp/3030_Pic.bmp differ diff --git a/PictureTemp/3031_Pic.bmp b/PictureTemp/3031_Pic.bmp new file mode 100644 index 0000000..8e7a988 Binary files /dev/null and b/PictureTemp/3031_Pic.bmp differ diff --git a/PictureTemp/3032_Pic.bmp b/PictureTemp/3032_Pic.bmp new file mode 100644 index 0000000..0b7168d Binary files /dev/null and b/PictureTemp/3032_Pic.bmp differ diff --git a/PictureTemp/3033_Pic.bmp b/PictureTemp/3033_Pic.bmp new file mode 100644 index 0000000..70d6b9c Binary files /dev/null and b/PictureTemp/3033_Pic.bmp differ diff --git a/PictureTemp/3034_Pic.bmp b/PictureTemp/3034_Pic.bmp new file mode 100644 index 0000000..0a9521c Binary files /dev/null and b/PictureTemp/3034_Pic.bmp differ diff --git a/PictureTemp/3035_Pic.bmp b/PictureTemp/3035_Pic.bmp new file mode 100644 index 0000000..b79c824 Binary files /dev/null and b/PictureTemp/3035_Pic.bmp differ diff --git a/PictureTemp/3036_Pic.bmp b/PictureTemp/3036_Pic.bmp new file mode 100644 index 0000000..9231b46 Binary files /dev/null and b/PictureTemp/3036_Pic.bmp differ diff --git a/PictureTemp/3037_Pic.bmp b/PictureTemp/3037_Pic.bmp new file mode 100644 index 0000000..a45eb81 Binary files /dev/null and b/PictureTemp/3037_Pic.bmp differ diff --git a/PictureTemp/3038_Pic.bmp b/PictureTemp/3038_Pic.bmp new file mode 100644 index 0000000..01eeee8 Binary files /dev/null and b/PictureTemp/3038_Pic.bmp differ diff --git a/PictureTemp/3039_Pic.bmp b/PictureTemp/3039_Pic.bmp new file mode 100644 index 0000000..eb04a9b Binary files /dev/null and b/PictureTemp/3039_Pic.bmp differ diff --git a/PictureTemp/3040_Pic.bmp b/PictureTemp/3040_Pic.bmp new file mode 100644 index 0000000..f3aa31a Binary files /dev/null and b/PictureTemp/3040_Pic.bmp differ diff --git a/PictureTemp/3041_Pic.bmp b/PictureTemp/3041_Pic.bmp new file mode 100644 index 0000000..e9157cf Binary files /dev/null and b/PictureTemp/3041_Pic.bmp differ diff --git a/PictureTemp/3042_Pic.bmp b/PictureTemp/3042_Pic.bmp new file mode 100644 index 0000000..226d4f1 Binary files /dev/null and b/PictureTemp/3042_Pic.bmp differ diff --git a/PictureTemp/3043_Pic.bmp b/PictureTemp/3043_Pic.bmp new file mode 100644 index 0000000..f0bbb43 Binary files /dev/null and b/PictureTemp/3043_Pic.bmp differ diff --git a/PictureTemp/3044_Pic.bmp b/PictureTemp/3044_Pic.bmp new file mode 100644 index 0000000..51e3a38 Binary files /dev/null and b/PictureTemp/3044_Pic.bmp differ diff --git a/PictureTemp/3045_Pic.bmp b/PictureTemp/3045_Pic.bmp new file mode 100644 index 0000000..778d2cd Binary files /dev/null and b/PictureTemp/3045_Pic.bmp differ diff --git a/PictureTemp/3046_Pic.bmp b/PictureTemp/3046_Pic.bmp new file mode 100644 index 0000000..c413cae Binary files /dev/null and b/PictureTemp/3046_Pic.bmp differ diff --git a/PictureTemp/3047_Pic.bmp b/PictureTemp/3047_Pic.bmp new file mode 100644 index 0000000..72277f3 Binary files /dev/null and b/PictureTemp/3047_Pic.bmp differ diff --git a/PictureTemp/3048_Pic.bmp b/PictureTemp/3048_Pic.bmp new file mode 100644 index 0000000..156e1bb Binary files /dev/null and b/PictureTemp/3048_Pic.bmp differ diff --git a/PictureTemp/3049_Pic.bmp b/PictureTemp/3049_Pic.bmp new file mode 100644 index 0000000..661d1a9 Binary files /dev/null and b/PictureTemp/3049_Pic.bmp differ diff --git a/PictureTemp/3050_Pic.bmp b/PictureTemp/3050_Pic.bmp new file mode 100644 index 0000000..506c3f1 Binary files /dev/null and b/PictureTemp/3050_Pic.bmp differ diff --git a/PictureTemp/3051_Pic.bmp b/PictureTemp/3051_Pic.bmp new file mode 100644 index 0000000..8e7a988 Binary files /dev/null and b/PictureTemp/3051_Pic.bmp differ diff --git a/PictureTemp/3052_Pic.bmp b/PictureTemp/3052_Pic.bmp new file mode 100644 index 0000000..0b7168d Binary files /dev/null and b/PictureTemp/3052_Pic.bmp differ diff --git a/PictureTemp/3053_Pic.bmp b/PictureTemp/3053_Pic.bmp new file mode 100644 index 0000000..70d6b9c Binary files /dev/null and b/PictureTemp/3053_Pic.bmp differ diff --git a/PictureTemp/3054_Pic.bmp b/PictureTemp/3054_Pic.bmp new file mode 100644 index 0000000..0a9521c Binary files /dev/null and b/PictureTemp/3054_Pic.bmp differ diff --git a/PictureTemp/3055_Pic.bmp b/PictureTemp/3055_Pic.bmp new file mode 100644 index 0000000..b79c824 Binary files /dev/null and b/PictureTemp/3055_Pic.bmp differ diff --git a/PictureTemp/3056_Pic.bmp b/PictureTemp/3056_Pic.bmp new file mode 100644 index 0000000..9231b46 Binary files /dev/null and b/PictureTemp/3056_Pic.bmp differ diff --git a/PictureTemp/3057_Pic.bmp b/PictureTemp/3057_Pic.bmp new file mode 100644 index 0000000..a45eb81 Binary files /dev/null and b/PictureTemp/3057_Pic.bmp differ diff --git a/PictureTemp/3058_Pic.bmp b/PictureTemp/3058_Pic.bmp new file mode 100644 index 0000000..01eeee8 Binary files /dev/null and b/PictureTemp/3058_Pic.bmp differ diff --git a/PictureTemp/3059_Pic.bmp b/PictureTemp/3059_Pic.bmp new file mode 100644 index 0000000..eb04a9b Binary files /dev/null and b/PictureTemp/3059_Pic.bmp differ diff --git a/PictureTemp/3060_Pic.bmp b/PictureTemp/3060_Pic.bmp new file mode 100644 index 0000000..f3aa31a Binary files /dev/null and b/PictureTemp/3060_Pic.bmp differ diff --git a/PictureTemp/3061_Pic.bmp b/PictureTemp/3061_Pic.bmp new file mode 100644 index 0000000..e9157cf Binary files /dev/null and b/PictureTemp/3061_Pic.bmp differ diff --git a/PictureTemp/3062_Pic.bmp b/PictureTemp/3062_Pic.bmp new file mode 100644 index 0000000..226d4f1 Binary files /dev/null and b/PictureTemp/3062_Pic.bmp differ diff --git a/PictureTemp/3063_Pic.bmp b/PictureTemp/3063_Pic.bmp new file mode 100644 index 0000000..f0bbb43 Binary files /dev/null and b/PictureTemp/3063_Pic.bmp differ diff --git a/PictureTemp/3064_Pic.bmp b/PictureTemp/3064_Pic.bmp new file mode 100644 index 0000000..51e3a38 Binary files /dev/null and b/PictureTemp/3064_Pic.bmp differ diff --git a/PictureTemp/3065_Pic.bmp b/PictureTemp/3065_Pic.bmp new file mode 100644 index 0000000..778d2cd Binary files /dev/null and b/PictureTemp/3065_Pic.bmp differ diff --git a/PictureTemp/3066_Pic.bmp b/PictureTemp/3066_Pic.bmp new file mode 100644 index 0000000..c413cae Binary files /dev/null and b/PictureTemp/3066_Pic.bmp differ diff --git a/PictureTemp/3067_Pic.bmp b/PictureTemp/3067_Pic.bmp new file mode 100644 index 0000000..72277f3 Binary files /dev/null and b/PictureTemp/3067_Pic.bmp differ diff --git a/PictureTemp/3068_Pic.bmp b/PictureTemp/3068_Pic.bmp new file mode 100644 index 0000000..156e1bb Binary files /dev/null and b/PictureTemp/3068_Pic.bmp differ diff --git a/PictureTemp/3069_Pic.bmp b/PictureTemp/3069_Pic.bmp new file mode 100644 index 0000000..661d1a9 Binary files /dev/null and b/PictureTemp/3069_Pic.bmp differ diff --git a/PictureTemp/3070_Pic.bmp b/PictureTemp/3070_Pic.bmp new file mode 100644 index 0000000..506c3f1 Binary files /dev/null and b/PictureTemp/3070_Pic.bmp differ diff --git a/PictureTemp/3071_Pic.bmp b/PictureTemp/3071_Pic.bmp new file mode 100644 index 0000000..8e7a988 Binary files /dev/null and b/PictureTemp/3071_Pic.bmp differ diff --git a/PictureTemp/3072_Pic.bmp b/PictureTemp/3072_Pic.bmp new file mode 100644 index 0000000..0b7168d Binary files /dev/null and b/PictureTemp/3072_Pic.bmp differ diff --git a/PictureTemp/3073_Pic.bmp b/PictureTemp/3073_Pic.bmp new file mode 100644 index 0000000..70d6b9c Binary files /dev/null and b/PictureTemp/3073_Pic.bmp differ diff --git a/PictureTemp/3074_Pic.bmp b/PictureTemp/3074_Pic.bmp new file mode 100644 index 0000000..0a9521c Binary files /dev/null and b/PictureTemp/3074_Pic.bmp differ diff --git a/PictureTemp/3075_Pic.bmp b/PictureTemp/3075_Pic.bmp new file mode 100644 index 0000000..b79c824 Binary files /dev/null and b/PictureTemp/3075_Pic.bmp differ diff --git a/PictureTemp/3076_Pic.bmp b/PictureTemp/3076_Pic.bmp new file mode 100644 index 0000000..9231b46 Binary files /dev/null and b/PictureTemp/3076_Pic.bmp differ diff --git a/PictureTemp/3077_Pic.bmp b/PictureTemp/3077_Pic.bmp new file mode 100644 index 0000000..a45eb81 Binary files /dev/null and b/PictureTemp/3077_Pic.bmp differ diff --git a/PictureTemp/3078_Pic.bmp b/PictureTemp/3078_Pic.bmp new file mode 100644 index 0000000..01eeee8 Binary files /dev/null and b/PictureTemp/3078_Pic.bmp differ diff --git a/PictureTemp/3079_Pic.bmp b/PictureTemp/3079_Pic.bmp new file mode 100644 index 0000000..eb04a9b Binary files /dev/null and b/PictureTemp/3079_Pic.bmp differ diff --git a/PictureTemp/3080_Pic.bmp b/PictureTemp/3080_Pic.bmp new file mode 100644 index 0000000..9231b46 Binary files /dev/null and b/PictureTemp/3080_Pic.bmp differ diff --git a/PictureTemp/3081_Pic.bmp b/PictureTemp/3081_Pic.bmp new file mode 100644 index 0000000..a45eb81 Binary files /dev/null and b/PictureTemp/3081_Pic.bmp differ diff --git a/PictureTemp/3082_Pic.bmp b/PictureTemp/3082_Pic.bmp new file mode 100644 index 0000000..506c3f1 Binary files /dev/null and b/PictureTemp/3082_Pic.bmp differ diff --git a/PictureTemp/3083_Pic.bmp b/PictureTemp/3083_Pic.bmp new file mode 100644 index 0000000..8e7a988 Binary files /dev/null and b/PictureTemp/3083_Pic.bmp differ diff --git a/PictureTemp/3084_Pic.bmp b/PictureTemp/3084_Pic.bmp new file mode 100644 index 0000000..f3aa31a Binary files /dev/null and b/PictureTemp/3084_Pic.bmp differ diff --git a/PictureTemp/3085_Pic.bmp b/PictureTemp/3085_Pic.bmp new file mode 100644 index 0000000..e9157cf Binary files /dev/null and b/PictureTemp/3085_Pic.bmp differ diff --git a/PictureTemp/3086_Pic.bmp b/PictureTemp/3086_Pic.bmp new file mode 100644 index 0000000..226d4f1 Binary files /dev/null and b/PictureTemp/3086_Pic.bmp differ diff --git a/PictureTemp/3087_Pic.bmp b/PictureTemp/3087_Pic.bmp new file mode 100644 index 0000000..f0bbb43 Binary files /dev/null and b/PictureTemp/3087_Pic.bmp differ diff --git a/PictureTemp/3088_Pic.bmp b/PictureTemp/3088_Pic.bmp new file mode 100644 index 0000000..51e3a38 Binary files /dev/null and b/PictureTemp/3088_Pic.bmp differ diff --git a/PictureTemp/3089_Pic.bmp b/PictureTemp/3089_Pic.bmp new file mode 100644 index 0000000..778d2cd Binary files /dev/null and b/PictureTemp/3089_Pic.bmp differ diff --git a/PictureTemp/3090_Pic.bmp b/PictureTemp/3090_Pic.bmp new file mode 100644 index 0000000..c413cae Binary files /dev/null and b/PictureTemp/3090_Pic.bmp differ diff --git a/PictureTemp/3091_Pic.bmp b/PictureTemp/3091_Pic.bmp new file mode 100644 index 0000000..72277f3 Binary files /dev/null and b/PictureTemp/3091_Pic.bmp differ diff --git a/PictureTemp/3092_Pic.bmp b/PictureTemp/3092_Pic.bmp new file mode 100644 index 0000000..156e1bb Binary files /dev/null and b/PictureTemp/3092_Pic.bmp differ diff --git a/PictureTemp/3093_Pic.bmp b/PictureTemp/3093_Pic.bmp new file mode 100644 index 0000000..661d1a9 Binary files /dev/null and b/PictureTemp/3093_Pic.bmp differ diff --git a/PictureTemp/3094_Pic.bmp b/PictureTemp/3094_Pic.bmp new file mode 100644 index 0000000..0b7168d Binary files /dev/null and b/PictureTemp/3094_Pic.bmp differ diff --git a/PictureTemp/3095_Pic.bmp b/PictureTemp/3095_Pic.bmp new file mode 100644 index 0000000..70d6b9c Binary files /dev/null and b/PictureTemp/3095_Pic.bmp differ diff --git a/PictureTemp/3096_Pic.bmp b/PictureTemp/3096_Pic.bmp new file mode 100644 index 0000000..0a9521c Binary files /dev/null and b/PictureTemp/3096_Pic.bmp differ diff --git a/PictureTemp/3097_Pic.bmp b/PictureTemp/3097_Pic.bmp new file mode 100644 index 0000000..b79c824 Binary files /dev/null and b/PictureTemp/3097_Pic.bmp differ diff --git a/PictureTemp/3098_Pic.bmp b/PictureTemp/3098_Pic.bmp new file mode 100644 index 0000000..01eeee8 Binary files /dev/null and b/PictureTemp/3098_Pic.bmp differ diff --git a/PictureTemp/3099_Pic.bmp b/PictureTemp/3099_Pic.bmp new file mode 100644 index 0000000..eb04a9b Binary files /dev/null and b/PictureTemp/3099_Pic.bmp differ diff --git a/PictureTemp/3_Pic.bmp b/PictureTemp/3_Pic.bmp new file mode 100644 index 0000000..c5f7d5b Binary files /dev/null and b/PictureTemp/3_Pic.bmp differ diff --git a/PictureTemp/4_Pic.bmp b/PictureTemp/4_Pic.bmp new file mode 100644 index 0000000..c5f7d5b Binary files /dev/null and b/PictureTemp/4_Pic.bmp differ diff --git a/PictureTemp/800_Pic.bmp b/PictureTemp/800_Pic.bmp new file mode 100644 index 0000000..81593b6 Binary files /dev/null and b/PictureTemp/800_Pic.bmp differ diff --git a/PictureTemp/801_Pic.bmp b/PictureTemp/801_Pic.bmp new file mode 100644 index 0000000..9125940 Binary files /dev/null and b/PictureTemp/801_Pic.bmp differ diff --git a/PictureTemp/802_Pic.bmp b/PictureTemp/802_Pic.bmp new file mode 100644 index 0000000..dd3b965 Binary files /dev/null and b/PictureTemp/802_Pic.bmp differ diff --git a/PictureTemp/803_Pic.bmp b/PictureTemp/803_Pic.bmp new file mode 100644 index 0000000..94a4f06 Binary files /dev/null and b/PictureTemp/803_Pic.bmp differ diff --git a/PictureTemp/804_Pic.bmp b/PictureTemp/804_Pic.bmp new file mode 100644 index 0000000..4a4d175 Binary files /dev/null and b/PictureTemp/804_Pic.bmp differ diff --git a/PictureTemp/805_Pic.bmp b/PictureTemp/805_Pic.bmp new file mode 100644 index 0000000..6af1ec1 Binary files /dev/null and b/PictureTemp/805_Pic.bmp differ diff --git a/PictureTemp/Pic0_Menu.jpg b/PictureTemp/Pic0_Menu.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic0_Menu.jpg differ diff --git a/PictureTemp/Pic0_temp.jpg b/PictureTemp/Pic0_temp.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic0_temp.jpg differ diff --git a/PictureTemp/Pic1_Menu.jpg b/PictureTemp/Pic1_Menu.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic1_Menu.jpg differ diff --git a/PictureTemp/Pic1_temp.jpg b/PictureTemp/Pic1_temp.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic1_temp.jpg differ diff --git a/PictureTemp/Pic2_Menu.jpg b/PictureTemp/Pic2_Menu.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic2_Menu.jpg differ diff --git a/PictureTemp/Pic2_temp.jpg b/PictureTemp/Pic2_temp.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic2_temp.jpg differ diff --git a/PictureTemp/Pic3_Menu.jpg b/PictureTemp/Pic3_Menu.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic3_Menu.jpg differ diff --git a/PictureTemp/Pic3_temp.jpg b/PictureTemp/Pic3_temp.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic3_temp.jpg differ diff --git a/PictureTemp/Pic4_Menu.jpg b/PictureTemp/Pic4_Menu.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic4_Menu.jpg differ diff --git a/PictureTemp/Pic4_temp.jpg b/PictureTemp/Pic4_temp.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/PictureTemp/Pic4_temp.jpg differ diff --git a/cficon/.cficon b/cficon/.cficon new file mode 100644 index 0000000..2e385f7 --- /dev/null +++ b/cficon/.cficon @@ -0,0 +1,2 @@ + + diff --git a/cficon/icon/icon.cficon b/cficon/icon/icon.cficon new file mode 100644 index 0000000..6857e00 --- /dev/null +++ b/cficon/icon/icon.cficon @@ -0,0 +1,7 @@ + + + + + + + diff --git a/cficon/icon/停止.png b/cficon/icon/停止.png new file mode 100644 index 0000000..77d555c Binary files /dev/null and b/cficon/icon/停止.png differ diff --git a/cficon/icon/工作中.png b/cficon/icon/工作中.png new file mode 100644 index 0000000..c2c7c67 Binary files /dev/null and b/cficon/icon/工作中.png differ diff --git a/cficon/icon/暂停.png b/cficon/icon/暂停.png new file mode 100644 index 0000000..c45862f Binary files /dev/null and b/cficon/icon/暂停.png differ diff --git a/cficon/icon/隐藏.png b/cficon/icon/隐藏.png new file mode 100644 index 0000000..761a84c Binary files /dev/null and b/cficon/icon/隐藏.png differ diff --git a/left.png b/left.png new file mode 100644 index 0000000..bb30a78 Binary files /dev/null and b/left.png differ diff --git a/lock.png b/lock.png new file mode 100644 index 0000000..5e00a47 Binary files /dev/null and b/lock.png differ diff --git a/on.png b/on.png new file mode 100644 index 0000000..9758f58 Binary files /dev/null and b/on.png differ diff --git a/output/FontAndLib/17_0x11.bin b/output/FontAndLib/17_0x11.bin new file mode 100644 index 0000000..7640cf5 Binary files /dev/null and b/output/FontAndLib/17_0x11.bin differ diff --git a/output/FontAndLib/21_0x15.bin b/output/FontAndLib/21_0x15.bin new file mode 100644 index 0000000..662de90 Binary files /dev/null and b/output/FontAndLib/21_0x15.bin differ diff --git a/output/FontAndLib/24_0x18.bin b/output/FontAndLib/24_0x18.bin new file mode 100644 index 0000000..648455e Binary files /dev/null and b/output/FontAndLib/24_0x18.bin differ diff --git a/output/FontAndLib/31_0x1F.lua b/output/FontAndLib/31_0x1F.lua new file mode 100644 index 0000000..9b687f9 --- /dev/null +++ b/output/FontAndLib/31_0x1F.lua @@ -0,0 +1,618 @@ +uart_free_protocol = 1 -- 设置全局变量uart_free_protocol,使用自由串口协议 + +-- 开锁指令数组(按地址1-5和锁编号1-12顺序) +openlock = { + -- 0x01地址 + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x01,0x05}, -- 01锁 + [1] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x02,0x06}, -- 02锁 + [2] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x03,0x07}, -- 03锁 + [3] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x04,0x00}, -- 04锁 + [4] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x05,0x01}, -- 05锁 + [5] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x06,0x02}, -- 06锁 + [6] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x07,0x03}, -- 07锁 + [7] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x08,0x0C}, -- 08锁 + [8] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x09,0x0D}, -- 09锁 + [9] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0A,0x0E}, -- 10锁 + [10] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0B,0x0F}, -- 11锁 + [11] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0C,0x08}, -- 12锁 + + -- 0x02地址 + [12] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x01,0x06}, -- 13锁 + [13] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x02,0x05}, -- 14锁 + [14] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x03,0x04}, -- 15锁 + [15] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x04,0x03}, -- 16锁 + [16] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x05,0x02}, -- 17锁 + [17] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x06,0x01}, -- 18锁 + [18] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x07,0x00}, -- 19锁 + [19] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x08,0x0F}, -- 20锁 + [20] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x09,0x0E}, -- 21锁 + [21] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0A,0x0D}, -- 22锁 + [22] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0B,0x0C}, -- 23锁 + [23] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0C,0x0B}, -- 24锁 + + -- 0x03地址 + [24] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x01,0x07}, -- 25锁 + [25] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x02,0x04}, -- 26锁 + [26] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x03,0x05}, -- 27锁 + [27] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x04,0x02}, -- 28锁 + [28] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x05,0x03}, -- 29锁 + [29] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x06,0x00}, -- 30锁 + [30] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x07,0x01}, -- 31锁 + [31] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x08,0x0E}, -- 32锁 + [32] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x09,0x0F}, -- 33锁 + [33] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0A,0x0C}, -- 34锁 + [34] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0B,0x0D}, -- 35锁 + [35] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0C,0x0A}, -- 36锁 + + -- 0x04地址 + [36] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x01,0x00}, -- 37锁 + [37] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x02,0x03}, -- 38锁 + [38] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x03,0x02}, -- 39锁 + [39] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x04,0x05}, -- 40锁 + [40] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x05,0x04}, -- 41锁 + [41] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x06,0x07}, -- 42锁 + [42] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x07,0x06}, -- 43锁 + [43] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x08,0x09}, -- 44锁 + [44] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x09,0x08}, -- 45锁 + [45] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0A,0x0B}, -- 46锁 + [46] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0B,0x0A}, -- 47锁 + [47] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0C,0x0D}, -- 48锁 + + -- 0x05地址 + [48] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x01,0x01}, -- 49锁 + [49] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x02,0x02}, -- 50锁 + [50] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x03,0x03}, -- 51锁 + [51] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x04,0x04}, -- 52锁 + [52] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x05,0x05}, -- 53锁 + [53] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x06,0x06}, -- 54锁 + [54] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x07,0x07}, -- 55锁 + [55] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x08,0x08}, -- 56锁 + [56] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x09,0x09}, -- 57锁 + [57] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0A,0x0A}, -- 58锁 + [58] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0B,0x0B}, -- 59锁 + [59] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0C,0x0C} -- 60锁 +} + +-- 一键全开指令数组(按地址1-5顺序) +openAlllock = { + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x05,0x00,0x00,0x04}, -- 0x01地址 + [1] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x05,0x00,0x00,0x07}, -- 0x02地址 + [2] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x05,0x00,0x00,0x06}, -- 0x03地址 + [3] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x05,0x00,0x00,0x01}, -- 0x04地址 + [4] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x05,0x00,0x00,0x00} -- 0x05地址 +} + +-- 读取所有通道状态指令数组(按地址1-5顺序) +readLockState = { + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x0A,0x00,0x00,0x0B}, -- 0x01地址 + [1] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x0A,0x00,0x00,0x08}, -- 0x02地址 + [2] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x0A,0x00,0x00,0x09}, -- 0x03地址 + [3] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x0A,0x00,0x00,0x0E}, -- 0x04地址 + [4] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x0A,0x00,0x00,0x0F} -- 0x05地址 +} + +sendID = 0 -- 全局发送ID +sendFlag = 0 -- 全局发送状态,设置优先级 0-查询状态 1-发送开锁 + +-- 系统加载LUA脚本文件之后,立即调用此回调函数,通常用于执行初始化操作,仅执行一次。 +-- on_timer(timer_id)函数是LUA定时器中断函数,timer_id值范围为0-31。 +function on_init() + start_timer(1, 200, 0, 0) +end + +-- 接收查询所有通道状态指令,改变状态 +function on_uart_recv_data(packet, bytelen) + + -- 第3个字节packet[2]为锁控板地址,第9个字节packet[8 + i]为所有锁状态(一个锁控板有12把锁) + if packet[0] == 0xA5 and packet[1] == 0xA5 and packet[2] ~= 0x00 and packet[3] == 0x00 and packet[5] == 0x0A and packet[6] == 0x00 and packet[7] == 0x0C then + + -- 采用遍历赋值,待验证 + -- local screenId = 0 + -- if packet[2] == 1 then + -- screenId = 0 + -- elseif packet[2] == 2 then + -- screenId = 1 + -- elseif packet[2] == 3 then + -- screenId = 2 + -- elseif packet[2] == 4 then + -- screenId = 3 + -- elseif packet[2] == 5 then + -- screenId = 4 + -- end + + -- for i = 0, 11 do + -- if packet[8 + i] == 0 then + -- set_value(screenId, i + 1, 1) + -- else + -- set_value(screenId, i + 1, 0) + -- end + -- end + + if packet[2] == 1 then -- 0x01地址 + if packet[8] == 0 then + set_value(0, 1, 1) + else + set_value(0, 1, 0) + end + if packet[9] == 0 then + set_value(0, 2, 1) + else + set_value(0, 2, 0) + end + if packet[10] == 0 then + set_value(0, 3, 1) + else + set_value(0, 3, 0) + end + if packet[11] == 0 then + set_value(0, 4, 1) + else + set_value(0, 4, 0) + end + if packet[12] == 0 then + set_value(0, 5, 1) + else + set_value(0, 5, 0) + end + if packet[13] == 0 then + set_value(0, 6, 1) + else + set_value(0, 6, 0) + end + if packet[14] == 0 then + set_value(0, 7, 1) + else + set_value(0, 7, 0) + end + if packet[15] == 0 then + set_value(0, 8, 1) + else + set_value(0, 8, 0) + end + if packet[16] == 0 then + set_value(0, 9, 1) + else + set_value(0, 9, 0) + end + if packet[17] == 0 then + set_value(0, 10, 1) + else + set_value(0, 10, 0) + end + end + + if packet[2] == 2 then -- 0x02地址 + if packet[8] == 0 then + set_value(1, 1, 1) + else + set_value(1, 1, 0) + end + if packet[9] == 0 then + set_value(1, 2, 1) + else + set_value(1, 2, 0) + end + if packet[10] == 0 then + set_value(1, 3, 1) + else + set_value(1, 3, 0) + end + if packet[11] == 0 then + set_value(1, 4, 1) + else + set_value(1, 4, 0) + end + if packet[12] == 0 then + set_value(1, 5, 1) + else + set_value(1, 5, 0) + end + if packet[13] == 0 then + set_value(1, 6, 1) + else + set_value(1, 6, 0) + end + if packet[14] == 0 then + set_value(1, 7, 1) + else + set_value(1, 7, 0) + end + if packet[15] == 0 then + set_value(1, 8, 1) + else + set_value(1, 8, 0) + end + if packet[16] == 0 then + set_value(1, 9, 1) + else + set_value(1, 9, 0) + end + if packet[17] == 0 then + set_value(1, 10, 1) + else + set_value(1, 10, 0) + end + end + + if packet[2] == 3 then -- 0x03地址 + if packet[8] == 0 then + set_value(2, 1, 1) + else + set_value(2, 1, 0) + end + if packet[9] == 0 then + set_value(2, 2, 1) + else + set_value(2, 2, 0) + end + if packet[10] == 0 then + set_value(2, 3, 1) + else + set_value(2, 3, 0) + end + if packet[11] == 0 then + set_value(2, 4, 1) + else + set_value(2, 4, 0) + end + if packet[12] == 0 then + set_value(2, 5, 1) + else + set_value(2, 5, 0) + end + if packet[13] == 0 then + set_value(2, 6, 1) + else + set_value(2, 6, 0) + end + if packet[14] == 0 then + set_value(2, 7, 1) + else + set_value(2, 7, 0) + end + if packet[15] == 0 then + set_value(2, 8, 1) + else + set_value(2, 8, 0) + end + if packet[16] == 0 then + set_value(2, 9, 1) + else + set_value(2, 9, 0) + end + if packet[17] == 0 then + set_value(2, 10, 1) + else + set_value(2, 10, 0) + end + end + + if packet[2] == 4 then -- 0x04地址 + if packet[8] == 0 then + set_value(3, 1, 1) + else + set_value(3, 1, 0) + end + if packet[9] == 0 then + set_value(3, 2, 1) + else + set_value(3, 2, 0) + end + if packet[10] == 0 then + set_value(3, 3, 1) + else + set_value(3, 3, 0) + end + if packet[11] == 0 then + set_value(3, 4, 1) + else + set_value(3, 4, 0) + end + if packet[12] == 0 then + set_value(3, 5, 1) + else + set_value(3, 5, 0) + end + if packet[13] == 0 then + set_value(3, 6, 1) + else + set_value(3, 6, 0) + end + if packet[14] == 0 then + set_value(3, 7, 1) + else + set_value(3, 7, 0) + end + if packet[15] == 0 then + set_value(3, 8, 1) + else + set_value(3, 8, 0) + end + if packet[16] == 0 then + set_value(3, 9, 1) + else + set_value(3, 9, 0) + end + if packet[17] == 0 then + set_value(3, 10, 1) + else + set_value(3, 10, 0) + end + end + + if packet[2] == 5 then -- 0x05地址 + if packet[8] == 0 then + set_value(4, 1, 1) + else + set_value(4, 1, 0) + end + if packet[9] == 0 then + set_value(4, 2, 1) + else + set_value(4, 2, 0) + end + if packet[10] == 0 then + set_value(4, 3, 1) + else + set_value(4, 3, 0) + end + if packet[11] == 0 then + set_value(4, 4, 1) + else + set_value(4, 4, 0) + end + if packet[12] == 0 then + set_value(4, 5, 1) + else + set_value(4, 5, 0) + end + if packet[13] == 0 then + set_value(4, 6, 1) + else + set_value(4, 6, 0) + end + if packet[14] == 0 then + set_value(4, 7, 1) + else + set_value(4, 7, 0) + end + if packet[15] == 0 then + set_value(4, 8, 1) + else + set_value(4, 8, 0) + end + if packet[16] == 0 then + set_value(4, 9, 1) + else + set_value(4, 9, 0) + end + if packet[17] == 0 then + set_value(4, 10, 1) + else + set_value(4, 10, 0) + end + end + + end + +end + +-- 用户触摸修改控件后,执行此回调函数.点击按钮控件,修改文本控件、修改滑动条、滑动选择都会触发此事件。 +-- screen 画面ID +-- control 控件ID +-- value 控件值 +function on_control_notify(screen, control, value) + -- 按钮点击事件开锁,后期考虑采用一定的规律定制计算公式,如sendID = (screen * 12) + (control - 11) + if screen == 0 and control == 11 and value == 1 then -- 画面0, 0x01地址 + sendID = 0 + sendFlag = 1 + elseif screen == 0 and control == 12 and value == 1 then + sendID = 1 + sendFlag = 1 + elseif screen == 0 and control == 13 and value == 1 then + sendID = 2 + sendFlag = 1 + elseif screen == 0 and control == 14 and value == 1 then + sendID = 3 + sendFlag = 1 + elseif screen == 0 and control == 15 and value == 1 then + sendID = 4 + sendFlag = 1 + elseif screen == 0 and control == 16 and value == 1 then + sendID = 5 + sendFlag = 1 + elseif screen == 0 and control == 17 and value == 1 then + sendID = 6 + sendFlag = 1 + elseif screen == 0 and control == 18 and value == 1 then + sendID = 7 + sendFlag = 1 + elseif screen == 0 and control == 19 and value == 1 then + sendID = 8 + sendFlag = 1 + elseif screen == 0 and control == 20 and value == 1 then + sendID = 9 + sendFlag = 1 + elseif screen == 1 and control == 11 and value == 1 then -- 画面1,0x02地址 + sendID = 12 + sendFlag = 1 + elseif screen == 1 and control == 12 and value == 1 then + sendID = 13 + sendFlag = 1 + elseif screen == 1 and control == 13 and value == 1 then + sendID = 14 + sendFlag = 1 + elseif screen == 1 and control == 14 and value == 1 then + sendID = 15 + sendFlag = 1 + elseif screen == 1 and control == 15 and value == 1 then + sendID = 16 + sendFlag = 1 + elseif screen == 1 and control == 16 and value == 1 then + sendID = 17 + sendFlag = 1 + elseif screen == 1 and control == 17 and value == 1 then + sendID = 18 + sendFlag = 1 + elseif screen == 1 and control == 18 and value == 1 then + sendID = 19 + sendFlag = 1 + elseif screen == 1 and control == 19 and value == 1 then + sendID = 20 + sendFlag = 1 + elseif screen == 1 and control == 20 and value == 1 then + sendID = 21 + sendFlag = 1 + elseif screen == 2 and control == 11 and value == 1 then -- 画面2,0x03地址 + sendID = 24 + sendFlag = 1 + elseif screen == 2 and control == 12 and value == 1 then + sendID = 25 + sendFlag = 1 + elseif screen == 2 and control == 13 and value == 1 then + sendID = 26 + sendFlag = 1 + elseif screen == 2 and control == 14 and value == 1 then + sendID = 27 + sendFlag = 1 + elseif screen == 2 and control == 15 and value == 1 then + sendID = 28 + sendFlag = 1 + elseif screen == 2 and control == 16 and value == 1 then + sendID = 29 + sendFlag = 1 + elseif screen == 2 and control == 17 and value == 1 then + sendID = 30 + sendFlag = 1 + elseif screen == 2 and control == 18 and value == 1 then + sendID = 31 + sendFlag = 1 + elseif screen == 2 and control == 19 and value == 1 then + sendID = 32 + sendFlag = 1 + elseif screen == 2 and control == 20 and value == 1 then + sendID = 33 + sendFlag = 1 + elseif screen == 3 and control == 11 and value == 1 then -- 画面3,0x04地址 + sendID = 36 + sendFlag = 1 + elseif screen == 3 and control == 12 and value == 1 then + sendID = 37 + sendFlag = 1 + elseif screen == 3 and control == 13 and value == 1 then + sendID = 38 + sendFlag = 1 + elseif screen == 3 and control == 14 and value == 1 then + sendID = 39 + sendFlag = 1 + elseif screen == 3 and control == 15 and value == 1 then + sendID = 40 + sendFlag = 1 + elseif screen == 3 and control == 16 and value == 1 then + sendID = 41 + sendFlag = 1 + elseif screen == 3 and control == 17 and value == 1 then + sendID = 42 + sendFlag = 1 + elseif screen == 3 and control == 18 and value == 1 then + sendID = 43 + sendFlag = 1 + elseif screen == 3 and control == 19 and value == 1 then + sendID = 44 + sendFlag = 1 + elseif screen == 3 and control == 20 and value == 1 then + sendID = 45 + sendFlag = 1 + elseif screen == 4 and control == 11 and value == 1 then -- 画面4,0x05地址 + sendID = 48 + sendFlag = 1 + elseif screen == 4 and control == 12 and value == 1 then + sendID = 49 + sendFlag = 1 + elseif screen == 4 and control == 13 and value == 1 then + sendID = 50 + sendFlag = 1 + elseif screen == 4 and control == 14 and value == 1 then + sendID = 51 + sendFlag = 1 + elseif screen == 4 and control == 15 and value == 1 then + sendID = 52 + sendFlag = 1 + elseif screen == 4 and control == 16 and value == 1 then + sendID = 53 + sendFlag = 1 + elseif screen == 4 and control == 17 and value == 1 then + sendID = 54 + sendFlag = 1 + elseif screen == 4 and control == 18 and value == 1 then + sendID = 55 + sendFlag = 1 + elseif screen == 4 and control == 19 and value == 1 then + sendID = 56 + sendFlag = 1 + elseif screen == 4 and control == 20 and value == 1 then + sendID = 57 + sendFlag = 1 + elseif screen == 0 and control == 100 and value == 1 then -- 一键全开,控件ID统一为100 + sendID = 100 + sendFlag = 1 + elseif screen == 1 and control == 100 and value == 1 then + sendID = 200 + sendFlag = 1 + elseif screen == 2 and control == 100 and value == 1 then + sendID = 300 + sendFlag = 1 + elseif screen == 3 and control == 100 and value == 1 then + sendID = 400 + sendFlag = 1 + elseif screen == 4 and control == 100 and value == 1 then + sendID = 500 + sendFlag = 1 + end +end + +-- 系统每隔1秒钟会自动调用此回调函数。 +function on_systick() + +end + +-- 当画面切换时,执行此回调函数,screen为切换后的画面ID。 +function on_screen_change(screen) + +end + +-- LUA定时器中断函数,timer_id值范围为0-31。 +-- 单独使用该函数不生效,该函数触发回调需要配合 start_timer(timer_id, timeout, countdown, repeatNum) ,来开启定时器,定时器溢出超时了,才会触发on_timer(timer_id)。 +function on_timer(timer_id) + + if sendFlag == 1 then + sendFlag = 0 -- 发送开锁的优先级更高 + if sendID == 100 then + uart_send_data(openAlllock[0]) -- 0x01地址全开 + elseif sendID == 200 then + uart_send_data(openAlllock[1]) -- 0x02地址全开 + elseif sendID == 300 then + uart_send_data(openAlllock[2]) -- 0x03地址全开 + elseif sendID == 400 then + uart_send_data(openAlllock[3]) -- 0x04地址全开 + elseif sendID == 500 then + uart_send_data(openAlllock[4]) -- 0x05地址全开 + else + uart_send_data(openlock[sendID]) -- 根据sendId获取对应的openlock数组开锁指令发送 + end + else -- 读取锁控板所有通道状态, 根据当前画面ID获取对应的查询所有锁状态的指令发送 + local currentScreenId = get_current_screen() + if currentScreenId == 0 then + uart_send_data(readLockState[0]) + elseif currentScreenId == 1 then + uart_send_data(readLockState[1]) + elseif currentScreenId == 2 then + uart_send_data(readLockState[2]) + elseif currentScreenId == 3 then + uart_send_data(readLockState[3]) + else + uart_send_data(readLockState[4]) + end + end + +end \ No newline at end of file diff --git a/output/JPG/0_Pic.jpg b/output/JPG/0_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/JPG/0_Pic.jpg differ diff --git a/output/JPG/1_Pic.jpg b/output/JPG/1_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/JPG/1_Pic.jpg differ diff --git a/output/JPG/2_Pic.jpg b/output/JPG/2_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/JPG/2_Pic.jpg differ diff --git a/output/JPG/3_Pic.jpg b/output/JPG/3_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/JPG/3_Pic.jpg differ diff --git a/output/JPG/4_Pic.jpg b/output/JPG/4_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/JPG/4_Pic.jpg differ diff --git a/output/JPG/800_Pic.jpg b/output/JPG/800_Pic.jpg new file mode 100644 index 0000000..5580e71 Binary files /dev/null and b/output/JPG/800_Pic.jpg differ diff --git a/output/JPG/801_Pic.jpg b/output/JPG/801_Pic.jpg new file mode 100644 index 0000000..c1c85cd Binary files /dev/null and b/output/JPG/801_Pic.jpg differ diff --git a/output/JPG/802_Pic.jpg b/output/JPG/802_Pic.jpg new file mode 100644 index 0000000..4ee582e Binary files /dev/null and b/output/JPG/802_Pic.jpg differ diff --git a/output/JPG/803_Pic.jpg b/output/JPG/803_Pic.jpg new file mode 100644 index 0000000..8dfc424 Binary files /dev/null and b/output/JPG/803_Pic.jpg differ diff --git a/output/JPG/804_Pic.jpg b/output/JPG/804_Pic.jpg new file mode 100644 index 0000000..832cec6 Binary files /dev/null and b/output/JPG/804_Pic.jpg differ diff --git a/output/JPG/805_Pic.jpg b/output/JPG/805_Pic.jpg new file mode 100644 index 0000000..46b53e7 Binary files /dev/null and b/output/JPG/805_Pic.jpg differ diff --git a/output/SD_card/0_Pic.jpg b/output/SD_card/0_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/SD_card/0_Pic.jpg differ diff --git a/output/SD_card/17_0x11.bin b/output/SD_card/17_0x11.bin new file mode 100644 index 0000000..7640cf5 Binary files /dev/null and b/output/SD_card/17_0x11.bin differ diff --git a/output/SD_card/1_Pic.jpg b/output/SD_card/1_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/SD_card/1_Pic.jpg differ diff --git a/output/SD_card/1_font.bin b/output/SD_card/1_font.bin new file mode 100644 index 0000000..05e2dc2 Binary files /dev/null and b/output/SD_card/1_font.bin differ diff --git a/output/SD_card/21_0x15.bin b/output/SD_card/21_0x15.bin new file mode 100644 index 0000000..662de90 Binary files /dev/null and b/output/SD_card/21_0x15.bin differ diff --git a/output/SD_card/24_0x18.bin b/output/SD_card/24_0x18.bin new file mode 100644 index 0000000..648455e Binary files /dev/null and b/output/SD_card/24_0x18.bin differ diff --git a/output/SD_card/2_Pic.jpg b/output/SD_card/2_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/SD_card/2_Pic.jpg differ diff --git a/output/SD_card/31_0x1F.lua b/output/SD_card/31_0x1F.lua new file mode 100644 index 0000000..9b687f9 --- /dev/null +++ b/output/SD_card/31_0x1F.lua @@ -0,0 +1,618 @@ +uart_free_protocol = 1 -- 设置全局变量uart_free_protocol,使用自由串口协议 + +-- 开锁指令数组(按地址1-5和锁编号1-12顺序) +openlock = { + -- 0x01地址 + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x01,0x05}, -- 01锁 + [1] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x02,0x06}, -- 02锁 + [2] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x03,0x07}, -- 03锁 + [3] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x04,0x00}, -- 04锁 + [4] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x05,0x01}, -- 05锁 + [5] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x06,0x02}, -- 06锁 + [6] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x07,0x03}, -- 07锁 + [7] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x08,0x0C}, -- 08锁 + [8] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x09,0x0D}, -- 09锁 + [9] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0A,0x0E}, -- 10锁 + [10] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0B,0x0F}, -- 11锁 + [11] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x04,0x00,0x01,0x0C,0x08}, -- 12锁 + + -- 0x02地址 + [12] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x01,0x06}, -- 13锁 + [13] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x02,0x05}, -- 14锁 + [14] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x03,0x04}, -- 15锁 + [15] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x04,0x03}, -- 16锁 + [16] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x05,0x02}, -- 17锁 + [17] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x06,0x01}, -- 18锁 + [18] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x07,0x00}, -- 19锁 + [19] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x08,0x0F}, -- 20锁 + [20] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x09,0x0E}, -- 21锁 + [21] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0A,0x0D}, -- 22锁 + [22] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0B,0x0C}, -- 23锁 + [23] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x04,0x00,0x01,0x0C,0x0B}, -- 24锁 + + -- 0x03地址 + [24] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x01,0x07}, -- 25锁 + [25] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x02,0x04}, -- 26锁 + [26] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x03,0x05}, -- 27锁 + [27] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x04,0x02}, -- 28锁 + [28] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x05,0x03}, -- 29锁 + [29] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x06,0x00}, -- 30锁 + [30] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x07,0x01}, -- 31锁 + [31] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x08,0x0E}, -- 32锁 + [32] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x09,0x0F}, -- 33锁 + [33] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0A,0x0C}, -- 34锁 + [34] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0B,0x0D}, -- 35锁 + [35] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x04,0x00,0x01,0x0C,0x0A}, -- 36锁 + + -- 0x04地址 + [36] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x01,0x00}, -- 37锁 + [37] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x02,0x03}, -- 38锁 + [38] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x03,0x02}, -- 39锁 + [39] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x04,0x05}, -- 40锁 + [40] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x05,0x04}, -- 41锁 + [41] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x06,0x07}, -- 42锁 + [42] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x07,0x06}, -- 43锁 + [43] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x08,0x09}, -- 44锁 + [44] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x09,0x08}, -- 45锁 + [45] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0A,0x0B}, -- 46锁 + [46] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0B,0x0A}, -- 47锁 + [47] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x04,0x00,0x01,0x0C,0x0D}, -- 48锁 + + -- 0x05地址 + [48] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x01,0x01}, -- 49锁 + [49] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x02,0x02}, -- 50锁 + [50] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x03,0x03}, -- 51锁 + [51] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x04,0x04}, -- 52锁 + [52] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x05,0x05}, -- 53锁 + [53] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x06,0x06}, -- 54锁 + [54] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x07,0x07}, -- 55锁 + [55] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x08,0x08}, -- 56锁 + [56] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x09,0x09}, -- 57锁 + [57] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0A,0x0A}, -- 58锁 + [58] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0B,0x0B}, -- 59锁 + [59] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x04,0x00,0x01,0x0C,0x0C} -- 60锁 +} + +-- 一键全开指令数组(按地址1-5顺序) +openAlllock = { + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x05,0x00,0x00,0x04}, -- 0x01地址 + [1] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x05,0x00,0x00,0x07}, -- 0x02地址 + [2] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x05,0x00,0x00,0x06}, -- 0x03地址 + [3] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x05,0x00,0x00,0x01}, -- 0x04地址 + [4] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x05,0x00,0x00,0x00} -- 0x05地址 +} + +-- 读取所有通道状态指令数组(按地址1-5顺序) +readLockState = { + [0] = {[0] = 0xA5,0xA5,0x00,0x01,0x00,0x0A,0x00,0x00,0x0B}, -- 0x01地址 + [1] = {[0] = 0xA5,0xA5,0x00,0x02,0x00,0x0A,0x00,0x00,0x08}, -- 0x02地址 + [2] = {[0] = 0xA5,0xA5,0x00,0x03,0x00,0x0A,0x00,0x00,0x09}, -- 0x03地址 + [3] = {[0] = 0xA5,0xA5,0x00,0x04,0x00,0x0A,0x00,0x00,0x0E}, -- 0x04地址 + [4] = {[0] = 0xA5,0xA5,0x00,0x05,0x00,0x0A,0x00,0x00,0x0F} -- 0x05地址 +} + +sendID = 0 -- 全局发送ID +sendFlag = 0 -- 全局发送状态,设置优先级 0-查询状态 1-发送开锁 + +-- 系统加载LUA脚本文件之后,立即调用此回调函数,通常用于执行初始化操作,仅执行一次。 +-- on_timer(timer_id)函数是LUA定时器中断函数,timer_id值范围为0-31。 +function on_init() + start_timer(1, 200, 0, 0) +end + +-- 接收查询所有通道状态指令,改变状态 +function on_uart_recv_data(packet, bytelen) + + -- 第3个字节packet[2]为锁控板地址,第9个字节packet[8 + i]为所有锁状态(一个锁控板有12把锁) + if packet[0] == 0xA5 and packet[1] == 0xA5 and packet[2] ~= 0x00 and packet[3] == 0x00 and packet[5] == 0x0A and packet[6] == 0x00 and packet[7] == 0x0C then + + -- 采用遍历赋值,待验证 + -- local screenId = 0 + -- if packet[2] == 1 then + -- screenId = 0 + -- elseif packet[2] == 2 then + -- screenId = 1 + -- elseif packet[2] == 3 then + -- screenId = 2 + -- elseif packet[2] == 4 then + -- screenId = 3 + -- elseif packet[2] == 5 then + -- screenId = 4 + -- end + + -- for i = 0, 11 do + -- if packet[8 + i] == 0 then + -- set_value(screenId, i + 1, 1) + -- else + -- set_value(screenId, i + 1, 0) + -- end + -- end + + if packet[2] == 1 then -- 0x01地址 + if packet[8] == 0 then + set_value(0, 1, 1) + else + set_value(0, 1, 0) + end + if packet[9] == 0 then + set_value(0, 2, 1) + else + set_value(0, 2, 0) + end + if packet[10] == 0 then + set_value(0, 3, 1) + else + set_value(0, 3, 0) + end + if packet[11] == 0 then + set_value(0, 4, 1) + else + set_value(0, 4, 0) + end + if packet[12] == 0 then + set_value(0, 5, 1) + else + set_value(0, 5, 0) + end + if packet[13] == 0 then + set_value(0, 6, 1) + else + set_value(0, 6, 0) + end + if packet[14] == 0 then + set_value(0, 7, 1) + else + set_value(0, 7, 0) + end + if packet[15] == 0 then + set_value(0, 8, 1) + else + set_value(0, 8, 0) + end + if packet[16] == 0 then + set_value(0, 9, 1) + else + set_value(0, 9, 0) + end + if packet[17] == 0 then + set_value(0, 10, 1) + else + set_value(0, 10, 0) + end + end + + if packet[2] == 2 then -- 0x02地址 + if packet[8] == 0 then + set_value(1, 1, 1) + else + set_value(1, 1, 0) + end + if packet[9] == 0 then + set_value(1, 2, 1) + else + set_value(1, 2, 0) + end + if packet[10] == 0 then + set_value(1, 3, 1) + else + set_value(1, 3, 0) + end + if packet[11] == 0 then + set_value(1, 4, 1) + else + set_value(1, 4, 0) + end + if packet[12] == 0 then + set_value(1, 5, 1) + else + set_value(1, 5, 0) + end + if packet[13] == 0 then + set_value(1, 6, 1) + else + set_value(1, 6, 0) + end + if packet[14] == 0 then + set_value(1, 7, 1) + else + set_value(1, 7, 0) + end + if packet[15] == 0 then + set_value(1, 8, 1) + else + set_value(1, 8, 0) + end + if packet[16] == 0 then + set_value(1, 9, 1) + else + set_value(1, 9, 0) + end + if packet[17] == 0 then + set_value(1, 10, 1) + else + set_value(1, 10, 0) + end + end + + if packet[2] == 3 then -- 0x03地址 + if packet[8] == 0 then + set_value(2, 1, 1) + else + set_value(2, 1, 0) + end + if packet[9] == 0 then + set_value(2, 2, 1) + else + set_value(2, 2, 0) + end + if packet[10] == 0 then + set_value(2, 3, 1) + else + set_value(2, 3, 0) + end + if packet[11] == 0 then + set_value(2, 4, 1) + else + set_value(2, 4, 0) + end + if packet[12] == 0 then + set_value(2, 5, 1) + else + set_value(2, 5, 0) + end + if packet[13] == 0 then + set_value(2, 6, 1) + else + set_value(2, 6, 0) + end + if packet[14] == 0 then + set_value(2, 7, 1) + else + set_value(2, 7, 0) + end + if packet[15] == 0 then + set_value(2, 8, 1) + else + set_value(2, 8, 0) + end + if packet[16] == 0 then + set_value(2, 9, 1) + else + set_value(2, 9, 0) + end + if packet[17] == 0 then + set_value(2, 10, 1) + else + set_value(2, 10, 0) + end + end + + if packet[2] == 4 then -- 0x04地址 + if packet[8] == 0 then + set_value(3, 1, 1) + else + set_value(3, 1, 0) + end + if packet[9] == 0 then + set_value(3, 2, 1) + else + set_value(3, 2, 0) + end + if packet[10] == 0 then + set_value(3, 3, 1) + else + set_value(3, 3, 0) + end + if packet[11] == 0 then + set_value(3, 4, 1) + else + set_value(3, 4, 0) + end + if packet[12] == 0 then + set_value(3, 5, 1) + else + set_value(3, 5, 0) + end + if packet[13] == 0 then + set_value(3, 6, 1) + else + set_value(3, 6, 0) + end + if packet[14] == 0 then + set_value(3, 7, 1) + else + set_value(3, 7, 0) + end + if packet[15] == 0 then + set_value(3, 8, 1) + else + set_value(3, 8, 0) + end + if packet[16] == 0 then + set_value(3, 9, 1) + else + set_value(3, 9, 0) + end + if packet[17] == 0 then + set_value(3, 10, 1) + else + set_value(3, 10, 0) + end + end + + if packet[2] == 5 then -- 0x05地址 + if packet[8] == 0 then + set_value(4, 1, 1) + else + set_value(4, 1, 0) + end + if packet[9] == 0 then + set_value(4, 2, 1) + else + set_value(4, 2, 0) + end + if packet[10] == 0 then + set_value(4, 3, 1) + else + set_value(4, 3, 0) + end + if packet[11] == 0 then + set_value(4, 4, 1) + else + set_value(4, 4, 0) + end + if packet[12] == 0 then + set_value(4, 5, 1) + else + set_value(4, 5, 0) + end + if packet[13] == 0 then + set_value(4, 6, 1) + else + set_value(4, 6, 0) + end + if packet[14] == 0 then + set_value(4, 7, 1) + else + set_value(4, 7, 0) + end + if packet[15] == 0 then + set_value(4, 8, 1) + else + set_value(4, 8, 0) + end + if packet[16] == 0 then + set_value(4, 9, 1) + else + set_value(4, 9, 0) + end + if packet[17] == 0 then + set_value(4, 10, 1) + else + set_value(4, 10, 0) + end + end + + end + +end + +-- 用户触摸修改控件后,执行此回调函数.点击按钮控件,修改文本控件、修改滑动条、滑动选择都会触发此事件。 +-- screen 画面ID +-- control 控件ID +-- value 控件值 +function on_control_notify(screen, control, value) + -- 按钮点击事件开锁,后期考虑采用一定的规律定制计算公式,如sendID = (screen * 12) + (control - 11) + if screen == 0 and control == 11 and value == 1 then -- 画面0, 0x01地址 + sendID = 0 + sendFlag = 1 + elseif screen == 0 and control == 12 and value == 1 then + sendID = 1 + sendFlag = 1 + elseif screen == 0 and control == 13 and value == 1 then + sendID = 2 + sendFlag = 1 + elseif screen == 0 and control == 14 and value == 1 then + sendID = 3 + sendFlag = 1 + elseif screen == 0 and control == 15 and value == 1 then + sendID = 4 + sendFlag = 1 + elseif screen == 0 and control == 16 and value == 1 then + sendID = 5 + sendFlag = 1 + elseif screen == 0 and control == 17 and value == 1 then + sendID = 6 + sendFlag = 1 + elseif screen == 0 and control == 18 and value == 1 then + sendID = 7 + sendFlag = 1 + elseif screen == 0 and control == 19 and value == 1 then + sendID = 8 + sendFlag = 1 + elseif screen == 0 and control == 20 and value == 1 then + sendID = 9 + sendFlag = 1 + elseif screen == 1 and control == 11 and value == 1 then -- 画面1,0x02地址 + sendID = 12 + sendFlag = 1 + elseif screen == 1 and control == 12 and value == 1 then + sendID = 13 + sendFlag = 1 + elseif screen == 1 and control == 13 and value == 1 then + sendID = 14 + sendFlag = 1 + elseif screen == 1 and control == 14 and value == 1 then + sendID = 15 + sendFlag = 1 + elseif screen == 1 and control == 15 and value == 1 then + sendID = 16 + sendFlag = 1 + elseif screen == 1 and control == 16 and value == 1 then + sendID = 17 + sendFlag = 1 + elseif screen == 1 and control == 17 and value == 1 then + sendID = 18 + sendFlag = 1 + elseif screen == 1 and control == 18 and value == 1 then + sendID = 19 + sendFlag = 1 + elseif screen == 1 and control == 19 and value == 1 then + sendID = 20 + sendFlag = 1 + elseif screen == 1 and control == 20 and value == 1 then + sendID = 21 + sendFlag = 1 + elseif screen == 2 and control == 11 and value == 1 then -- 画面2,0x03地址 + sendID = 24 + sendFlag = 1 + elseif screen == 2 and control == 12 and value == 1 then + sendID = 25 + sendFlag = 1 + elseif screen == 2 and control == 13 and value == 1 then + sendID = 26 + sendFlag = 1 + elseif screen == 2 and control == 14 and value == 1 then + sendID = 27 + sendFlag = 1 + elseif screen == 2 and control == 15 and value == 1 then + sendID = 28 + sendFlag = 1 + elseif screen == 2 and control == 16 and value == 1 then + sendID = 29 + sendFlag = 1 + elseif screen == 2 and control == 17 and value == 1 then + sendID = 30 + sendFlag = 1 + elseif screen == 2 and control == 18 and value == 1 then + sendID = 31 + sendFlag = 1 + elseif screen == 2 and control == 19 and value == 1 then + sendID = 32 + sendFlag = 1 + elseif screen == 2 and control == 20 and value == 1 then + sendID = 33 + sendFlag = 1 + elseif screen == 3 and control == 11 and value == 1 then -- 画面3,0x04地址 + sendID = 36 + sendFlag = 1 + elseif screen == 3 and control == 12 and value == 1 then + sendID = 37 + sendFlag = 1 + elseif screen == 3 and control == 13 and value == 1 then + sendID = 38 + sendFlag = 1 + elseif screen == 3 and control == 14 and value == 1 then + sendID = 39 + sendFlag = 1 + elseif screen == 3 and control == 15 and value == 1 then + sendID = 40 + sendFlag = 1 + elseif screen == 3 and control == 16 and value == 1 then + sendID = 41 + sendFlag = 1 + elseif screen == 3 and control == 17 and value == 1 then + sendID = 42 + sendFlag = 1 + elseif screen == 3 and control == 18 and value == 1 then + sendID = 43 + sendFlag = 1 + elseif screen == 3 and control == 19 and value == 1 then + sendID = 44 + sendFlag = 1 + elseif screen == 3 and control == 20 and value == 1 then + sendID = 45 + sendFlag = 1 + elseif screen == 4 and control == 11 and value == 1 then -- 画面4,0x05地址 + sendID = 48 + sendFlag = 1 + elseif screen == 4 and control == 12 and value == 1 then + sendID = 49 + sendFlag = 1 + elseif screen == 4 and control == 13 and value == 1 then + sendID = 50 + sendFlag = 1 + elseif screen == 4 and control == 14 and value == 1 then + sendID = 51 + sendFlag = 1 + elseif screen == 4 and control == 15 and value == 1 then + sendID = 52 + sendFlag = 1 + elseif screen == 4 and control == 16 and value == 1 then + sendID = 53 + sendFlag = 1 + elseif screen == 4 and control == 17 and value == 1 then + sendID = 54 + sendFlag = 1 + elseif screen == 4 and control == 18 and value == 1 then + sendID = 55 + sendFlag = 1 + elseif screen == 4 and control == 19 and value == 1 then + sendID = 56 + sendFlag = 1 + elseif screen == 4 and control == 20 and value == 1 then + sendID = 57 + sendFlag = 1 + elseif screen == 0 and control == 100 and value == 1 then -- 一键全开,控件ID统一为100 + sendID = 100 + sendFlag = 1 + elseif screen == 1 and control == 100 and value == 1 then + sendID = 200 + sendFlag = 1 + elseif screen == 2 and control == 100 and value == 1 then + sendID = 300 + sendFlag = 1 + elseif screen == 3 and control == 100 and value == 1 then + sendID = 400 + sendFlag = 1 + elseif screen == 4 and control == 100 and value == 1 then + sendID = 500 + sendFlag = 1 + end +end + +-- 系统每隔1秒钟会自动调用此回调函数。 +function on_systick() + +end + +-- 当画面切换时,执行此回调函数,screen为切换后的画面ID。 +function on_screen_change(screen) + +end + +-- LUA定时器中断函数,timer_id值范围为0-31。 +-- 单独使用该函数不生效,该函数触发回调需要配合 start_timer(timer_id, timeout, countdown, repeatNum) ,来开启定时器,定时器溢出超时了,才会触发on_timer(timer_id)。 +function on_timer(timer_id) + + if sendFlag == 1 then + sendFlag = 0 -- 发送开锁的优先级更高 + if sendID == 100 then + uart_send_data(openAlllock[0]) -- 0x01地址全开 + elseif sendID == 200 then + uart_send_data(openAlllock[1]) -- 0x02地址全开 + elseif sendID == 300 then + uart_send_data(openAlllock[2]) -- 0x03地址全开 + elseif sendID == 400 then + uart_send_data(openAlllock[3]) -- 0x04地址全开 + elseif sendID == 500 then + uart_send_data(openAlllock[4]) -- 0x05地址全开 + else + uart_send_data(openlock[sendID]) -- 根据sendId获取对应的openlock数组开锁指令发送 + end + else -- 读取锁控板所有通道状态, 根据当前画面ID获取对应的查询所有锁状态的指令发送 + local currentScreenId = get_current_screen() + if currentScreenId == 0 then + uart_send_data(readLockState[0]) + elseif currentScreenId == 1 then + uart_send_data(readLockState[1]) + elseif currentScreenId == 2 then + uart_send_data(readLockState[2]) + elseif currentScreenId == 3 then + uart_send_data(readLockState[3]) + else + uart_send_data(readLockState[4]) + end + end + +end \ No newline at end of file diff --git a/output/SD_card/32_font.bin b/output/SD_card/32_font.bin new file mode 100644 index 0000000..e4eb2e8 Binary files /dev/null and b/output/SD_card/32_font.bin differ diff --git a/output/SD_card/33_font.bin b/output/SD_card/33_font.bin new file mode 100644 index 0000000..58dfeea Binary files /dev/null and b/output/SD_card/33_font.bin differ diff --git a/output/SD_card/34_font.bin b/output/SD_card/34_font.bin new file mode 100644 index 0000000..ec8b59b Binary files /dev/null and b/output/SD_card/34_font.bin differ diff --git a/output/SD_card/35_font.bin b/output/SD_card/35_font.bin new file mode 100644 index 0000000..048032d Binary files /dev/null and b/output/SD_card/35_font.bin differ diff --git a/output/SD_card/3_Pic.jpg b/output/SD_card/3_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/SD_card/3_Pic.jpg differ diff --git a/output/SD_card/4_Pic.jpg b/output/SD_card/4_Pic.jpg new file mode 100644 index 0000000..908fbd2 Binary files /dev/null and b/output/SD_card/4_Pic.jpg differ diff --git a/output/SD_card/800_Pic.jpg b/output/SD_card/800_Pic.jpg new file mode 100644 index 0000000..5580e71 Binary files /dev/null and b/output/SD_card/800_Pic.jpg differ diff --git a/output/SD_card/801_Pic.jpg b/output/SD_card/801_Pic.jpg new file mode 100644 index 0000000..c1c85cd Binary files /dev/null and b/output/SD_card/801_Pic.jpg differ diff --git a/output/SD_card/802_Pic.jpg b/output/SD_card/802_Pic.jpg new file mode 100644 index 0000000..4ee582e Binary files /dev/null and b/output/SD_card/802_Pic.jpg differ diff --git a/output/SD_card/803_Pic.jpg b/output/SD_card/803_Pic.jpg new file mode 100644 index 0000000..8dfc424 Binary files /dev/null and b/output/SD_card/803_Pic.jpg differ diff --git a/output/SD_card/804_Pic.jpg b/output/SD_card/804_Pic.jpg new file mode 100644 index 0000000..832cec6 Binary files /dev/null and b/output/SD_card/804_Pic.jpg differ diff --git a/output/SD_card/805_Pic.jpg b/output/SD_card/805_Pic.jpg new file mode 100644 index 0000000..46b53e7 Binary files /dev/null and b/output/SD_card/805_Pic.jpg differ diff --git a/output/SD_card/982_Pic.jpg b/output/SD_card/982_Pic.jpg new file mode 100644 index 0000000..b00146e Binary files /dev/null and b/output/SD_card/982_Pic.jpg differ diff --git a/output/SD_card/983_Pic.jpg b/output/SD_card/983_Pic.jpg new file mode 100644 index 0000000..d8d03cb Binary files /dev/null and b/output/SD_card/983_Pic.jpg differ diff --git a/output/SD_card/984_Pic.jpg b/output/SD_card/984_Pic.jpg new file mode 100644 index 0000000..46c0269 Binary files /dev/null and b/output/SD_card/984_Pic.jpg differ diff --git a/output/SD_card/985_Pic.jpg b/output/SD_card/985_Pic.jpg new file mode 100644 index 0000000..65f59b8 Binary files /dev/null and b/output/SD_card/985_Pic.jpg differ diff --git a/output/SD_card/986_Pic.jpg b/output/SD_card/986_Pic.jpg new file mode 100644 index 0000000..bdf6d84 Binary files /dev/null and b/output/SD_card/986_Pic.jpg differ diff --git a/output/SD_card/987_Pic.jpg b/output/SD_card/987_Pic.jpg new file mode 100644 index 0000000..5de1067 Binary files /dev/null and b/output/SD_card/987_Pic.jpg differ diff --git a/output/SD_card/988_Pic.jpg b/output/SD_card/988_Pic.jpg new file mode 100644 index 0000000..043ade3 Binary files /dev/null and b/output/SD_card/988_Pic.jpg differ diff --git a/output/SD_card/989_Pic.jpg b/output/SD_card/989_Pic.jpg new file mode 100644 index 0000000..d2e8f8f Binary files /dev/null and b/output/SD_card/989_Pic.jpg differ diff --git a/output/SD_card/990_Pic.jpg b/output/SD_card/990_Pic.jpg new file mode 100644 index 0000000..341c20c Binary files /dev/null and b/output/SD_card/990_Pic.jpg differ diff --git a/output/SD_card/991_Pic.jpg b/output/SD_card/991_Pic.jpg new file mode 100644 index 0000000..02adfcc Binary files /dev/null and b/output/SD_card/991_Pic.jpg differ diff --git a/output/SD_card/992_Pic.jpg b/output/SD_card/992_Pic.jpg new file mode 100644 index 0000000..925f6f9 Binary files /dev/null and b/output/SD_card/992_Pic.jpg differ diff --git a/output/SD_card/993_Pic.jpg b/output/SD_card/993_Pic.jpg new file mode 100644 index 0000000..74bb64d Binary files /dev/null and b/output/SD_card/993_Pic.jpg differ diff --git a/output/SD_card/994_Pic.jpg b/output/SD_card/994_Pic.jpg new file mode 100644 index 0000000..ad26544 Binary files /dev/null and b/output/SD_card/994_Pic.jpg differ diff --git a/output/SD_card/995_Pic.jpg b/output/SD_card/995_Pic.jpg new file mode 100644 index 0000000..5e42379 Binary files /dev/null and b/output/SD_card/995_Pic.jpg differ diff --git a/output/SD_card/996_Pic.jpg b/output/SD_card/996_Pic.jpg new file mode 100644 index 0000000..76e7a8a Binary files /dev/null and b/output/SD_card/996_Pic.jpg differ diff --git a/output/SD_card/997_Pic.jpg b/output/SD_card/997_Pic.jpg new file mode 100644 index 0000000..ac9ec8a Binary files /dev/null and b/output/SD_card/997_Pic.jpg differ diff --git a/output/SD_card/GBK2UNI.bin b/output/SD_card/GBK2UNI.bin new file mode 100644 index 0000000..d8944cf Binary files /dev/null and b/output/SD_card/GBK2UNI.bin differ diff --git a/output/SD_card/config.txt b/output/SD_card/config.txt new file mode 100644 index 0000000..a7301fc --- /dev/null +++ b/output/SD_card/config.txt @@ -0,0 +1,19 @@ +UART_BANDRATE:07 +FONTLIB: +17_0x11.bin +21_0x15.bin +24_0x18.bin +31_0x1F.lua +JPG: +0_Pic.jpg +1_Pic.jpg +2_Pic.jpg +3_Pic.jpg +4_Pic.jpg +800_Pic.jpg +801_Pic.jpg +802_Pic.jpg +803_Pic.jpg +804_Pic.jpg +805_Pic.jpg +BMP: diff --git a/output/SD_card/freetype.ttf b/output/SD_card/freetype.ttf new file mode 100644 index 0000000..093c438 Binary files /dev/null and b/output/SD_card/freetype.ttf differ diff --git a/output/SD_card/parameter.bin b/output/SD_card/parameter.bin new file mode 100644 index 0000000..8ec2413 Binary files /dev/null and b/output/SD_card/parameter.bin differ diff --git a/pause_light.png b/pause_light.png new file mode 100644 index 0000000..2dce70f Binary files /dev/null and b/pause_light.png differ diff --git a/play_gray.png b/play_gray.png new file mode 100644 index 0000000..a2e785a Binary files /dev/null and b/play_gray.png differ diff --git a/right.png b/right.png new file mode 100644 index 0000000..a810362 Binary files /dev/null and b/right.png differ