Open main menu
Home
How to do
Din rail devices
Box devices
Sensors
Multiroom
Applicatin
XML
Additional info
Log in
Settings
Larnitech wiki page
Search
Changes
← Older edit
Virtual/ru
(view source)
Revision as of 14:30, 7 November 2025
176 bytes removed
,
7 November
no edit summary
Line 47:
Line 47:
Скрипт обработки нажатия
Скрипт обработки нажатия
<syntaxhighlight lang="cpp" line>
<syntaxhighlight lang="cpp" line>
−
u8
state[2]
=
{0,
0
}
;
+
u8
dim
= 0;
−
V-ID/
142:99
+
−
{
+
V-ID/
Dimmer
{
−
if (opt(0)==0xff)
{
+
if (opt(0)==0xff)
−
if
(
state[0]==0
)
state[0] = 1
;
+
setStatus
(
Dimmer,{1,dim}
);
−
else state[0] = 0;
+
else
if
(opt(0)==0xfe){
−
}
else (opt(0)==0xfe){
+
dim
=opt(
1
);
−
state[0]=state[0];
+
setStatus
(
Dimmer,
{1
,dim
});
−
}else {
+
}
−
state[0]
=opt(
0
);
−
}
−
−
if
(
opt(1)==0xfe)
{
−
state[
1
]=state[1];
−
}
else {
−
state[1]=opt(1
);
−
}
−
setStatus(142:99,state);
}
}
</syntaxhighlight>
</syntaxhighlight>
Sova
editor, translator
47
edits