--ҪѣλöMODULE_TYPEPROJECTVERSION
--MODULE_TYPEģͺţĿǰ֧Air201Air202Air800
--PROJECTascii stringͣ㶨壬ֻҪʹ,
--VERSIONascii stringͣʹLuatƽ̨̼Ĺܣ밴"X.X.X"壬Xʾ1λ֣㶨
MODULE_TYPE = "Air202"
PROJECT = "LUAT_IOT_SERVER_UPDATE"
VERSION = "1.0.0"
--[[
ʹLuatƽ̨̼Ĺܣ밴²
1Luatƽ̨ǰҳ棺https://iot.openluat.com/
2ûûעû
3עû֮ûжӦĿһĿ
4ӦĿߵĿϢұ߻ϢݣҵProductKeyProductKeyݣֵPRODUCT_KEY
]]
PRODUCT_KEY = "v32xEAKsGTIEQxtqgwCldp5aPlcnPs3K"
require"sys"
--[[
ʹUARTtraceע͵Ĵ"--sys.opntrace(true,1)"ɣ21ʾUART1traceԼҪ޸
traceڵĵطдԱ֤UARTھܵͳֵĴϢ
дںλãп޷ϢӶӵѶ
]]
--sys.opntrace(true,1)
--[[
ʹLuatƽ̨ʱ²
1updatehttpģ require"updatehttp"
ִһ豸ÿο׼󣬾ͻԶִ
2Ҫʱִܣ--updatehttp.setperiod(3600)עͣԼҪöʱ
3Ҫʵʱִܣο--sys.timer_start(updatehttp.request,120000)ԼҪupdatehttp.request()
]]
require"updatehttp"
--updatehttp.setperiod(3600)
--sys.timer_start(updatehttp.request,120000)

--[[
Ҫѣ
һʹԶܣǿҽʹdbgܣοд
ΪͨԶ°汾Ľű°汾Ľűʱ﷨Զ˵һαдİ汾
˺һԶһԶ°汾->°汾г->Զ˵ɰ汾ѭ¹쳣˷
籾дİ汾1.0.01.0.1汾1.0.1汾ʱ﷨豸ѭԶ1.0.1->1.0.1г->Զ˵1.0.0
һdbgܺ󣬷﷨󣬻Ὣ﷨ϱdbgԱ鿴﷨־Լʱ﷨󣬳汾
dbg֧TCPUDPЭ飬յκϱҪظдOK
Լdbgʹúṩ"UDP","ota.airm2m.com",9072
iot.openluat.comе¼һƷ"ѯdebug"пԲѯ豸ϱĴϢ
]]
require"dbg"
sys.timer_start(dbg.setup,12000,"UDP","ota.airm2m.com",9072)

require"test"

--ӲŹģ
--ԼӲþ1Ƿش˹ģ飻2Luatģ鸴λƬźͻι
--ٷ۵Air201ӲŹʹùٷAir201ʱش˹ģ
--[[
require "wdt"
wdt.setup(pio.P0_30, pio.P0_31)
]]


sys.init(0,0)
sys.run()
