Browse Source

add:ota变为可选功能

Dozingfiretruck 4 years ago
parent
commit
c7c1306c3d
2 changed files with 9 additions and 3 deletions
  1. 2 2
      app/port/luat_conf_bsp.h
  2. 7 1
      app/port/luat_fs_air101.c

+ 2 - 2
app/port/luat_conf_bsp.h

@@ -76,10 +76,10 @@
 // NIMBLE 是蓝牙功能, 名为BLE, 但绝非低功耗.
 // #define LUAT_USE_NIMBLE 1
 // FDB 提供kv数据库, 与nvm库类似
-// #define LUAT_USE_FDB 1
+#define LUAT_USE_FDB 1
 // 多虚拟机支持,实验性,一般不启用
 // #define LUAT_USE_VMX 1
-
+#define LUAT_USE_OTA
 #define LUAT_USE_DBG
 #define LUAT_USE_MLX90640
 #define LUAT_USE_I2CTOOLS

+ 7 - 1
app/port/luat_fs_air101.c

@@ -90,8 +90,12 @@ int luat_fs_init(void) {
 		.mount_point = "/"
 	};
 	luat_fs_mount(&conf);
+
+    #ifdef LUAT_USE_OTA
     //OTA检测升级
     luat_ota(luadb_addr);
+    #endif
+    
 	luat_vfs_reg(&vfs_fs_luadb);
 	luat_fs_conf_t conf2 = {
 		.busname = (char*)(luadb_addr == 0 ? luadb_inline_sys : ptr),
@@ -111,6 +115,8 @@ int luat_fs_init(void) {
 	return 0;
 }
 
+#ifdef LUAT_USE_OTA
 int luat_flash_write(uint32_t addr, uint8_t * buf, uint32_t len){
     return tls_fls_write(addr, buf, len);
-}
+}
+#endif