Skip to content

Commit 999f6f7

Browse files
committed
Update init script example
1 parent 00f38eb commit 999f6f7

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

omodsim/controls/scriptcontrol.ui

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@
4646
</sizepolicy>
4747
</property>
4848
<property name="plainText">
49-
<string>Script.onInit(()=&gt;{
50-
let deviceId = 1;
51-
let address = 1;
52-
Server.addressBase = AddressBase.Base1;
49+
<string>Server.addressBase = AddressBase.Base1;
50+
51+
let deviceId = 1;
52+
let address = 1;
53+
54+
Script.onInit(()=&gt;{
5355
Server.onChange(deviceId, Register.Holding, address, (value)=&gt;
5456
{
5557
/* write your code on register value change */

0 commit comments

Comments
 (0)