forked from M-Labs/artiq
1
0
Fork 0

coredevice/analyzer: support TTL inputs

This commit is contained in:
Sebastien Bourdeauducq 2015-12-26 21:24:53 +08:00
parent 7eb4067477
commit 1c36ae0672
1 changed files with 3 additions and 1 deletions

View File

@ -148,12 +148,14 @@ class TTLHandler:
self.last_value = str(message.data) self.last_value = str(message.data)
if self.oe: if self.oe:
self.channel_value.set_value(self.last_value) self.channel_value.set_value(self.last_value)
elif messages.address == 1: elif message.address == 1:
self.oe = bool(message.data) self.oe = bool(message.data)
if self.oe: if self.oe:
self.channel_value.set_value(self.last_value) self.channel_value.set_value(self.last_value)
else: else:
self.channel_value.set_value("X") self.channel_value.set_value("X")
elif isinstance(message, InputMessage):
self.channel_value.set_value(str(message.data))
class DDSHandler: class DDSHandler: