Commit ee6b6bc3 authored by Ivan Tyagov's avatar Ivan Tyagov

Set actual value.

See merge request !26
parents 17409606 f23ac251
...@@ -56,6 +56,8 @@ static int setGPIO() { ...@@ -56,6 +56,8 @@ static int setGPIO() {
if (CURRENT_GPIO_STATE) CURRENT_GPIO_STATE = 0; if (CURRENT_GPIO_STATE) CURRENT_GPIO_STATE = 0;
else CURRENT_GPIO_STATE = 1; else CURRENT_GPIO_STATE = 1;
// set actual GPI value
data.values[0] = CURRENT_GPIO_STATE;
if(ioctl(led.fd, GPIOHANDLE_SET_LINE_VALUES_IOCTL, &data) < 0) if(ioctl(led.fd, GPIOHANDLE_SET_LINE_VALUES_IOCTL, &data) < 0)
perror("Error setting GPIO to 1"); perror("Error setting GPIO to 1");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment