Skip to content

Commit 3be08ec

Browse files
committed
Remap digital inputs / buttons
- Map digital inputs to TTL channels 0-7 - Map buttons to TTL channels 8-13
1 parent 3cbb33a commit 3be08ec

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Source/Devices/DigitalIO.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,8 @@ void DigitalIO::processFrames()
117117
uint64_t portState = *(dataPtr + dataOffset);
118118
uint64_t buttonState = *(dataPtr + dataOffset + 1);
119119

120-
if (portState != 0 || buttonState != 0)
121-
{
122-
uint64_t ttlEventWord = (portState & 0xFF) << 6 | (buttonState & 0x3F);
123-
eventWords.add(ttlEventWord);
124-
}
120+
uint64_t ttlEventWord = (buttonState & 0x3F) << 8 | (portState & 0xFF);
121+
eventWords.add(ttlEventWord);
125122

126123
oni_destroy_frame(frame);
127124
}

0 commit comments

Comments
 (0)