File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -213,11 +213,14 @@ def name(self):
213
213
"""
214
214
direction = "Tx" if self .cob_id & 0x80 else "Rx"
215
215
map_id = self .cob_id >> 8
216
+ if direction == "Rx" :
217
+ map_id -= 1
216
218
node_id = self .cob_id & 0x7F
217
219
return "%sPDO%d_node%d" % (direction , map_id , node_id )
218
220
219
221
def on_message (self , can_id , data , timestamp ):
220
- if can_id == self .cob_id :
222
+ is_transmitting = self .transmit_thread and self .transmit_thread .is_alive ()
223
+ if can_id == self .cob_id and not is_transmitting :
221
224
with self .receive_condition :
222
225
self .is_received = True
223
226
self .data = data
@@ -344,6 +347,7 @@ def start(self, period=None):
344
347
345
348
if not self .period :
346
349
raise ValueError ("A valid transmission period has not been given" )
350
+ logger .info ("Starting %s with a period of %s seconds" , self .name , self .period )
347
351
348
352
if not self .transmit_thread or not self .transmit_thread .is_alive ():
349
353
self .stop_event .clear ()
Original file line number Diff line number Diff line change 1
1
2
- __version__ = "0.4.0.dev7 "
2
+ __version__ = "0.4.0.dev8 "
You can’t perform that action at this time.
0 commit comments