mirror of
https://gitee.com/iBUILDING-X/driver-box.git
synced 2025-12-06 08:09:17 +08:00
refactor(lua):重命名设备属性设置方法- 将 setDeviceProps 方法重命名为 setDeviceProp
- 更新 Lua 模块中对应的方法引用- 保持功能一致性和代码清晰度
This commit is contained in:
@@ -23,8 +23,8 @@ func (lm *LuaModule) Loader(L *lua.LState) int {
|
||||
//"cache_get": lm.GetCache,
|
||||
"shadow": lm.getDeviceShadow,
|
||||
//"device_list": lm.getDeviceShadow,
|
||||
"getDevice": lm.getDevice,
|
||||
"setDeviceProps": lm.setDeviceProps,
|
||||
"getDevice": lm.getDevice,
|
||||
"setDeviceProp": lm.setDeviceProp,
|
||||
//"writeToMsgBus": lm.WriteToMsgBus,
|
||||
})
|
||||
L.Push(mod)
|
||||
@@ -105,7 +105,7 @@ func (lm *LuaModule) getDevice(L *lua.LState) int {
|
||||
/**
|
||||
* setDeviceProps 设置设备属性
|
||||
*/
|
||||
func (lm *LuaModule) setDeviceProps(L *lua.LState) int {
|
||||
func (lm *LuaModule) setDeviceProp(L *lua.LState) int {
|
||||
deviceId := L.ToString(1)
|
||||
propName := L.ToString(2)
|
||||
propValue := L.ToString(3)
|
||||
|
||||
Reference in New Issue
Block a user