Skip to content

Commit

Permalink
Modify TIMING_INTERACTIVE so that you can see what is about to be tra…
Browse files Browse the repository at this point in the history
…nsmitted, but it's still a little clearer what has been transmitted
  • Loading branch information
Tim Brom committed Oct 22, 2018
1 parent d4c5357 commit 5d42308
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cancat/__init__.py
Expand Up @@ -641,7 +641,10 @@ def CANreplay(self, start_bkmk=None, stop_bkmk=None, start_msg=0, stop_msg=None,
delta_correction = newstamp - laststamp

if timing == TIMING_INTERACTIVE:
raw_input("Press Enter to Transmit next message")
char = raw_input("Transmit this message? %s (Y/n)" % reprCanMsg(idx, ts, arbid, data))

if char is not None and len(char) > 0 and char[0] == 'n':
return

elif timing == TIMING_REAL:
if last_time != -1:
Expand All @@ -652,7 +655,7 @@ def CANreplay(self, start_bkmk=None, stop_bkmk=None, start_msg=0, stop_msg=None,

self.CANxmit(arbid, data)
if timing == TIMING_INTERACTIVE:
print "Transmitted: %s" % reprCanMsg(idx, ts, arbid, data)
print "Message transmitted"

def setCanBaud(self, baud_const=CAN_500KBPS):
'''
Expand Down

0 comments on commit 5d42308

Please sign in to comment.