aboutsummaryrefslogtreecommitdiff
path: root/brightness_ctrl.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2018-07-11 15:56:07 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2018-07-11 15:56:07 +0800
commite5aac499a8a2026af5d5176f45be3ac2576d75cc (patch)
tree0a8650bc69c21b6bad8f428f8f21fb70b08d2d80 /brightness_ctrl.cpp
parent0e023a454381cb53147d5394d2de76b79e0816e7 (diff)
downloadlightsd-e5aac499a8a2026af5d5176f45be3ac2576d75cc.tar.xz
Remove profanity.
Reset the iio device buffer before using it.
Diffstat (limited to 'brightness_ctrl.cpp')
-rw-r--r--brightness_ctrl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/brightness_ctrl.cpp b/brightness_ctrl.cpp
index 21c54e7..d83b4cf 100644
--- a/brightness_ctrl.cpp
+++ b/brightness_ctrl.cpp
@@ -70,10 +70,9 @@ void BrightnessControl::set_frozen(bool frozen)
int BrightnessControl::get_offset(){return offset;}
int BrightnessControl::get_brightness()
{
- //FIXME??: On some devices there are EC-controlled key combinations
+ //On some devices there are EC-controlled key combinations
//that bypasses lightsd entirely (e.g. Fn+Space on ThinkPad for
- //keyboard backlight). So we may have to turn to sysfs for this...
- //Screw it, just read from sysfs.
+ //keyboard backlight). So we have to turn to sysfs for the real value...
if(brpath.empty())return 0;
return round(readint(brpath.c_str())*100./maxbr);
}