Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Hacksaar
Sphinx
Commits
11c74940
Commit
11c74940
authored
Mar 08, 2015
by
Ralf
Browse files
no need to press lock buttons so long
parent
f65d130e
Changes
1
Hide whitespace changes
Inline
Side-by-side
actor.py
View file @
11c74940
...
...
@@ -44,8 +44,8 @@ class Actor:
def
__init__
(
self
,
i2c
):
self
.
_CMDs
=
{
Actor
.
CMD_UNLOCK
:
Actor
.
CMD
(
"unlock"
,
pin
=
Pin
(
0x21
,
3
),
tid
=
0
,
todo
=
[(
True
,
0.
3
),
(
False
,
0.1
)],
i2c
=
i2c
,
invert
=
True
),
Actor
.
CMD_LOCK
:
Actor
.
CMD
(
"lock"
,
pin
=
Pin
(
0x21
,
2
),
tid
=
0
,
todo
=
[(
True
,
0.
3
),
(
False
,
0.1
)],
i2c
=
i2c
,
invert
=
True
),
Actor
.
CMD_UNLOCK
:
Actor
.
CMD
(
"unlock"
,
pin
=
Pin
(
0x21
,
3
),
tid
=
0
,
todo
=
[(
True
,
0.
1
),
(
False
,
0.1
)],
i2c
=
i2c
,
invert
=
True
),
Actor
.
CMD_LOCK
:
Actor
.
CMD
(
"lock"
,
pin
=
Pin
(
0x21
,
2
),
tid
=
0
,
todo
=
[(
True
,
0.
1
),
(
False
,
0.1
)],
i2c
=
i2c
,
invert
=
True
),
Actor
.
CMD_BUZZ
:
Actor
.
CMD
(
"buzz"
,
pin
=
Pin
(
0x21
,
1
),
tid
=
1
,
todo
=
[(
True
,
2.5
),
(
False
,
0.1
)],
i2c
=
i2c
,
invert
=
False
),
}
# launch threads, all running the "_execute" method
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment