Просмотр исходного кода

fix: 使用demo/ota/air724_to_air101的air724代码的下载路径不正确

Wendal Chen 2 лет назад
Родитель
Сommit
d0f8eaef43
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      demo/ota/Air724_to_Air101/Air724/uartSentFile.lua

+ 4 - 4
demo/ota/Air724_to_Air101/Air724/uartSentFile.lua

@@ -38,14 +38,14 @@ sys.taskInit(function()
         "http://iot.openluat.com/api/site/firmware_upgrade?project_key=" ..
             PRODUCT_KEY .. "&imei=" .. imei .. "&firmware_name=" .. bsp ..
             "&version=" .. ver
-    http.request("GET", url, nil, nil, nil, 30000, httpCbFnc, "/lua/update.bin")
+    http.request("GET", url, nil, nil, nil, 30000, httpCbFnc, "/update.bin")
     sys.waitUntil("HTTP_GET_SUCCESS")
-    local fileHandle = io.open("/lua/update.bin", "rb")
+    local fileHandle = io.open("/update.bin", "rb")
     if not fileHandle then
         log.error("open updateFile error")
         return
     end
-    local size = io.fileSize("/lua/update.bin")
+    local size = io.fileSize("/update.bin")
     log.info("打印大小", size)
     pm.wake("UART1_SENT101")
     uart.write(uartID, "###" .. size .. "&&&")
@@ -60,7 +60,7 @@ sys.taskInit(function()
     uart.close(uartID)
     pm.sleep("UART1_SENT101")
     fileHandle:close()
-    os.remove("/lua/update.bin")
+    os.remove("/update.bin")
     checkSwitch = false
 end)
 local rdbuf = ""