Browse Source

Merge branch 'master' of https://gitee.com/openLuat/LuatOS

alienwalker 1 year ago
parent
commit
0b73cca739
2 changed files with 3 additions and 6 deletions
  1. 2 1
      demo/onewire/main.lua
  2. 1 5
      script/libs/libfota2.lua

+ 2 - 1
demo/onewire/main.lua

@@ -12,10 +12,11 @@ log.style(1)
 
 注意:
 1. 3.3v在老版本的开发板上没有引脚, 所以需要外接, 一定要确保共地
-2. ONEWIRE功能支持在3个引脚使用, 但硬件通道只有一个, 默认是GPIO2
+2. ONEWIRE功能支持在4个引脚使用, 但硬件通道只有一个, 默认是GPIO2
 3. 如需切换到其他脚, 参考如下切换逻辑, 选其中一种
 
 mcu.altfun(mcu.ONEWIRE, 0, 17, 4, 0) -- GPIO2, 也就是默认值
+mcu.altfun(mcu.ONEWIRE, 0, 18, 4, 0) -- GPIO3
 mcu.altfun(mcu.ONEWIRE, 0, 22, 4, 0) -- GPIO7
 mcu.altfun(mcu.ONEWIRE, 0, 53, 4, 0) -- GPIO28
 ]]

+ 1 - 5
script/libs/libfota2.lua

@@ -178,11 +178,7 @@ function libfota2.request(cbFnc, opts)
         end
         -- 补齐firmware_name参数
         if not opts.firmware_name then
-            if mobile then
-                opts.firmware_name = _G.PROJECT .. "_LuatOS-SoC_" .. rtos.bsp()
-            else
-                opts.firmware_name = _G.PROJECT .. "_" .. rtos.firmware()
-            end
+            opts.firmware_name = _G.PROJECT .. "_LuatOS-SoC_" .. rtos.bsp()
         end
         local query = ""
         -- 补齐imei参数