From e5aac499a8a2026af5d5176f45be3ac2576d75cc Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 11 Jul 2018 15:56:07 +0800 Subject: Remove profanity. Reset the iio device buffer before using it. --- brightness_ctrl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'brightness_ctrl.cpp') 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); } -- cgit v1.2.3