Skip to content

Commit

Permalink
Add send_shape method
Browse files Browse the repository at this point in the history
  • Loading branch information
lekeno authored and inorton committed May 2, 2018
1 parent bea0211 commit e0e3924
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions edmcoverlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,35 @@ def send_message(self, msgid, text, color, x, y, ttl=4, size="normal"):
"x": x, "y": y,
"ttl": ttl}
self.send_raw(msg)

def send_shape(self, shapeid, shape, color, fill, x, y, w, h, ttl):
"""
Send a shape
:param shapeid:
:param shape:
:param color:
:param fill:
:param x:
:param y:
:param w:
:param h:
:param ttl:
:return:
"""
if not self.connection:
ensure_service()
self.connect()

msg = {"id": shapeid,
"shape": shape,
"color": color,
"fill": fill,
"x": x, "y": y,
"w": w, "h": h,
"ttl": ttl
}
self.send_raw(msg)



def debugconsole():
Expand Down

0 comments on commit e0e3924

Please sign in to comment.