Skip to content

Commit

Permalink
DM: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
deanm1278 committed May 7, 2018
1 parent e8ebffa commit 5e758d2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
20 changes: 11 additions & 9 deletions adafruit_seesaw/crickit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from micropython import const

_ADC_INPUT_0_PIN_CRICKIT = const(2)
_ADC_INPUT_1_PIN_CRICKIT = const(3)
_ADC_INPUT_2_PIN_CRICKIT = const(40)
Expand Down Expand Up @@ -49,16 +51,16 @@
_CRICKIT_CT4 = const(3)

class Crickit_Pinmap:
analog_pins = [_ADC_INPUT_0_PIN_CRICKIT, _ADC_INPUT_1_PIN_CRICKIT,
_ADC_INPUT_2_PIN_CRICKIT, _ADC_INPUT_3_PIN_CRICKIT,
_ADC_INPUT_4_PIN_CRICKIT, _ADC_INPUT_5_PIN_CRICKIT,
_ADC_INPUT_6_PIN_CRICKIT, _ADC_INPUT_7_PIN_CRICKIT]
analog_pins = (_ADC_INPUT_0_PIN_CRICKIT, _ADC_INPUT_1_PIN_CRICKIT,
_ADC_INPUT_2_PIN_CRICKIT, _ADC_INPUT_3_PIN_CRICKIT,
_ADC_INPUT_4_PIN_CRICKIT, _ADC_INPUT_5_PIN_CRICKIT,
_ADC_INPUT_6_PIN_CRICKIT, _ADC_INPUT_7_PIN_CRICKIT)

pwm_width = 16

pwm_pins = [_CRICKIT_S4, _CRICKIT_S3, _CRICKIT_S2, _CRICKIT_S1,
_CRICKIT_M1_A1, _CRICKIT_M1_A2, _CRICKIT_M1_B1,
_CRICKIT_M1_B2, _CRICKIT_DRIVE1, _CRICKIT_DRIVE2,
_CRICKIT_DRIVE3, _CRICKIT_DRIVE4]
pwm_pins = (_CRICKIT_S4, _CRICKIT_S3, _CRICKIT_S2, _CRICKIT_S1,
_CRICKIT_M1_A1, _CRICKIT_M1_A2, _CRICKIT_M1_B1,
_CRICKIT_M1_B2, _CRICKIT_DRIVE1, _CRICKIT_DRIVE2,
_CRICKIT_DRIVE3, _CRICKIT_DRIVE4)

touch_pins = [_CRICKIT_CT1, _CRICKIT_CT2, _CRICKIT_CT3, _CRICKIT_CT4]
touch_pins = (_CRICKIT_CT1, _CRICKIT_CT2, _CRICKIT_CT3, _CRICKIT_CT4)
5 changes: 5 additions & 0 deletions adafruit_seesaw/neopixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

try:
import struct
except ImportError:
import ustruct as struct

class Neopixel:
def __init__(self, seesaw, pin, n, *, bpp=3, brightness=1.0, auto_write=True, pixel_order=None):
self._seesaw = seesaw
Expand Down
10 changes: 6 additions & 4 deletions adafruit_seesaw/samd09.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from micropython import const

_ADC_INPUT_0_PIN = const(0x02)
_ADC_INPUT_1_PIN = const(0x03)
_ADC_INPUT_2_PIN = const(0x04)
Expand All @@ -31,11 +33,11 @@
_PWM_3_PIN = const(0x07)

class SAMD09_Pinmap:
analog_pins = [_ADC_INPUT_0_PIN, _ADC_INPUT_1_PIN,
_ADC_INPUT_2_PIN, _ADC_INPUT_3_PIN]
analog_pins = (_ADC_INPUT_0_PIN, _ADC_INPUT_1_PIN,
_ADC_INPUT_2_PIN, _ADC_INPUT_3_PIN)

pwm_width = 8

pwm_pins = [_PWM_0_PIN, _PWM_1_PIN, _PWM_2_PIN, _PWM_3_PIN]
pwm_pins = (_PWM_0_PIN, _PWM_1_PIN, _PWM_2_PIN, _PWM_3_PIN)

touch_pins = []
touch_pins = ()
6 changes: 3 additions & 3 deletions examples/crickit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
S3 = servo.Servo(pwm3)
S4 = servo.Servo(pwm4)

servos = [S1, S2, S3, S4]
servos = (S1, S2, S3, S4)

CRCKIT_NUM_ADC = 8
CRCKit_adc = [2, 3, 40, 41, 11, 10, 9, 8]
CRCKit_adc = (2, 3, 40, 41, 11, 10, 9, 8)

CRCKIT_NUM_DRIVE = 4
CRCKit_drive = [42, 43, 12, 13]
CRCKit_drive = (42, 43, 12, 13)

CAPTOUCH_THRESH = 500

Expand Down

0 comments on commit 5e758d2

Please sign in to comment.