Ver Fonte

fix: demo中http库改名后,V1001无法使用demo,加点兼容的逻辑

Wendal Chen há 3 anos atrás
pai
commit
65dde4c509

+ 5 - 0
demo/wlan/esp32c3/hello_world/main.lua

@@ -19,6 +19,11 @@ require("sysplus")
 
 -- end)
 
+-- 兼容V1001固件的
+if http == nil and http2 then
+    http = http2
+end
+
 sys.taskInit(function()
     sys.wait(1000)
     wlan.init()

+ 12 - 0
script/turnkey/EinkBook/Scripts/main.lua

@@ -6,6 +6,18 @@ sys = require("sys")
 require("sysplus")
 wifiLib = require("wifiLib")
 
+
+-- 兼容V1001固件的
+if http == nil and http2 then
+    http = http2
+end
+
+
+-- 兼容V1001固件的
+if http == nil and http2 then
+    http = http2
+end
+
 tag = "EINKBOOK"
 -- 是否启用配网功能(配合esptouch使用)
 USE_SMARTCONFIG = false

+ 6 - 0
script/turnkey/eink-calendar/main.lua

@@ -7,6 +7,12 @@ VERSION = "1.0.0"
 local sys = require "sys"
 require("sysplus")
 
+
+-- 兼容V1001固件的
+if http == nil and http2 then
+    http = http2
+end
+
 --需要自行填写的东西
 --wifi信息
 local wifiName,wifiPassword = "Xiaomi_AX6000","Air123456"