Skip to content

Commit 069393e

Browse files
author
Matthias Hannig
committed
added patches
1 parent 872fcb0 commit 069393e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

trepped.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _parse_args():
4545
parser.add_argument("-l", "--listen-port", default=LISTEN_PORT_DEFAULT)
4646
parser.add_argument("-p", "--serial-port", default=SERIAL_PORT_DEFAULT)
4747
parser.add_argument("-b", "--baudrate", default=SERIAL_BAUD_DEFAULT)
48-
parser.add_argument("-t", "--gracetime", default=1.5, type=int)
48+
parser.add_argument("-t", "--gracetime", default=1.5, type=float)
4949

5050
return parser.parse_args()
5151

@@ -76,6 +76,9 @@ def _write_frame(boards, frame):
7676
# FIXME: This kind of sucks.
7777
num_boards = len(boards)
7878
frame_size = len(frame)
79+
if frame_size % 2 != 0:
80+
return
81+
7982
sub_frame_size = int(frame_size / num_boards)
8083

8184
if len(frame) < max(CHANNEL_MAPPING) + 1:

0 commit comments

Comments
 (0)