修改 netled 闪烁频率, 添加发送通知时的闪烁

This commit is contained in:
Mizore 2023-01-17 19:52:12 +08:00
parent 6bdc0e378a
commit 62cebae182
2 changed files with 4 additions and 2 deletions

View File

@ -60,7 +60,7 @@ util_notify = require "util_notify"
sms.setNewSmsCb(
function(num, txt, metas)
log.info("smsCallback", num, txt, metas and json.encode(metas) or "")
util_netled.blink(200, 200, 1000)
util_netled.blink(50, 50, 5000)
util_notify.send({txt, "", "发件人号码: " .. num, "#SMS"})
end
)
@ -70,7 +70,7 @@ sys.taskInit(
-- 等待网络环境准备就绪
sys.waitUntil("IP_READY")
util_netled.blink(200, 200, 5000)
util_netled.blink(50, 50, 1000)
-- 开机基站定位
util_location.getCoord(

View File

@ -258,7 +258,9 @@ function util_notify.send(msg)
local retry_count = 0
while retry_count < max_retry do
util_netled.blink(50, 50)
local code, headers, body = notify(msg)
util_netled.blink()
if code == 200 then
log.info("util_notify.send", "发送通知成功", "retry_count:", retry_count, "code:", code, "body:", body)
break