File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 18
18
19
19
BASEDIR = os .path .join (os .path .dirname (os .path .realpath (__file__ )), "../" )
20
20
21
+ DEBUG = os .getenv ("PANDADEBUG" ) is not None
22
+
21
23
# *** wifi mode ***
22
24
23
25
def build_st (target , mkfile = "Makefile" ):
@@ -34,7 +36,10 @@ def parse_can_buffer(dat):
34
36
address = f1 >> 3
35
37
else :
36
38
address = f1 >> 21
37
- ret .append ((address , f2 >> 16 , ddat [8 :8 + (f2 & 0xF )], (f2 >> 4 )& 0xFF ))
39
+ dddat = ddat [8 :8 + (f2 & 0xF )]
40
+ if DEBUG :
41
+ print (" R %x: %s" % (address , str (dddat ).encode ("hex" )))
42
+ ret .append ((address , f2 >> 16 , dddat , (f2 >> 4 )& 0xFF ))
38
43
return ret
39
44
40
45
class PandaWifiStreaming (object ):
@@ -369,6 +374,8 @@ def can_send_many(self, arr):
369
374
extended = 4
370
375
for addr , _ , dat , bus in arr :
371
376
assert len (dat ) <= 8
377
+ if DEBUG :
378
+ print (" W %x: %s" % (addr , dat .encode ("hex" )))
372
379
if addr >= 0x800 :
373
380
rir = (addr << 3 ) | transmit | extended
374
381
else :
You can’t perform that action at this time.
0 commit comments