Skip to content

Commit 4883b12

Browse files
committed
licences and pylint
1 parent ca1ef64 commit 4883b12

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-FileCopyrightText: 2021 Tim Cocks for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-FileCopyrightText: 2021 Tim Cocks for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-FileCopyrightText: 2021 Tim Cocks for Adafruit Industries
2+
# SPDX-License-Identifier: MIT

Rotary_Trinkey_Brightness_Crank/code.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
"""
2+
Rotary Trinkey gadget that forces you to crank the handle in order
3+
to keep the brightness up on your phone or tablet.
4+
"""
5+
16
import time
7+
import math
28
import board
39
import digitalio
4-
import rotaryio
5-
import math
10+
import rotaryiogk
611
import usb_hid
712
from adafruit_hid.consumer_control import ConsumerControl
813
from adafruit_hid.consumer_control_code import ConsumerControlCode
@@ -27,7 +32,7 @@
2732
CUR_VALUE = 0
2833

2934
# pause state
30-
PAUSED = True
35+
PAUSED = False
3136

3237
cc = ConsumerControl(usb_hid.devices)
3338

@@ -40,6 +45,7 @@
4045
# previous encoder position variable
4146
last_position = encoder.position
4247

48+
# previous switch variable
4349
prev_switch_value = False
4450

4551
while True:
@@ -56,7 +62,7 @@
5662

5763
if not PAUSED:
5864
# is it time for an action?
59-
if (now > LAST_ACTION_TIME + ACTION_INTERVAL):
65+
if now > LAST_ACTION_TIME + ACTION_INTERVAL:
6066
# print(CUR_VALUE)
6167

6268
# update previous time variable

0 commit comments

Comments
 (0)