Skip to content

Commit d207042

Browse files
committed
Fixed Soft Channel device support
1 parent d5f8f6d commit d207042

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

luaApp/src/luaSupport.dbd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include "luascriptRecord.dbd"
22

3-
device(luascript, INST_IO, devLuaSoft, "Soft Channel")
3+
device(luascript, CONSTANT, devLuaSoft, "Soft Channel")
44
device(ai, INST_IO, devLuaAi, "lua")
55
device(ao, INST_IO, devLuaAo, "lua")
66
device(bi, INST_IO, devLuaBi, "lua")

luaApp/src/luascriptRecord.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,9 @@ static void processCallback(void* data)
651651

652652
if (checkValUpdate(record))
653653
{
654+
record->pact = FALSE;
654655
writeValue(record);
656+
record->pact = TRUE;
655657
db_post_events(record, &record->val, DBE_VALUE);
656658
}
657659
}
@@ -662,7 +664,9 @@ static void processCallback(void* data)
662664

663665
if (checkSvalUpdate(record))
664666
{
667+
record->pact = FALSE;
665668
writeValue(record);
669+
record->pact = TRUE;
666670
db_post_events(record, &record->sval, DBE_VALUE);
667671
}
668672
}

0 commit comments

Comments
 (0)