Skip to content

Commit

Permalink
修好waitUntil的超时时间功能
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxuuu committed Jun 26, 2019
1 parent da76cc8 commit a184d12
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions LuaApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

- 移植了全部log输出接口

- 移植了大部分的定时器与任务相关接口

(不支持部分:sys.waitUntil不支持超时时间)
- 移植了全部的定时器与任务相关接口

## C#层增加的接口(底层接口)

Expand Down Expand Up @@ -424,7 +422,7 @@ Task任务的条件等待函数(包括事件消息和定时器消息等条件
|传入值类型|释义|
|-|-|
|param|id 消息ID|
|number|**暂不支持**ms 等待超时时间,单位ms,最大等待126322567毫秒|
|number|ms 等待超时时间,单位ms,最大等待126322567毫秒|

* 返回值

Expand All @@ -448,7 +446,7 @@ Task任务的条件等待函数扩展(包括事件消息和定时器消息等
|传入值类型|释义|
|-|-|
|param|id 消息ID|
|number|**暂不支持**ms 等待超时时间,单位ms,最大等待126322567毫秒|
|number|ms 等待超时时间,单位ms,最大等待126322567毫秒|

* 返回值

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ CI自动构建,快照版:[Appveyor Artifacts](https://ci.appveyor.com/projec
## 功能列表

- 其他串口调试功能具有的功能
- 收发日志清晰明了
- 自动保存串口与Lua脚本日志
- 收发日志清晰明了,同时显示HEX值与实际字符串
- 自动保存串口与Lua脚本日志,并附带时间
- 串口断开后,如果再次连接,会自动重连
- 发送的数据可被用户自定义的Lua脚本提前处理
- 右侧快捷发送栏,快捷发送条目数量不限制
- 可独立运行Lua脚本,并拥有定时器与协程任务特性
- 可独立运行Lua脚本,并拥有定时器与协程任务特性(移植自合宙Luat Task架构)

![icon](https://github.com/chenxuuu/llcom/blob/master/screen.png?raw=true)

Expand Down
4 changes: 2 additions & 2 deletions llcom/DefaultFiles/core_script/sys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ end
-- @usage result, data = sys.waitUntil("SIM_IND", 120000)
function sys.waitUntil(id, ms)
sys.subscribe(id, coroutine.running())
local message = ms and {wait(ms)} or {coroutine.yield()}
local message = ms and {sys.wait(ms)} or {coroutine.yield()}
sys.unsubscribe(id, coroutine.running())
return message[1] ~= nil, table.unpack(message, 2, #message)
end
Expand All @@ -70,7 +70,7 @@ end
-- @usage result, data = sys.waitUntilExt("SIM_IND", 120000)
function sys.waitUntilExt(id, ms)
sys.subscribe(id, coroutine.running())
local message = ms and {wait(ms)} or {coroutine.yield()}
local message = ms and {sys.wait(ms)} or {coroutine.yield()}
sys.unsubscribe(id, coroutine.running())
if message[1] ~= nil then return table.unpack(message) end
return false
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions llcom/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.3")]
[assembly: AssemblyFileVersion("1.0.0.3")]
[assembly: AssemblyVersion("1.0.0.4")]
[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: NeutralResourcesLanguage("zh-CN")]

0 comments on commit a184d12

Please sign in to comment.