fix polarity
diff --git a/objects/led_controller.c b/objects/led_controller.c
index e11119f..29698fe 100644
--- a/objects/led_controller.c
+++ b/objects/led_controller.c
@@ -22,14 +22,14 @@
GDBusMethodInvocation *invocation,
gpointer user_data)
{
- printf("Turn on chassis identify led\n");
GPIO* mygpio = (GPIO*)user_data;
+ g_print("Turn on LED: %s\n",mygpio->name);
led_complete_set_on(led,invocation);
int rc = GPIO_OK;
do {
rc = gpio_open(mygpio);
if (rc != GPIO_OK) { break; }
- rc = gpio_write(mygpio,1);
+ rc = gpio_write(mygpio,0);
if (rc != GPIO_OK) { break; }
} while(0);
gpio_close(mygpio);
@@ -47,14 +47,14 @@
GDBusMethodInvocation *invocation,
gpointer user_data)
{
- g_print("Turn off chassis identify led\n");
GPIO* mygpio = (GPIO*)user_data;
+ g_print("Turn off LED: %s\n",mygpio->name);
led_complete_set_off(led,invocation);
int rc = GPIO_OK;
do {
rc = gpio_open(mygpio);
if (rc != GPIO_OK) { break; }
- rc = gpio_write(mygpio,0);
+ rc = gpio_write(mygpio,1);
if (rc != GPIO_OK) { break; }
} while(0);
gpio_close(mygpio);