From 8cdf981c8faf3e6e8c0f94783aeeee4619780023 Mon Sep 17 00:00:00 2001 From: harald42 Date: Wed, 27 Mar 2013 10:41:19 +0100 Subject: [PATCH] add debug led code --- examples/osd/light-actor/er-example-server.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/osd/light-actor/er-example-server.c b/examples/osd/light-actor/er-example-server.c index 9724b91ae..f3aca511f 100644 --- a/examples/osd/light-actor/er-example-server.c +++ b/examples/osd/light-actor/er-example-server.c @@ -179,9 +179,12 @@ led1_handler(void* request, void* response, uint8_t *buffer, uint16_t preferred_ if (!strcmp(mode, "on")) { led1_on(); led1 = 1; + optriac_sensor.configure(OPTRIAC_SENSOR_A,1); + } else if (!strcmp(mode, "off")) { led1_off(); led1 = 0; + optriac_sensor.configure(OPTRIAC_SENSOR_A,0); } else { success = 0; } @@ -266,9 +269,9 @@ optriac_handler(void* request, void* response, uint8_t *buffer, uint16_t preferr if (strncmp(type, "a", len)==0) { triac = OPTRIAC_SENSOR_A; } else if(strncmp(type,"b", len)==0) { - triac = OPTRIAC_SENSOR_A; + triac = OPTRIAC_SENSOR_B; } else { - success = 0; + triac = OPTRIAC_SENSOR_A; } } else { success = 0; @@ -279,8 +282,12 @@ optriac_handler(void* request, void* response, uint8_t *buffer, uint16_t preferr if (strncmp(mode, "on", len)==0) { optriac_sensor.configure(triac,1); + led1_on(); + led1 = 1; } else if (strncmp(mode, "off", len)==0) { optriac_sensor.configure(triac,1); + led1_off(); + led1 = 0; } else { success = 0; }