Răsfoiți Sursa

fix: demo/feishu 在固件没有wdt库时报错

Wendal Chen 2 ani în urmă
părinte
comite
83415b1edf
1 a modificat fișierele cu 4 adăugiri și 3 ștergeri
  1. 4 3
      demo/feishu/main.lua

+ 4 - 3
demo/feishu/main.lua

@@ -23,9 +23,10 @@ _G.sys = require("sys")
 --[[特别注意, 使用http库需要下列语句]]
 _G.sysplus = require("sysplus")
 
-
-wdt.init(3000)
-sys.timerLoopStart(wdt.feed, 1000)
+if wdt then
+    wdt.init(3000)
+    sys.timerLoopStart(wdt.feed, 1000)
+end
 
 -- 因为这个demo适合所有能联网的设备
 -- 统一联网函数, 按需要增删