소스 검색

Add exponential mode in the README

Alexander Lutsai 4 년 전
부모
커밋
cb69642b41
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 5
    0
      README.md
  2. 1
    1
      src/light.c

+ 5
- 0
README.md 파일 보기

@@ -54,6 +54,10 @@ Increase backlight brightness by 5 percent
54 54
 
55 55
     light -A 5
56 56
 
57
+Decrease backlight brightness by 5 percent in exponential mode (natural way)
58
+
59
+    light -e -U 5
60
+
57 61
 Set the minimum cap to 2 in raw value on the sysfs/backlight/acpi_video0 device:
58 62
 
59 63
     light -Nrs "sysfs/backlight/acpi_video0" 2
@@ -100,6 +104,7 @@ Without any extra options, the command will operate on the device called `sysfs/
100 104
 These can be mixed, combined and matched after convenience. 
101 105
 
102 106
 * `-r` Raw mode, values (printed and interpreted from commandline) will be treated as integers in the controllers native range, instead of in percent.
107
+* `-e` Exponential mode, values (printed and interpreted from commandline) will be treated as double percentage between 0.0 - 100.0 in the logarithmic scale with base 4.
103 108
 * `-v <verbosity>` Specifies the verbosity level. 0 is default and prints nothing. 1 prints only errors, 2 prints only errors and warnings, and 3 prints both errors, warnings and notices.
104 109
 * `-s <devicepath>` Specifies which device to work on. List available devices with the -L command. Full path is needed.
105 110
 

+ 1
- 1
src/light.c 파일 보기

@@ -403,7 +403,7 @@ static bool _light_parse_arguments(light_context_t *ctx, int argc, char** argv)
403 403
                 return false;
404 404
             }
405 405
             
406
-            percent_value = light_percent_clamp(percent_value);                        
406
+            percent_value = light_percent_clamp(percent_value);
407 407
             need_float_value = true;
408 408
         }
409 409
     }