Permalink
Browse files

some leds use values >1 for their boolean on value

  • Loading branch information...
1 parent 8b382fa commit b426aaac5b83b3a679a3c2f9e5fe728345a70702 @teleshoes committed Jan 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 led-controls/led
View
@@ -74,7 +74,7 @@ chomp $cur;
$brightness = 1 if lc $brightness eq 'on';
$brightness = 0 if lc $brightness eq 'off';
-$brightness = 1-$cur if lc $brightness eq 'toggle';
+$brightness = $cur == 0 ? 1 : 0 if lc $brightness eq 'toggle';
writeDev $brightness;

0 comments on commit b426aaa

Please sign in to comment.