File tree 2 files changed +10
-14
lines changed
2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 5
5
import adafruit_irremote
6
6
import adafruit_lis3dh
7
7
8
+ # Control debug output: it takes time so don't unless you're debugging
9
+ DEBUG_LOG = False
10
+
8
11
# Control codes
9
12
STOP = 0x01
10
13
ROTATE_LEFT = 0x02
32
35
zero = [550 , 1700 ],
33
36
trail = 0 )
34
37
35
- # pylint: disable=unused-argument
36
- # pylint: disable=pointless-statement
37
38
def log (s ):
38
39
"""Optionally output some text.
39
40
:param string s: test to output
40
41
"""
41
- # swap the comments on the next two lines to enable/disable logging output
42
- pass
43
- # print(s)
44
- # pylint: enable=pointless-statement
45
- # pylint: enable=unused-argument
42
+ if DEBUG_LOG :
43
+ print (s )
46
44
47
45
48
46
while True :
Original file line number Diff line number Diff line change 3
3
import adafruit_irremote
4
4
from adafruit_crickit import crickit
5
5
6
+ # Control debug output: it takes time so don't unless you're debugging
7
+ DEBUG_LOG = False
8
+
6
9
# Control codes
7
10
STOP = 0x01
8
11
ROTATE_LEFT = 0x02
18
21
right_wheel = crickit .dc_motor_2
19
22
20
23
21
- # pylint: disable=unused-argument
22
- # pylint: disable=pointless-statement
23
24
def log (s ):
24
25
"""Optionally output some text.
25
26
:param string s: test to output
26
27
"""
27
- # swap the comments on the next two lines to enable/disable logging output
28
- pass
29
- # print(s)
30
- # pylint: enable=pointless-statement
31
- # pylint: enable=unused-argument
28
+ if DEBUG_LOG :
29
+ print (s )
32
30
33
31
34
32
# These allow easy correction for motor speed variation.
You can’t perform that action at this time.
0 commit comments