Skip to content

Commit

Permalink
add: libfota需要兼容老的hmeta库, 没有hwver函数
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Nov 7, 2024
1 parent 50a8428 commit f1c93b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/libs/libfota.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ local function fota_task(cbFnc,storge_location, len, param1,ota_url,ota_port,lib
else
imei = mcu.unique_id():toHex()
end
model = hmeta and ("&model=" .. hmeta.model() .. "_" .. hmeta.hwver()) or ""
model = hmeta and ("&model=" .. hmeta.model() .. "_" .. (hmeta.hwver and hmeta.hwver() or "A00")) or ""
ota_url = "http://iot.openluat.com/api/site/firmware_upgrade?project_key=" .. _G.PRODUCT_KEY .. "&imei=".. imei .. "&device_key=&firmware_name=" .. _G.PROJECT.. "_LuatOS-SoC_" .. rtos.bsp() .. "&version=" .. rtos.version():sub(2) .. "." .. version .. model
else
log.error("fota", "_G.VERSION must be xxx.yyy.zzz!!!")
Expand Down

0 comments on commit f1c93b7

Please sign in to comment.