欢迎图片

Changes for page Lua Script

Last modified by Devin Chen on 2025/11/10 16:04

From version 9.2
edited by xingzhi lin
on 2025/10/31 11:54
Change comment: There is no comment for this version
To version 9.1
edited by xingzhi lin
on 2025/10/31 11:32
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -8008,58 +8008,28 @@
8008 8008  
8009 8009  == chart.setAlarmBtnSpacing ==
8010 8010  
8011 -**Prototype : **chart.setAlarmBtnSpacing(partname, spacing)
8011 +**Prototype : **user_secure.usersecure_getInfo()
8012 8012  
8013 -**Function: **Set the spacing between new alarm buttons
8013 +**Function: **Connect to a DB file.(If the file does not exist)
8014 8014  
8015 8015  **Parameters**:
8016 8016  
8017 -* (((
8018 -partname(string): Component name
8019 -)))
8020 -* (((
8021 -spacing(int): Button spacing (unit: px (pixels))
8022 -)))
8017 +* dbFilePath (string): Full path to the DB file to connect to (create)
8023 8023  
8024 8024  **Return: **
8025 8025  
8026 -* Success: User data table
8027 -* Failure: Returns nil
8021 +* Success: database object
8022 +* Failure: Returns nil and error.
8028 8028  
8029 8029  **Example**
8030 8030  
8031 8031  {{code language="LUA"}}
8032 -chart.setAlarmBtnSpacing("1_ALM_0", 5)
8027 +sql = require "Luasqlite" -- Introducing the lua libraries  
8028 +env = sql.sqlite3() -- Get the environment class
8033 8033  {{/code}}
8034 8034  
8035 8035  == chart.setAlarmBtnScale ==
8036 8036  
8037 -
8038 -**Prototype : **chart.setAlarmBtnScale(partname, scale)
8039 -
8040 -**Function: **Set the new alarm button size scaling
8041 -
8042 -**Parameters**:
8043 -
8044 -* (((
8045 -partname(string): Component name
8046 -)))
8047 -* (((
8048 -scale(double): Scaling factor, default is 1, range [0.1, 5]
8049 -)))
8050 -
8051 -**Return: **
8052 -
8053 -* Success: True
8054 -* Failure: False
8055 -
8056 -**Example**
8057 -
8058 -{{code language="LUA"}}
8059 -chart.setAlarmBtnScale("1_ALM_0", 1.5)
8060 -{{/code}}
8061 -
8062 -
8063 8063  == chart.setFormulaBtnSpacing ==
8064 8064  
8065 8065  == chart.setFormulaBtnScale ==