Просмотр исходного кода

Merge branch 'master' of https://gitee.com/openLuat/LuatOS

梁健 6 месяцев назад
Родитель
Сommit
aff8d685df
81 измененных файлов с 4301 добавлено и 201 удалено
  1. 17 17
      components/lcd/luat_lcd.c
  2. 40 25
      components/lcd/luat_lcd.h
  3. 46 6
      components/lcd/luat_lib_lcd.c
  4. 12 12
      components/lcd/luat_lib_lcd_jpg.c
  5. 1 1
      components/network/adapter/luat_lib_socket.c
  6. 1 1
      components/network/libftp/luat_lib_ftp.c
  7. 86 0
      lua/src/liolib.c
  8. BIN
      luat/demo/airui/0804_demo/A1.jpg
  9. BIN
      luat/demo/airui/0804_demo/A2.jpg
  10. BIN
      luat/demo/airui/0804_demo/A3.jpg
  11. BIN
      luat/demo/airui/0804_demo/A4.jpg
  12. BIN
      luat/demo/airui/0804_demo/A5.jpg
  13. BIN
      luat/demo/airui/0804_demo/A6.jpg
  14. BIN
      luat/demo/airui/0804_demo/A7.jpg
  15. BIN
      luat/demo/airui/0804_demo/A8.jpg
  16. BIN
      luat/demo/airui/0804_demo/A9.jpg
  17. BIN
      luat/demo/airui/0804_demo/B1.jpg
  18. BIN
      luat/demo/airui/0804_demo/B2.jpg
  19. BIN
      luat/demo/airui/0804_demo/B3.jpg
  20. BIN
      luat/demo/airui/0804_demo/B4.jpg
  21. BIN
      luat/demo/airui/0804_demo/B5.jpg
  22. BIN
      luat/demo/airui/0804_demo/B6.jpg
  23. BIN
      luat/demo/airui/0804_demo/B7.jpg
  24. BIN
      luat/demo/airui/0804_demo/B8.jpg
  25. BIN
      luat/demo/airui/0804_demo/B9.jpg
  26. BIN
      luat/demo/airui/0804_demo/C1.jpg
  27. BIN
      luat/demo/airui/0804_demo/C2.jpg
  28. BIN
      luat/demo/airui/0804_demo/C3.jpg
  29. BIN
      luat/demo/airui/0804_demo/C4.jpg
  30. BIN
      luat/demo/airui/0804_demo/C5.jpg
  31. BIN
      luat/demo/airui/0804_demo/C6.jpg
  32. BIN
      luat/demo/airui/0804_demo/C7.jpg
  33. BIN
      luat/demo/airui/0804_demo/C8.jpg
  34. BIN
      luat/demo/airui/0804_demo/C9.jpg
  35. BIN
      luat/demo/airui/0804_demo/D1.jpg
  36. BIN
      luat/demo/airui/0804_demo/D7.jpg
  37. BIN
      luat/demo/airui/0804_demo/D9.jpg
  38. BIN
      luat/demo/airui/0804_demo/Lbottom.jpg
  39. BIN
      luat/demo/airui/0804_demo/Lkeyboard.jpg
  40. BIN
      luat/demo/airui/0804_demo/P1.jpg
  41. BIN
      luat/demo/airui/0804_demo/Skeyboard.jpg
  42. BIN
      luat/demo/airui/0804_demo/Ukeyboard.jpg
  43. 3947 0
      luat/demo/airui/0804_demo/air8000.json
  44. BIN
      luat/demo/airui/0804_demo/back.jpg
  45. BIN
      luat/demo/airui/0804_demo/cancel.jpg
  46. BIN
      luat/demo/airui/0804_demo/choose1.jpg
  47. BIN
      luat/demo/airui/0804_demo/choose2.jpg
  48. BIN
      luat/demo/airui/0804_demo/choose3.jpg
  49. BIN
      luat/demo/airui/0804_demo/choosed1.jpg
  50. BIN
      luat/demo/airui/0804_demo/choosed2.jpg
  51. BIN
      luat/demo/airui/0804_demo/choosed3.jpg
  52. BIN
      luat/demo/airui/0804_demo/cloudy.jpg
  53. BIN
      luat/demo/airui/0804_demo/cloudyday.jpg
  54. BIN
      luat/demo/airui/0804_demo/default.jpg
  55. BIN
      luat/demo/airui/0804_demo/humidity.jpg
  56. BIN
      luat/demo/airui/0804_demo/input_topic.jpg
  57. 101 0
      luat/demo/airui/0804_demo/main.lua
  58. BIN
      luat/demo/airui/0804_demo/next.jpg
  59. BIN
      luat/demo/airui/0804_demo/ok.jpg
  60. BIN
      luat/demo/airui/0804_demo/power1.jpg
  61. BIN
      luat/demo/airui/0804_demo/power2.jpg
  62. BIN
      luat/demo/airui/0804_demo/power3.jpg
  63. BIN
      luat/demo/airui/0804_demo/power4.jpg
  64. BIN
      luat/demo/airui/0804_demo/rain.jpg
  65. BIN
      luat/demo/airui/0804_demo/signal0.jpg
  66. BIN
      luat/demo/airui/0804_demo/signal1.jpg
  67. BIN
      luat/demo/airui/0804_demo/signal2.jpg
  68. BIN
      luat/demo/airui/0804_demo/signal3.jpg
  69. BIN
      luat/demo/airui/0804_demo/signal4.jpg
  70. BIN
      luat/demo/airui/0804_demo/snow.jpg
  71. BIN
      luat/demo/airui/0804_demo/start.jpg
  72. BIN
      luat/demo/airui/0804_demo/stop.jpg
  73. BIN
      luat/demo/airui/0804_demo/sunny.jpg
  74. BIN
      luat/demo/airui/0804_demo/temp.jpg
  75. BIN
      luat/demo/airui/0804_demo/wind.jpg
  76. 1 1
      luat/demo/ftp/main.lua
  77. 5 106
      luat/modules/luat_lib_fs.c
  78. 31 31
      script/libs/airlbs.lua
  79. 6 0
      script/libs/lbsLoc.lua
  80. 6 0
      script/libs/lbsLoc2.lua
  81. 1 1
      script/libs/libfota.lua

+ 17 - 17
components/lcd/luat_lcd.c

@@ -134,7 +134,7 @@ const char* luat_lcd_name(luat_lcd_conf_t* conf) {
     return conf->opts->name;
 }
 
-LUAT_WEAK int luat_lcd_init_default(luat_lcd_conf_t* conf) {
+int luat_lcd_init_default(luat_lcd_conf_t* conf) {
 	conf->is_init_done = 0;
 
     if (conf->w == 0)
@@ -153,13 +153,13 @@ LUAT_WEAK int luat_lcd_init_default(luat_lcd_conf_t* conf) {
     if (conf->pin_pwr != LUAT_GPIO_NONE) {
         luat_gpio_set(conf->pin_pwr, Luat_GPIO_LOW);
     }
-	if (conf->opts->user_ctrl_init) {
-		int res = conf->opts->user_ctrl_init(conf);
-		if (res > 0) {
-			goto INIT_NOT_DONE;
-		}
-		goto INIT_DONE;
-	}
+    if (conf->opts->user_ctrl_init) {
+        int res = conf->opts->user_ctrl_init(conf);
+        if (res > 0) {
+            goto INIT_NOT_DONE;
+        }
+        goto INIT_DONE;
+    }
     luat_gpio_set(conf->pin_rst, Luat_GPIO_LOW);
     luat_rtos_task_sleep(100);
     luat_gpio_set(conf->pin_rst, Luat_GPIO_HIGH);
@@ -196,15 +196,15 @@ INIT_NOT_DONE:
     return -1;
 }
 
-LUAT_WEAK int luat_lcd_setup_buff_default(luat_lcd_conf_t* conf){
-	if (conf->buff) {
-		LLOGE("lcd buff已经分配过了");
-		return 0;
-	}
+int luat_lcd_setup_buff_default(luat_lcd_conf_t* conf){
+    if (conf->buff) {
+        LLOGE("lcd buff已经分配过了");
+        return 0;
+    }
     conf->buff = luat_heap_opt_malloc(LUAT_HEAP_PSRAM, sizeof(luat_color_t) * conf->w * conf->h);
     if (conf->buff == NULL) {
-      LLOGW("psram 分配 lcd buff失败, 尝试在sram分配");
-      conf->buff = luat_heap_opt_malloc(LUAT_HEAP_SRAM, sizeof(luat_color_t) * conf->w * conf->h);
+        LLOGW("psram 分配 lcd buff失败, 尝试在sram分配");
+        conf->buff = luat_heap_opt_malloc(LUAT_HEAP_SRAM, sizeof(luat_color_t) * conf->w * conf->h);
     }
     if (conf->buff == NULL) {
         LLOGE("分配 lcd buff失败");
@@ -212,8 +212,8 @@ LUAT_WEAK int luat_lcd_setup_buff_default(luat_lcd_conf_t* conf){
     }
     conf->buff_ex = luat_heap_opt_malloc(LUAT_HEAP_PSRAM, sizeof(luat_color_t) * conf->w * conf->h);
     if (conf->buff_ex == NULL) {
-      LLOGW("psram 分配 lcd buff_ex失败, 尝试在sram分配");
-      conf->buff_ex = luat_heap_opt_malloc(LUAT_HEAP_SRAM, sizeof(luat_color_t) * conf->w * conf->h);
+        LLOGW("psram 分配 lcd buff_ex失败, 尝试在sram分配");
+        conf->buff_ex = luat_heap_opt_malloc(LUAT_HEAP_SRAM, sizeof(luat_color_t) * conf->w * conf->h);
     }
     if (conf->buff_ex == NULL) {
         LLOGE("分配 lcd buff_ex失败");

+ 40 - 25
components/lcd/luat_lcd.h

@@ -62,6 +62,11 @@ enum{
 	LUAT_LCD_IM_8080_MODE = 0x30,
 };
 
+enum{
+	LUAT_LCD_ACC_HW_JPEG = 0x01,
+    LUAT_LCD_ACC_HW_ALL = 0xFF,
+};
+
 typedef struct
 {
 	uint8_t write_4line_cmd;  //address 1线 data4线
@@ -77,38 +82,45 @@ typedef struct luat_lcd_conf {
     uint8_t pin_dc;
     uint8_t pin_pwr;
     uint8_t pin_rst;
-    int16_t w;
-    int16_t h;
-    uint32_t buffer_size;
-    uint32_t dc_delay_us;
+    uint8_t lcd_cs_pin;		//注意不用的时候写0xff
+    uint8_t is_init_done;
+    uint8_t interface_mode;	// LUAT_LCD_IM_XXX
+    uint8_t bpp;			//颜色bit,默认是RGB565 16bit,预留兼容ARGB888 32bit
     uint8_t xoffset;//偏移
     uint8_t yoffset;//偏移
     uint8_t auto_flush;
     uint8_t direction;//方向
-    // buff 相关
-    int buff_ref;
-    int16_t flush_y_min;
-    int16_t flush_y_max;
-    uint8_t is_init_done;
-    uint8_t interface_mode;	// LUAT_LCD_IM_XXX
-    uint8_t lcd_cs_pin;		//注意不用的时候写0xff
-    uint8_t bpp;			//颜色bit,默认是RGB565 16bit,预留兼容ARGB888 32bit
-    uint32_t flush_rate;	//刷新率,针对no ram的屏幕起效
-    uint32_t bus_speed;
+    uint8_t endianness_swap;	// 大小端转换
+    uint8_t lcd_use_lvgl;
+    union {
+        struct {
+            uint8_t acc_hw_jpeg:1;
+            uint8_t :7;
+        };
+        uint8_t acc_hw;
+    };
+    uint8_t reserved;
+    int16_t w;
+    int16_t h;
     uint16_t hbp;
     uint16_t hspw;
     uint16_t hfp;
     uint16_t vbp;
     uint16_t vspw;
     uint16_t vfp;
+    int16_t flush_y_min;
+    int16_t flush_y_max;
+    uint32_t buffer_size;
+    uint32_t dc_delay_us;
+    uint32_t flush_rate;	//刷新率,针对no ram的屏幕起效
+    uint32_t bus_speed;
     luat_color_t* buff;
     luat_color_t* buff_ex;
     luat_color_t* buff_draw;
     struct luat_lcd_opts* opts;
     luat_spi_device_t* lcd_spi_device;
+    int buff_ref;
     int lcd_spi_ref;
-    int lcd_use_lvgl;
-    int endianness_swap;
     void* userdata;
     u8g2_t luat_lcd_u8g2 ;
 } luat_lcd_conf_t;
@@ -171,16 +183,25 @@ void luat_lcd_execute_cmds(luat_lcd_conf_t* conf);
 int lcd_write_cmd_data(luat_lcd_conf_t* conf,const uint8_t cmd, const uint8_t *data, uint8_t data_len);
 int lcd_read_cmd_data(luat_lcd_conf_t* conf,const uint8_t cmd, const uint8_t *data, uint8_t data_len, uint8_t dummy_bit);
 
-// xxx_default 一般为通用spi设备使用
+// xxx_default 为luatos内部默认实现,bsp可不使用default实现
 int luat_lcd_init_default(luat_lcd_conf_t* conf);
 int luat_lcd_setup_buff_default(luat_lcd_conf_t* conf);
 int luat_lcd_flush_default(luat_lcd_conf_t* conf);
 int luat_lcd_draw_default(luat_lcd_conf_t* conf, int16_t x1, int16_t y1, int16_t x2, int16_t y2, luat_color_t* color);
+int lcd_draw_jpeg_default(luat_lcd_conf_t* conf, const char* path, int16_t x, int16_t y);
+int lcd_jpeg_decode_default(luat_lcd_conf_t* conf, const char* path, luat_lcd_buff_info_t* buff_info);
 
-luat_lcd_conf_t* luat_lcd_get_default(void);
-const char* luat_lcd_name(luat_lcd_conf_t* conf);
+// 以下为luatos内部实现通用接口
+// 以下为 weak函数 可bsp单独适配硬件加速或其他接口适配等功能,默认指向上方xxx_default函数
 int luat_lcd_init(luat_lcd_conf_t* conf);
 int luat_lcd_setup_buff(luat_lcd_conf_t* conf);
+int luat_lcd_flush(luat_lcd_conf_t* conf);
+int luat_lcd_draw(luat_lcd_conf_t* conf, int16_t x1, int16_t y1, int16_t x2, int16_t y2, luat_color_t* color);
+int lcd_draw_jpeg(luat_lcd_conf_t* conf, const char* path, int16_t x, int16_t y);
+int lcd_jpeg_decode(luat_lcd_conf_t* conf, const char* path, luat_lcd_buff_info_t* buff_info);
+// 以下为非 weak 函数
+luat_lcd_conf_t* luat_lcd_get_default(void);
+const char* luat_lcd_name(luat_lcd_conf_t* conf);
 int luat_lcd_close(luat_lcd_conf_t* conf);
 int luat_lcd_display_on(luat_lcd_conf_t* conf);
 int luat_lcd_display_off(luat_lcd_conf_t* conf);
@@ -190,8 +211,6 @@ int luat_lcd_inv_off(luat_lcd_conf_t* conf);
 int luat_lcd_inv_on(luat_lcd_conf_t* conf);
 int luat_lcd_set_address(luat_lcd_conf_t* conf, int16_t x1, int16_t y1, int16_t x2, int16_t y2);
 int luat_lcd_set_color(luat_color_t back, luat_color_t fore);
-int luat_lcd_draw(luat_lcd_conf_t* conf, int16_t x1, int16_t y1, int16_t x2, int16_t y2, luat_color_t* color);
-int luat_lcd_flush(luat_lcd_conf_t* conf);
 int luat_lcd_draw_no_block(luat_lcd_conf_t* conf, int16_t x1, int16_t y1, int16_t x2, int16_t y2, luat_color_t* color, uint8_t last_flush);
 int luat_lcd_clear(luat_lcd_conf_t* conf, luat_color_t color);
 int luat_lcd_draw_fill(luat_lcd_conf_t* conf, int16_t x1,int16_t y1,int16_t x2,int16_t y2,luat_color_t color);
@@ -203,10 +222,6 @@ int luat_lcd_draw_rectangle(luat_lcd_conf_t* conf, int16_t x1, int16_t y1, int16
 int luat_lcd_draw_circle(luat_lcd_conf_t* conf, int16_t x0, int16_t y0, uint8_t r, luat_color_t color);
 int luat_lcd_set_direction(luat_lcd_conf_t* conf, uint8_t direction);
 
-// weak函数 可bsp单独适配硬件加速实现
-int lcd_draw_jpeg(luat_lcd_conf_t* conf, const char* path, int16_t x, int16_t y);
-int lcd_jpeg_decode(luat_lcd_conf_t* conf, const char* path, luat_lcd_buff_info_t* buff_info);
-
 /*
  * csdk适配用
  */

+ 46 - 6
components/lcd/luat_lib_lcd.c

@@ -142,6 +142,7 @@ static int l_lcd_init(lua_State* L) {
     }
 #endif
     memset(conf, 0, sizeof(luat_lcd_conf_t)); // 填充0,保证无脏数据
+    conf->acc_hw = 0xFF;
     conf->bpp = 16;
     conf->lcd_cs_pin = LUAT_GPIO_NONE;
     conf->pin_dc = LUAT_GPIO_NONE;
@@ -868,8 +869,8 @@ static uint8_t utf8_state;
 static uint16_t encoding;
 static uint16_t utf8_next(uint8_t b)
 {
-  if ( b == 0 )  /* '\n' terminates the string to support the string list procedures */
-    return 0x0ffff; /* end of string detected, pending UTF8 is discarded */
+    if ( b == 0 )  /* '\n' terminates the string to support the string list procedures */
+        return 0x0ffff; /* end of string detected, pending UTF8 is discarded */
     if ( utf8_state == 0 ){
         if ( b >= 0xfc )  /* 6 byte sequence */
         {
@@ -1864,8 +1865,7 @@ lcd.qspi(0xde, 0xde, nil, 0x61, 0xde, 0x60)
 -- CO5300驱动ic所需的qspi配置
 lcd.qspi(0x02, 0x32, 0x12)
 */
-static int l_lcd_qspi_config(lua_State* L)
-{
+static int l_lcd_qspi_config(lua_State* L){
 	luat_lcd_qspi_conf_t qspi_config = {0};
 	qspi_config.write_1line_cmd = luaL_optinteger(L, 1, 0x02);
 	qspi_config.write_4line_cmd = luaL_optinteger(L, 2, 0x32);
@@ -1882,8 +1882,7 @@ static int l_lcd_qspi_config(lua_State* L)
 @api lcd.user_done()
 @return nil
 */
-static int l_lcd_user_ctrl_done(lua_State* L)
-{
+static int l_lcd_user_ctrl_done(lua_State* L){
 	lcd_dft_conf->is_init_done = 1;
 	if (LUAT_LCD_IM_QSPI_MODE == lcd_dft_conf->interface_mode) {
 		if (luat_lcd_qspi_is_no_ram(lcd_dft_conf)) {
@@ -1893,6 +1892,40 @@ static int l_lcd_user_ctrl_done(lua_State* L)
 	return 0;
 }
 
+/*
+开启/关闭硬件加速(lcd.init后默认开启所有支持的硬件加速,当使用存在问题时可使用此接口进行开关指定的硬件加速)
+@api lcd.setAcchw(type,enable)
+@number type 支持的类型, 可选,默认全部类型 目前支持 lcd.ACC_HW_JPEG lcd.ACC_HW_ALL
+@bool enable 开关, 可选 默认关闭 ture开启 false关闭
+@return nil
+@usage
+    lcd.setAcchw(lcd.ACC_HW_JPEG,false) -- 关闭硬件加速的jpeg解码功能
+    lcd.setAcchw(lcd.ACC_HW_ALL,false) -- 关闭所有硬件加速
+*/
+static int l_lcd_set_acc_hw(lua_State* L){
+    luat_lcd_conf_t * conf = lcd_dft_conf;
+    uint8_t type = luaL_optinteger(L, 1, LUAT_LCD_ACC_HW_ALL);
+    uint8_t enable = 0;
+    if (lua_isboolean(L, 2)) {
+        enable = lua_toboolean(L, 2);
+    }
+    if (type == LUAT_LCD_ACC_HW_ALL){
+        if (enable){
+            conf->acc_hw = LUAT_LCD_ACC_HW_ALL;
+        }else{
+            conf->acc_hw = 0;
+        }
+    }else if(type == LUAT_LCD_ACC_HW_JPEG){
+        if (enable){
+            conf->acc_hw_jpeg = 1;
+        }else{
+            conf->acc_hw_jpeg = 0;
+        }
+    }
+	return 0;
+}
+
+
 #include "rotable2.h"
 static const rotable_Reg_t reg_lcd[] =
 {
@@ -1927,6 +1960,7 @@ static const rotable_Reg_t reg_lcd[] =
     { "rgb565",     ROREG_FUNC(l_lcd_rgb565)},
 	{ "qspi",		ROREG_FUNC(l_lcd_qspi_config)},
 	{ "user_done",		ROREG_FUNC(l_lcd_user_ctrl_done)},
+    { "setAcchw",    ROREG_FUNC(l_lcd_set_acc_hw)},
 #ifdef LUAT_USE_UFONT
     { "drawUTF8",   ROREG_FUNC(l_lcd_draw_utf8)},
 #endif
@@ -2077,6 +2111,12 @@ static const rotable_Reg_t reg_lcd[] =
 	{ "QSPI_MODE",                ROREG_INT(LUAT_LCD_IM_QSPI_MODE)},
 	//@const 8080_MODE 8080模式
 	{ "8080_MODE",                ROREG_INT(LUAT_LCD_IM_8080_MODE)},
+
+    //@const ACC_HW_JPEG JPEG硬件加速
+    {"ACC_HW_JPEG", ROREG_INT(LUAT_LCD_ACC_HW_JPEG)},
+    //@const ACC_HW_ALL 所有硬件加速
+    {"ACC_HW_ALL", ROREG_INT(LUAT_LCD_ACC_HW_ALL)},
+
 	{NULL, ROREG_INT(0)}
 };
 

+ 12 - 12
components/lcd/luat_lib_lcd_jpg.c

@@ -76,7 +76,7 @@ static int lcd_out_func (JDEC* jd, void* bitmap, JRECT* rect){
     return 1;    /* Continue to decompress */
 }
 
-LUAT_WEAK int lcd_draw_jpeg(luat_lcd_conf_t* conf, const char* path, int16_t x, int16_t y){
+int lcd_draw_jpeg_default(luat_lcd_conf_t* conf, const char* path, int16_t x, int16_t y){
     JRESULT res;      /* Result code of TJpgDec API */
     JDEC jdec;        /* Decompression object */
     void *work;       /* Pointer to the decompressor work area */
@@ -87,7 +87,7 @@ LUAT_WEAK int lcd_draw_jpeg(luat_lcd_conf_t* conf, const char* path, int16_t x,
 #endif
     IODEV devid;      /* User defined device identifier */
 
-    FILE* fd = luat_fs_fopen(path, "r");
+    FILE* fd = luat_fs_fopen(path, "rb");
     if (fd == NULL) {
         LLOGW("no such file %s", path);
     return -1;
@@ -138,14 +138,6 @@ static int decode_out_func (JDEC* jd, void* bitmap, JRECT* rect){
     uint16_t* tmp = (uint16_t*)bitmap;
 
     // rgb高低位swap
-    // uint16_t count = (rect->right - rect->left + 1) * (rect->bottom - rect->top + 1);
-    // for (size_t i = 0; i < count; i++){
-    //     if (lcd_dft_conf->endianness_swap)
-    //         buff_info->buff[buff_info->offset] = ((tmp[i] >> 8) & 0xFF)+ ((tmp[i] << 8) & 0xFF00);
-    //     else
-    //         buff_info->buff[buff_info->offset] = tmp[i];
-	// 	buff_info->offset++;
-    // }
 	uint16_t idx = 0;
 	for (size_t y = rect->top; y <= rect->bottom; y++){
 		uint16_t offset = y*buff_info->width + rect->left;
@@ -162,7 +154,7 @@ static int decode_out_func (JDEC* jd, void* bitmap, JRECT* rect){
     // LLOGD("jpeg seg size %d %d %d", rect->right - rect->left + 1, rect->bottom - rect->top + 1, (rect->right - rect->left + 1) * (rect->bottom - rect->top + 1));
     return 1;    /* Continue to decompress */
 }
-LUAT_WEAK int lcd_jpeg_decode(luat_lcd_conf_t* conf, const char* path, luat_lcd_buff_info_t* buff_info){
+int lcd_jpeg_decode_default(luat_lcd_conf_t* conf, const char* path, luat_lcd_buff_info_t* buff_info){
     JRESULT res;      /* Result code of TJpgDec API */
     JDEC jdec;        /* Decompression object */
     void *work = NULL;       /* Pointer to the decompressor work area */
@@ -171,7 +163,7 @@ LUAT_WEAK int lcd_jpeg_decode(luat_lcd_conf_t* conf, const char* path, luat_lcd_
 #else
     size_t sz_work = 3500; /* Size of work area */
 #endif
-    FILE* fd = luat_fs_fopen(path, "r");
+    FILE* fd = luat_fs_fopen(path, "rb");
     if (fd == NULL) {
         LLOGW("no such file %s", path);
 		goto error;
@@ -209,4 +201,12 @@ error:
 	return -1;
 }
 
+LUAT_WEAK int lcd_draw_jpeg(luat_lcd_conf_t* conf, const char* path, int16_t x, int16_t y){
+    return lcd_draw_jpeg_default(conf, path, x, y);
+}
+
+LUAT_WEAK int lcd_jpeg_decode(luat_lcd_conf_t* conf, const char* path, luat_lcd_buff_info_t* buff_info){
+    return lcd_jpeg_decode_default(conf, path, buff_info);
+}
+
 #endif

+ 1 - 1
components/network/adapter/luat_lib_socket.c

@@ -289,7 +289,7 @@ static int l_socket_set_debug(lua_State *L)
 @int tcp keep live模式下的探测间隔时间(秒)
 @int tcp keep live模式下的探测次数
 @string TCP模式下的服务器ca证书数据,UDP模式下的PSK,不需要加密传输写nil,后续参数也全部nil
-@string TCP模式下的客户端ca证书数据,UDP模式下的PSK-ID,TCP模式下如果不需要验证客户端证书时,忽略,一般不需要验证客户端证书
+@string TCP模式下的客户端证书数据,UDP模式下的PSK-ID,TCP模式下如果不需要验证客户端证书时,忽略,一般不需要验证客户端证书
 @string TCP模式下的客户端私钥加密数据
 @string TCP模式下的客户端私钥口令数据
 @return boolean 成功返回true,失败返回false

+ 1 - 1
components/network/libftp/luat_lib_ftp.c

@@ -55,7 +55,7 @@ FTP客户端
 @string port 端口,默认21
 @string username 用户名
 @string password 密码
-@bool/table  是否为ssl加密连接,默认不加密,true为无证书最简单的加密,table为有证书的加密 <br>server_cert 服务器ca证书数据 <br>client_cert 客户端ca证书数据 <br>client_key 客户端私钥加密数据 <br>client_password 客户端私钥口令数据
+@bool/table  是否为ssl加密连接,默认不加密,true为无证书最简单的加密,table为有证书的加密 <br>server_cert 服务器ca证书数据 <br>client_cert 客户端证书数据 <br>client_key 客户端私钥加密数据 <br>client_password 客户端私钥口令数据
 @return bool/string 成功返回true 失败返回string
 @usage
 ftp_login = ftp.login(nil,"xxx")

+ 86 - 0
lua/src/liolib.c

@@ -953,6 +953,81 @@ static int f_fill(lua_State *L) {
 }
 #endif
 
+/*
+获取文件系统信息
+@api    io.fsstat(path)
+@string 路径,默认"/",可选
+@return boolean 获取成功返回true,否则返回false
+@return int 总的block数量
+@return int 已使用的block数量
+@return int block的大小,单位字节
+@return string 文件系统类型,例如lfs代表littlefs
+@usage
+-- 打印根分区的信息
+log.info("fsstat", io.fsstat("/"))
+*/
+static int l_fs_fsstat(lua_State *L) {
+    const char* path = luaL_optstring(L, 1, "/");
+    luat_fs_info_t info = {0};
+    if (luat_fs_info(path, &info) == 0) {
+        lua_pushboolean(L, 1);
+        lua_pushinteger(L, info.total_block);
+        lua_pushinteger(L, info.block_used);
+        lua_pushinteger(L, info.block_size);
+        lua_pushstring(L, info.filesystem);
+        return 5;
+    } else {
+        lua_pushboolean(L, 0);
+        return 1;
+    }
+}
+
+#if 0
+static int l_fs_fsize(lua_State *L) {
+    const char* path = luaL_checkstring(L, 1);
+    lua_pushinteger(L, luat_fs_fsize(path));
+    return 1;
+}
+
+//---- 其他API尚不完善,暂不注释
+static int l_fs_mkdir(lua_State *L) {
+    const char* path = luaL_checkstring(L, 1);
+    lua_pushinteger(L, luat_fs_mkdir(path));
+    return 1;
+}
+
+static int l_fs_rmdir(lua_State *L) {
+    const char* path = luaL_checkstring(L, 1);
+    lua_pushinteger(L, luat_fs_rmdir(path));
+    return 1;
+}
+
+static int l_fs_mkfs(lua_State *L) {
+    luat_fs_conf_t conf = {0};
+    conf.busname = (char*)luaL_checkstring(L, 1);
+    conf.filesystem = (char*)luaL_checkstring(L, 2);
+    lua_pushinteger(L, luat_fs_mkfs(&conf));
+    return 1;
+}
+
+static int l_fs_mount(lua_State *L) {
+    luat_fs_conf_t conf = {0};
+    conf.busname = (char*)luaL_checkstring(L, 1);
+    conf.filesystem = (char*)luaL_checkstring(L, 2);
+    conf.mount_point = (char*)luaL_checkstring(L, 3);
+    conf.type = (char*)luaL_checkstring(L, 4);
+    lua_pushinteger(L, luat_fs_mount(&conf));
+    return 1;
+}
+
+static int l_fs_umount(lua_State *L) {
+    luat_fs_conf_t conf = {0};
+    conf.mount_point = (char*)luaL_checkstring(L, 1);
+    lua_pushinteger(L, luat_fs_umount(&conf));
+    return 1;
+}
+#endif
+
 static int io_mkfs (lua_State *L);
 static int io_mkdir (lua_State *L);
 static int io_rmdir (lua_State *L);
@@ -987,6 +1062,17 @@ static const rotable_Reg_t iolib[] = {
   {"mkfs",      ROREG_FUNC(io_mkfs)},
   {"lsmount",   ROREG_FUNC(io_lsmount)},
 
+// 从fs库迁移函数
+    { "fsstat",      ROREG_FUNC(l_fs_fsstat)},
+    { "fsize",       ROREG_FUNC(io_fileSize )},
+#if 0
+    { "mkdir",       ROREG_FUNC(l_fs_mkdir )},
+    { "rmdir",       ROREG_FUNC(l_fs_rmdir )},
+    { "mkfs",        ROREG_FUNC(l_fs_mkfs  )},
+    { "mount",       ROREG_FUNC(l_fs_mount )},
+    { "umount",      ROREG_FUNC(l_fs_umount)},
+#endif
+
   {"FILE",      ROREG_INT(0)},
   {"DIR",       ROREG_INT(1)},
   {NULL, ROREG_INT(0) }

BIN
luat/demo/airui/0804_demo/A1.jpg


BIN
luat/demo/airui/0804_demo/A2.jpg


BIN
luat/demo/airui/0804_demo/A3.jpg


BIN
luat/demo/airui/0804_demo/A4.jpg


BIN
luat/demo/airui/0804_demo/A5.jpg


BIN
luat/demo/airui/0804_demo/A6.jpg


BIN
luat/demo/airui/0804_demo/A7.jpg


BIN
luat/demo/airui/0804_demo/A8.jpg


BIN
luat/demo/airui/0804_demo/A9.jpg


BIN
luat/demo/airui/0804_demo/B1.jpg


BIN
luat/demo/airui/0804_demo/B2.jpg


BIN
luat/demo/airui/0804_demo/B3.jpg


BIN
luat/demo/airui/0804_demo/B4.jpg


BIN
luat/demo/airui/0804_demo/B5.jpg


BIN
luat/demo/airui/0804_demo/B6.jpg


BIN
luat/demo/airui/0804_demo/B7.jpg


BIN
luat/demo/airui/0804_demo/B8.jpg


BIN
luat/demo/airui/0804_demo/B9.jpg


BIN
luat/demo/airui/0804_demo/C1.jpg


BIN
luat/demo/airui/0804_demo/C2.jpg


BIN
luat/demo/airui/0804_demo/C3.jpg


BIN
luat/demo/airui/0804_demo/C4.jpg


BIN
luat/demo/airui/0804_demo/C5.jpg


BIN
luat/demo/airui/0804_demo/C6.jpg


BIN
luat/demo/airui/0804_demo/C7.jpg


BIN
luat/demo/airui/0804_demo/C8.jpg


BIN
luat/demo/airui/0804_demo/C9.jpg


BIN
luat/demo/airui/0804_demo/D1.jpg


BIN
luat/demo/airui/0804_demo/D7.jpg


BIN
luat/demo/airui/0804_demo/D9.jpg


BIN
luat/demo/airui/0804_demo/Lbottom.jpg


BIN
luat/demo/airui/0804_demo/Lkeyboard.jpg


BIN
luat/demo/airui/0804_demo/P1.jpg


BIN
luat/demo/airui/0804_demo/Skeyboard.jpg


BIN
luat/demo/airui/0804_demo/Ukeyboard.jpg


+ 3947 - 0
luat/demo/airui/0804_demo/air8000.json

@@ -0,0 +1,3947 @@
+{
+    "fonts": [
+    ],
+    "images": [
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B6.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B6.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/temp.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/temp.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C6.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C6.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/cloudyday.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/cloudyday.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B4.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B4.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/next.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/next.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/stop.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/stop.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C9.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C9.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/choosed2.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/choosed2.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C3.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C3.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A8.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A8.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A6.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A6.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/signal4.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/signal4.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C7.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C7.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B5.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B5.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/Lkeyboard.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/Lkeyboard.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/rain.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/rain.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A2.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A2.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/D1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/D1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B2.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B2.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A5.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A5.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/input_topic.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/input_topic.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/Skeyboard.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/Skeyboard.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C5.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C5.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/power4.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/power4.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/signal2.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/signal2.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/power2.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/power2.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/humidity.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/humidity.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C4.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C4.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/cloudy.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/cloudy.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/power3.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/power3.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/wind.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/wind.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/choose3.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/choose3.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/choose2.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/choose2.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/cancel.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/cancel.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/P1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/P1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/signal0.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/signal0.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/power1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/power1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A9.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A9.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B7.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B7.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B8.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B8.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A3.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A3.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/signal3.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/signal3.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/snow.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/snow.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/choosed1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/choosed1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/Ukeyboard.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/Ukeyboard.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A4.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A4.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/ok.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/ok.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/choose1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/choose1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C8.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C8.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/start.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/start.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/signal1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/signal1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B3.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B3.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/D9.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/D9.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/default.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/default.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/choosed3.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/choosed3.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/back.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/back.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/Lbottom.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/Lbottom.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C1.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C1.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/D7.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/D7.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/A7.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/A7.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/B9.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/B9.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/C2.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/C2.jpg"
+        },
+        {
+            "abso_filename": "C:/Users/luatTest/Pictures/airui_img/air8000_img/sunny.jpg",
+            "colorFormat": "RGBA",
+            "rela_filename": "img/sunny.jpg"
+        }
+    ],
+    "pages": [
+        {
+            "children": [
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 0,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_1",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "signal4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 64,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_2",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "power4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 128,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_3",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "temp",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 192,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_4",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "humidity",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 256,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_5",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "sunny",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_6",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A1",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_7",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A2",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_8",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A3",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_9",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_10",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A5",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_11",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A6",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_12",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A7",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_1#Clicked#bind_script#tts_click",
+                        "Event_2#Long_Pressed#bind_script#tts_longpress"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_13",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A8",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_3#Clicked#bind_script#mainpage_click"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_14",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "A9",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 32,
+                        "width": 320,
+                        "x": 0,
+                        "y": 448
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_15",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "Lbottom",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                }
+            ],
+            "events": [
+            ],
+            "geometry": {
+                "height": 480,
+                "width": 320,
+                "x": 0,
+                "y": 0
+            },
+            "name": "mainpage",
+            "styles": [
+                {
+                    "bg_color": "0x55aaff",
+                    "disable": false,
+                    "part": 0,
+                    "state": 0
+                }
+            ],
+            "type": "screen",
+            "visible": true
+        },
+        {
+            "children": [
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 0,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_16",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "signal4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 64,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_17",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "power4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 128,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_18",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "temp",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 192,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_19",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "humidity",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 256,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_20",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "sunny",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_21",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B1",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_22",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B2",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_23",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B3",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_24",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_25",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B5",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_26",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B6",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_4#Clicked#bind_script#second_1_click"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_27",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B7",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_28",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B8",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_5#Clicked#bind_script#second_2_click"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_29",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "B9",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 32,
+                        "width": 320,
+                        "x": 0,
+                        "y": 448
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_30",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "Lbottom",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                }
+            ],
+            "events": [
+            ],
+            "geometry": {
+                "height": 480,
+                "width": 320,
+                "x": 0,
+                "y": 0
+            },
+            "name": "second_page",
+            "styles": [
+                {
+                    "bg_color": "0x55aaff",
+                    "disable": false,
+                    "part": 0,
+                    "state": 0
+                }
+            ],
+            "type": "screen",
+            "visible": true
+        },
+        {
+            "children": [
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 0,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_31",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "signal4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 64,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_32",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "power4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 128,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_33",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "temp",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 192,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_34",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "humidity",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 256,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_35",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "sunny",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_36",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C1",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_37",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C2",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_38",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C3",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_39",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_40",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C5",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 216
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_41",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C6",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_6#Clicked#bind_script#third_1_click"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_42",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C7",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_43",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C8",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_7#Clicked#bind_script#third_2_click"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_44",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "C9",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 32,
+                        "width": 320,
+                        "x": 0,
+                        "y": 448
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_45",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "Lbottom",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                }
+            ],
+            "events": [
+            ],
+            "geometry": {
+                "height": 480,
+                "width": 320,
+                "x": 0,
+                "y": 0
+            },
+            "name": "third_page",
+            "styles": [
+                {
+                    "bg_color": "0x55aaff",
+                    "disable": false,
+                    "part": 0,
+                    "state": 0
+                }
+            ],
+            "type": "screen",
+            "visible": true
+        },
+        {
+            "children": [
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 0,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_46",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "signal4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 64,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_47",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "power4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 128,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_48",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "temp",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 192,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_49",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "humidity",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 256,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_50",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "sunny",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 100
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_51",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "D1",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_8#Clicked#bind_script#forth_1_click"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 20,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_52",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "D7",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_9#Clicked#bind_script#forth_2_click"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 220,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_53",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "D9",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 32,
+                        "width": 320,
+                        "x": 0,
+                        "y": 448
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_54",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "Lbottom",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                }
+            ],
+            "events": [
+            ],
+            "geometry": {
+                "height": 480,
+                "width": 320,
+                "x": 0,
+                "y": 0
+            },
+            "name": "forth_page",
+            "styles": [
+                {
+                    "bg_color": "0x55aaff",
+                    "disable": false,
+                    "part": 0,
+                    "state": 0
+                }
+            ],
+            "type": "screen",
+            "visible": true
+        },
+        {
+            "children": [
+                {
+                    "class": "lv_textarea",
+                    "click": true,
+                    "cursor_blink_time": 144,
+                    "cursor_pos": 302,
+                    "drag": false,
+                    "edge_flash": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 185,
+                        "width": 284,
+                        "x": 19,
+                        "y": 86
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "max_length": 0,
+                    "name": "text_area_1",
+                    "one_line_mode": false,
+                    "password_mode": false,
+                    "placeholder": "",
+                    "scroll_propagation": false,
+                    "scrollbar_mode": 2,
+                    "styles": [
+                        {
+                            "Background": {
+                                "bg_opa": 0
+                            },
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "Background": {
+                                "bg_opa": 0
+                            },
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "Background": {
+                                "bg_opa": 0
+                            },
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "Background": {
+                                "bg_opa": 0
+                            },
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "Background": {
+                                "bg_opa": 0
+                            },
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "Background": {
+                                "bg_opa": 0
+                            },
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "Background": {
+                                "bg_opa": 0
+                            },
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 0,
+                            "state": 6
+                        },
+                        {
+                            "part": 1,
+                            "state": 0
+                        },
+                        {
+                            "part": 1,
+                            "state": 1
+                        },
+                        {
+                            "part": 1,
+                            "state": 2
+                        },
+                        {
+                            "part": 1,
+                            "state": 3
+                        },
+                        {
+                            "part": 1,
+                            "state": 4
+                        },
+                        {
+                            "part": 1,
+                            "state": 5
+                        },
+                        {
+                            "part": 1,
+                            "state": 6
+                        },
+                        {
+                            "part": 2,
+                            "state": 0
+                        },
+                        {
+                            "part": 2,
+                            "state": 1
+                        },
+                        {
+                            "part": 2,
+                            "state": 2
+                        },
+                        {
+                            "part": 2,
+                            "state": 3
+                        },
+                        {
+                            "part": 2,
+                            "state": 4
+                        },
+                        {
+                            "part": 2,
+                            "state": 5
+                        },
+                        {
+                            "part": 2,
+                            "state": 6
+                        },
+                        {
+                            "part": 3,
+                            "state": 0
+                        },
+                        {
+                            "part": 3,
+                            "state": 1
+                        },
+                        {
+                            "part": 3,
+                            "state": 2
+                        },
+                        {
+                            "part": 3,
+                            "state": 3
+                        },
+                        {
+                            "part": 3,
+                            "state": 4
+                        },
+                        {
+                            "part": 3,
+                            "state": 5
+                        },
+                        {
+                            "part": 3,
+                            "state": 6
+                        },
+                        {
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 4,
+                            "state": 0
+                        },
+                        {
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 4,
+                            "state": 1
+                        },
+                        {
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 4,
+                            "state": 2
+                        },
+                        {
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 4,
+                            "state": 3
+                        },
+                        {
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 4,
+                            "state": 4
+                        },
+                        {
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 4,
+                            "state": 5
+                        },
+                        {
+                            "Text": {
+                                "text_font": "UNSCII 8"
+                            },
+                            "part": 4,
+                            "state": 6
+                        }
+                    ],
+                    "text": "Supports 4G, satellite positioning, WIFI, Bluetooth 5-second high-speed networking\n\n51 programmable IO/4 UART/4 general-purpose ADC/1 CAN interface\n\nSupport LuatOS secondary development, open source code, rich routines\n\nSupports 485/232/charging/Ethernet driver/multi network convergence/VoLTE calling\n",
+                    "text_align": 0,
+                    "type": "Text area"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": true,
+                    "drag": false,
+                    "events": [
+                        "Event_10#Clicked#bind_script#tts_click_back"
+                    ],
+                    "geometry": {
+                        "height": 80,
+                        "width": 80,
+                        "x": 120,
+                        "y": 332
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_55",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "back",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 0,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_56",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "signal4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 64,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_57",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "power4",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 128,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_58",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "temp",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 192,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_59",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "humidity",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 64,
+                        "width": 64,
+                        "x": 256,
+                        "y": 0
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_60",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "sunny",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                },
+                {
+                    "auto_size": true,
+                    "class": "lv_img",
+                    "click": false,
+                    "drag": false,
+                    "events": [
+                    ],
+                    "geometry": {
+                        "height": 32,
+                        "width": 320,
+                        "x": 0,
+                        "y": 448
+                    },
+                    "hidden": false,
+                    "locked": false,
+                    "name": "image_61",
+                    "offset": {
+                        "x": 0,
+                        "y": 0
+                    },
+                    "source": "Lbottom",
+                    "styles": [
+                        {
+                            "part": 0,
+                            "state": 0
+                        },
+                        {
+                            "part": 0,
+                            "state": 1
+                        },
+                        {
+                            "part": 0,
+                            "state": 2
+                        },
+                        {
+                            "part": 0,
+                            "state": 3
+                        },
+                        {
+                            "part": 0,
+                            "state": 4
+                        },
+                        {
+                            "part": 0,
+                            "state": 5
+                        },
+                        {
+                            "part": 0,
+                            "state": 6
+                        }
+                    ],
+                    "type": "Image"
+                }
+            ],
+            "events": [
+            ],
+            "geometry": {
+                "height": 480,
+                "width": 320,
+                "x": 0,
+                "y": 0
+            },
+            "name": "tts_text",
+            "styles": [
+                {
+                    "bg_color": "0x55aaff",
+                    "disable": false,
+                    "part": 0,
+                    "state": 0
+                }
+            ],
+            "type": "screen",
+            "visible": true
+        }
+    ],
+    "project_name": "air8000_zhengji_demo",
+    "project_settings": {
+        "color_depth": 32,
+        "keyBoard": {
+            "chinese_input": false,
+            "chinese_library": "mini",
+            "display_kb": false,
+            "keyboard_font_size": 18,
+            "keyboard_font_type": "SourceHanSerifSC_Regular"
+        },
+        "resolution": {
+            "height": 480,
+            "width": 320
+        },
+        "screen_retated": 90
+    },
+    "ui_version": "7.11.0",
+    "version": "1.0.0"
+}

BIN
luat/demo/airui/0804_demo/back.jpg


BIN
luat/demo/airui/0804_demo/cancel.jpg


BIN
luat/demo/airui/0804_demo/choose1.jpg


BIN
luat/demo/airui/0804_demo/choose2.jpg


BIN
luat/demo/airui/0804_demo/choose3.jpg


BIN
luat/demo/airui/0804_demo/choosed1.jpg


BIN
luat/demo/airui/0804_demo/choosed2.jpg


BIN
luat/demo/airui/0804_demo/choosed3.jpg


BIN
luat/demo/airui/0804_demo/cloudy.jpg


BIN
luat/demo/airui/0804_demo/cloudyday.jpg


BIN
luat/demo/airui/0804_demo/default.jpg


BIN
luat/demo/airui/0804_demo/humidity.jpg


BIN
luat/demo/airui/0804_demo/input_topic.jpg


+ 101 - 0
luat/demo/airui/0804_demo/main.lua

@@ -0,0 +1,101 @@
+--- 模块功能:airui demo
+-- @module airui
+-- @author ???
+-- @release 2025.05.24
+
+-- LuaTools需要PROJECT和VERSION这两个信息
+PROJECT = "airui_demo"
+VERSION = "1.0.0"
+
+log.info("main", PROJECT, VERSION)
+
+--加载sys库
+_G.sys = require("sys")
+
+local ui_path = "/luadb/air8000.json"
+
+local lcd_chip = "st7796"       -- "st7796" or "jd9261t_inited"
+function lcd_init()
+    sys.wait(500)
+    gpio.setup(164, 1, gpio.PULLUP)
+    gpio.setup(141, 1, gpio.PULLUP)
+
+    sys.wait(1000)
+    if lcd_chip == "st7796" then
+        lcd.init("st7796", {
+            port = lcd.HWID_0,        -- 使用的spi id 号
+            pin_dc = 0xff,            -- 命令选择硬件,不设置
+            pin_pwr = 9,              -- 背光控制管脚,默认打开背光,不设置
+            pin_rst = 2,              -- 屏幕reset 管脚  
+            direction = 0,            -- 屏幕方向 0: 0度 1:90度 2:180度 3:270度
+            w = 320,                  -- 屏幕宽度
+            h = 480,                  -- 屏幕高度
+            xoffset = 0,              -- X轴偏移像素
+            yoffset = 0,              -- Y轴偏移像素
+            sleepcmd = 0x10,          -- LCD睡眠命令
+            wakecmd = 0x11,           -- LCD唤醒命令
+        })
+    elseif lcd_chip == "jd9261t_inited" then
+        lcd.init("jd9261t_inited", { 
+            port = lcd.HWID_0,                  -- 使用的spi id 号
+            pin_pwr = 160,                      -- 背光控制管脚
+            pin_rst = 36,                       -- 屏幕reset 管脚
+            direction = 0,                      -- 屏幕方向 0: 0度 1:90度 2:180度 3:270度
+            w = 480,                            -- 屏幕宽度
+            h = 480,                            -- 屏幕高度
+            xoffset = 0,                        -- X轴偏移像素
+            yoffset = 0,                        -- Y轴偏移像素
+            interface_mode = lcd.QSPI_MODE,     -- 接口模式 qspi
+            bus_speed = 70000000,               -- SPI总线速度
+            flush_rate = 658,                   -- 刷新率
+            vbp = 19, vfp = 108, vs = 2         -- VBP:垂直后沿, VFP:垂直前沿, VS:垂直同步
+        })
+    end
+
+    gpio.setup(160, 1, gpio.PULLUP) -- 单独拉高背光
+
+    if lcd_chip == "jd9261t_inited" then
+        lcd.setupBuff(nil, true)        -- 开启buff缓存,更适合lvgl场景
+        lcd.autoFlush(false)
+    end
+end
+
+function tp_init()
+    if tp then
+        local function tp_callBack(tp_device, tp_data)
+            log.info("TP", tp_data[1].x, tp_data[1].y, tp_data[1].event)
+            sys.publish("TP", tp_device, tp_data)
+        end
+
+        local i2c_id = 0
+        i2c.setup(i2c_id)
+
+        if lcd_chip == "st7796" then
+            tp_device = tp.init("gt911",{port=i2c_id, pin_int = gpio.WAKEUP0},tp_callBack)
+        elseif lcd_chip == "jd9261t_inited" then
+            tp_device = tp.init("jd9261t_inited", {port = i2c_id, pin_int = gpio.WAKEUP0}, tp_callBack)
+        end
+
+        lvgl.indev_drv_register("pointer", "touch", tp_device) -- 注册触摸屏驱动
+    else
+        log.info("TP", "not found")
+    end
+end
+
+sys.taskInit(function()
+    -- local uiJson = io.open("/luadb/ui.json")
+    local uiJson = io.open(ui_path)
+    local ui = json.decode(uiJson:read("*a"))
+    log.info("ui", ui, ui.pages[1].children[1].name)
+
+    lcd_init()
+    log.info("初始化lvgl", lvgl.init(ui.project_settings.resolution.width, ui.project_settings.resolution.height))
+    tp_init()
+    
+    -- airui.init("/luadb/ui.json")
+    airui.init(ui_path)
+
+end)
+
+
+sys.run()

BIN
luat/demo/airui/0804_demo/next.jpg


BIN
luat/demo/airui/0804_demo/ok.jpg


BIN
luat/demo/airui/0804_demo/power1.jpg


BIN
luat/demo/airui/0804_demo/power2.jpg


BIN
luat/demo/airui/0804_demo/power3.jpg


BIN
luat/demo/airui/0804_demo/power4.jpg


BIN
luat/demo/airui/0804_demo/rain.jpg


BIN
luat/demo/airui/0804_demo/signal0.jpg


BIN
luat/demo/airui/0804_demo/signal1.jpg


BIN
luat/demo/airui/0804_demo/signal2.jpg


BIN
luat/demo/airui/0804_demo/signal3.jpg


BIN
luat/demo/airui/0804_demo/signal4.jpg


BIN
luat/demo/airui/0804_demo/snow.jpg


BIN
luat/demo/airui/0804_demo/start.jpg


BIN
luat/demo/airui/0804_demo/stop.jpg


BIN
luat/demo/airui/0804_demo/sunny.jpg


BIN
luat/demo/airui/0804_demo/temp.jpg


BIN
luat/demo/airui/0804_demo/wind.jpg


+ 1 - 1
luat/demo/ftp/main.lua

@@ -22,7 +22,7 @@ local is_ssl = flase -- 非ssl加密连接
 
 -- local ssl_encrypt = {
 --     server_cert = "/luadb/server_cert.cert",--服务器ca证书数据
---     client_cert = "/luadb/client_cert.cert",--客户端ca证书数据
+--     client_cert = "/luadb/client_cert.cert",--客户端证书数据
 --     client_key = "/luadb/client_key",-- 客户端私钥加密数据
 --     client_password = "naovswoivbfpfvjwpojv[pawjb[dsfjb]]"--客户端私钥口令数据
 -- }

+ 5 - 106
luat/modules/luat_lib_fs.c

@@ -1,116 +1,15 @@
 
-/*
-@module  fs
-@summary 文件系统额外操作
-@version 1.0
-@date    2021.03.30
-@demo fs
-@tag LUAT_USE_FS
-*/
+
 #include "luat_base.h"
 #include "luat_fs.h"
-#include "luat_mem.h"
 
 #define LUAT_LOG_TAG "fs"
 #include "luat_log.h"
 
-/*
-获取文件系统信息
-@api    fs.fsstat(path)
-@string 路径,默认"/",可选
-@return boolean 获取成功返回true,否则返回false
-@return int 总的block数量
-@return int 已使用的block数量
-@return int block的大小,单位字节
-@return string 文件系统类型,例如lfs代表littlefs
-@usage
--- 打印根分区的信息
-log.info("fsstat", fs.fsstat("/"))
-*/
-static int l_fs_fsstat(lua_State *L) {
-    const char* path = luaL_optstring(L, 1, "/");
-    luat_fs_info_t info = {0};
-    if (luat_fs_info(path, &info) == 0) {
-        lua_pushboolean(L, 1);
-        lua_pushinteger(L, info.total_block);
-        lua_pushinteger(L, info.block_used);
-        lua_pushinteger(L, info.block_size);
-        lua_pushstring(L, info.filesystem);
-        return 5;
-    } else {
-        lua_pushboolean(L, 0);
-        return 1;
-    }
-}
-
-/*
-获取文件大小
-@api    fs.fsize(path)
-@string 文件路径
-@return int 文件大小,若获取失败会返回0
-@usage
--- 打印main.luac的大小
-log.info("fsize", fs.fsize("/main.luac"))
-*/
-static int l_fs_fsize(lua_State *L) {
-    const char* path = luaL_checkstring(L, 1);
-    lua_pushinteger(L, luat_fs_fsize(path));
-    return 1;
-}
-
-//---- 其他API尚不完善,暂不注释
-
-static int l_fs_mkdir(lua_State *L) {
-    const char* path = luaL_checkstring(L, 1);
-    lua_pushinteger(L, luat_fs_mkdir(path));
-    return 1;
-}
-
-static int l_fs_rmdir(lua_State *L) {
-    const char* path = luaL_checkstring(L, 1);
-    lua_pushinteger(L, luat_fs_rmdir(path));
-    return 1;
-}
-
-static int l_fs_mkfs(lua_State *L) {
-    luat_fs_conf_t conf = {0};
-    conf.busname = (char*)luaL_checkstring(L, 1);
-    conf.filesystem = (char*)luaL_checkstring(L, 2);
-    lua_pushinteger(L, luat_fs_mkfs(&conf));
-    return 1;
-}
-
-static int l_fs_mount(lua_State *L) {
-    luat_fs_conf_t conf = {0};
-    conf.busname = (char*)luaL_checkstring(L, 1);
-    conf.filesystem = (char*)luaL_checkstring(L, 2);
-    conf.mount_point = (char*)luaL_checkstring(L, 3);
-    conf.type = (char*)luaL_checkstring(L, 4);
-    lua_pushinteger(L, luat_fs_mount(&conf));
-    return 1;
-}
-
-static int l_fs_umount(lua_State *L) {
-    luat_fs_conf_t conf = {0};
-    conf.mount_point = (char*)luaL_checkstring(L, 1);
-    lua_pushinteger(L, luat_fs_umount(&conf));
-    return 1;
-}
-
-#include "rotable2.h"
-static const rotable_Reg_t reg_fs[] =
-{
-    { "fsstat",      ROREG_FUNC(l_fs_fsstat   )},
-    { "fsize",       ROREG_FUNC(l_fs_fsize    )},
-    { "mkdir",       ROREG_FUNC(l_fs_mkdir    )},
-    { "rmdir",       ROREG_FUNC(l_fs_rmdir    )},
-    { "mkfs",        ROREG_FUNC(l_fs_mkfs     )},
-    { "mount",       ROREG_FUNC(l_fs_mount    )},
-    { "umount",      ROREG_FUNC(l_fs_umount   )},
-	{ NULL,          ROREG_INT(0) }
-};
-
 LUAMOD_API int luaopen_fs( lua_State *L ) {
-    luat_newlib2(L, reg_fs);
+    lua_getglobal(L, "io");
+    if (lua_isuserdata(L, -1))
+        return 1;
+    luaopen_io(L);
     return 1;
 }

+ 31 - 31
script/libs/airlbs.lua

@@ -5,26 +5,11 @@
 @date    2024.11.01
 @author  Dozingfiretruck
 @usage
---注意:因使用了sys.wait()所有api需要在协程中使用
---注意:使用前需同步时间
--- 用法实例
-local airlbs = require "airlbs"
-
-sys.taskInit(function()
-    sys.waitUntil("IP_READY")
-
-    socket.sntp()
-    sys.waitUntil("NTP_UPDATE", 1000)
-
-    while 1 do
-        local result , data = airlbs.request({project_id = "xxx",project_key = 'xxx',timeout = 1000})
-        if result then
-            print("airlbs", json.encode(data))
-        end
-        sys.wait(20000)
-    end
-
-end)
+-- lbsloc 是异步回调接口,
+-- lbsloc2 是是同步接口。
+-- lbsloc比lbsloc2多了一个请求地址文本的功能。
+-- lbsloc 和 lbsloc2 都是免费LBS定位的实现方式;
+-- airlbs 扩展库是收费 LBS 的实现方式。
 ]] 
 
 
@@ -98,20 +83,35 @@ end
 --[[
 获取定位数据
 @api airlbs.request(param)
-@param table 参数(联系销售获取id与key) project_id:项目ID project_key:项目密钥 timeout:超时时间,单位毫秒 默认15000
+@param table 参数(联系销售获取id与key) project_id:项目ID project_key:项目密钥 timeout:超时时间,单位毫秒 默认15000 adapter: 网络适配器id,可选,默认是平台自带的网络协议栈
 @return bool 成功返回true,失败会返回false
 @return table 定位成功生效,成功返回定位数据
 @usage
-local result , data = airlbs.request({project_id = airlbs_project_id,project_key = airlbs_project_key})
-if result then
-    print("airlbs", json.encode(data))
-end
--- 2025.4.10 新增adapter参数
-local result , data = airlbs.request({
-    project_id = airlbs_project_id,
-    project_key = airlbs_project_key,
-    adapter = socket.LWIP_STA
-})
+--注意:函数内因使用了sys.waitUntil阻塞接口,所以api需要在协程中使用
+--注意:使用前需同步时间
+
+local airlbs = require "airlbs"
+
+sys.taskInit(function()
+    -- 等待网络就绪
+    sys.waitUntil("IP_READY")
+    -- 执行时间同步
+    socket.sntp()
+    sys.waitUntil("NTP_UPDATE", 10000)
+    while 1 do
+        -- airlbs请求定位
+        local result ,data = airlbs.request({
+            project_id = airlbs_project_id,
+            project_key = airlbs_project_key,
+            timeout = 10000, 
+            adapter = socket.LWIP_STA
+            })
+        if result then
+            log.info("airlbs", json.encode(data))
+        end
+        sys.wait(20000)
+    end
+end)
 ]]
 function airlbs.request(param)
     if not param or param.project_id == nil or param.project_key == nil then

+ 6 - 0
script/libs/lbsLoc.lua

@@ -5,6 +5,12 @@
 @date    2022.12.16
 @author  luatos
 @usage
+-- lbsloc 是异步回调接口,
+-- lbsloc2 是是同步接口。
+-- lbsloc比lbsloc2多了一个请求地址文本的功能。
+-- lbsloc 和 lbsloc2 都是免费LBS定位的实现方式;
+-- airlbs 扩展库是收费 LBS 的实现方式。
+
 --注意:因使用了sys.wait()所有api需要在协程中使用
 --用法实例
 --注意:此处的PRODUCT_KEY仅供演示使用,不能用于生产环境

+ 6 - 0
script/libs/lbsLoc2.lua

@@ -6,6 +6,12 @@
 @author  wendal
 @demo    lbsLoc2
 @usage
+-- lbsloc 是异步回调接口,
+-- lbsloc2 是是同步接口。
+-- lbsloc比lbsloc2多了一个请求地址文本的功能。
+-- lbsloc 和 lbsloc2 都是免费LBS定位的实现方式;
+-- airlbs 扩展库是收费 LBS 的实现方式。
+
 -- 注意:
 -- 1. 因使用了sys.wait()所有api需要在协程中使用
 -- 2. 仅支持单基站定位, 即当前联网的基站

+ 1 - 1
script/libs/libfota.lua

@@ -131,7 +131,7 @@ fota升级
 @number ota_port 可选,请求端口,默认80
 @number libfota_timeout 可选,请求超时时间,单位毫秒,默认30000毫秒
 @string server_cert 可选,服务器ca证书数据
-@string client_cert 可选,客户端ca证书数据
+@string client_cert 可选,客户端证书数据
 @string client_key 可选,客户端私钥加密数据
 @string client_password 可选,客户端私钥口令数据
 @boolean show_otaurl 可选,是否从日志中输出打印OTA升级包的URL路径,默认会打印