Skip to content
Snippets Groups Projects
Commit 7fde7152 authored by jkerdreu's avatar jkerdreu
Browse files

0.7 port (turn/on/off)



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2564 b32b6428-25c9-4566-ad07-03861ab6144f
parent 3427dd63
No related branches found
No related tags found
No related merge requests found
...@@ -58,10 +58,10 @@ def search_for_light(lamps): ...@@ -58,10 +58,10 @@ def search_for_light(lamps):
def on_off_light(lamps): def on_off_light(lamps):
if search_for_light(lamps): if search_for_light(lamps):
send(lamps,'off') send(lamps,'turn_off')
return False return False
else: else:
send(lamps,'on') send(lamps,'turn_on')
return True return True
def handle_msg(msg): def handle_msg(msg):
...@@ -96,15 +96,15 @@ def handle_msg(msg): ...@@ -96,15 +96,15 @@ def handle_msg(msg):
if msg.source == SCEN[0]: if msg.source == SCEN[0]:
# "soirée TV" # "soirée TV"
send([SHUTERS[0]],'down') send([SHUTERS[0]],'down')
send(LAMPS,'off') send(LAMPS,'turn_off')
send(SPOTS,'on') send(SPOTS,'turn_on')
send([SHUTERS[1]],'down') send([SHUTERS[1]],'down')
if msg.source == SCEN[1]: if msg.source == SCEN[1]:
# "Début journée" # "Début journée"
send([SHUTERS[0]],'up') send([SHUTERS[0]],'up')
send([LAMPS[3],],'on') send([LAMPS[3],],'turn_on')
send(SPOTS,'off') send(SPOTS,'turn_off')
send([SHUTERS[1]],'up') send([SHUTERS[1]],'up')
if msg.source == SCEN[2]: if msg.source == SCEN[2]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment