base-files: gpio switch: fix inverted logic
GPIOs are exported as active high to the sysfs, hence the logic need to be inverted. Fixes: e66c47fb14f5 ("base-files: gpio switch: set output value with direction") Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
parent
1ca4f8ca1c
commit
f476c9a745
@ -24,7 +24,7 @@ load_gpio_switch()
|
|||||||
[ -d "$gpio_path" ] || sleep 1
|
[ -d "$gpio_path" ] || sleep 1
|
||||||
}
|
}
|
||||||
# set the pin to output with high or low pin value
|
# set the pin to output with high or low pin value
|
||||||
{ [ "$value" = "0" ] && echo "high" || echo "low"; } >"$gpio_path/direction"
|
{ [ "$value" = "0" ] && echo "low" || echo "high"; } >"$gpio_path/direction"
|
||||||
}
|
}
|
||||||
|
|
||||||
service_triggers()
|
service_triggers()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user