Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Penguidom
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
domotika
Penguidom
Commits
a3197384
Commit
a3197384
authored
7 years ago
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize serial port communication
parent
981f368f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
paradox.py
penguidom/plugins/paradox/paradox.py
+13
-0
No files found.
penguidom/plugins/paradox/paradox.py
View file @
a3197384
...
...
@@ -2,6 +2,15 @@ from penguidom import imodules
from
zope.interface
import
implements
from
twisted.plugin
import
IPlugin
from
twisted.internet.serialport
import
SerialPort
from
twisted.protocols.basic
import
LineReceiver
from
twisted.internet
import
reactor
class
ParadoxProtocol
(
LineReceiver
):
def
lineReceived
(
self
,
line
):
print
line
class
Paradox
(
object
):
...
...
@@ -10,4 +19,8 @@ class Paradox(object):
def
initialize
(
self
,
callback
,
logger
):
self
.
log
=
logger
self
.
core
=
callback
self
.
port
=
SerialPort
(
ParadoxProtocol
(),
'/dev/ttyUSB0'
,
reactor
)
logger
.
info
(
"Plugin initialized"
)
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
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