master
haddaway 2012-10-20 15:49:10 -07:00
parent 82724f2bc7
commit 81f54b75ee
3 changed files with 4 additions and 3 deletions

View File

@ -10,6 +10,7 @@ class ToorChatProtocol():
''' This is used to send a simple message over the toorchat protocol ''' ''' This is used to send a simple message over the toorchat protocol '''
msg = ToorChatMessage(message, user) msg = ToorChatMessage(message, user)
self.device.RFxmit(msg.to_string()) self.device.RFxmit(msg.to_string())
print msg.to_string()
@classmethod @classmethod
def get_packet_start(cls): def get_packet_start(cls):

View File

@ -16,8 +16,8 @@ def main():
protocol = ToorChatProtocol(badge) protocol = ToorChatProtocol(badge)
while True: while True:
try: try:
msg, timestamp = badge.RFrecv() print badge.RFrecv()
print msg # print msg
except ChipconUsbTimeoutException: except ChipconUsbTimeoutException:
pass pass

View File

@ -18,7 +18,7 @@ def main():
try: try:
# msg, timestamp = badge.RFrecv() # msg, timestamp = badge.RFrecv()
# print "enter a message" # print "enter a message"
send = raw_input("Enter a message") send = raw_input("Enter a message\n")
protocol.send_message(send) protocol.send_message(send)
except ChipconUsbTimeoutException: except ChipconUsbTimeoutException:
pass pass