Browse Source

Add exponential mode in the README

Alexander Lutsai 3 years ago
parent
commit
cb69642b41
2 changed files with 6 additions and 1 deletions
  1. 5
    0
      README.md
  2. 1
    1
      src/light.c

+ 5
- 0
README.md View File

54
 
54
 
55
     light -A 5
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
 Set the minimum cap to 2 in raw value on the sysfs/backlight/acpi_video0 device:
61
 Set the minimum cap to 2 in raw value on the sysfs/backlight/acpi_video0 device:
58
 
62
 
59
     light -Nrs "sysfs/backlight/acpi_video0" 2
63
     light -Nrs "sysfs/backlight/acpi_video0" 2
100
 These can be mixed, combined and matched after convenience. 
104
 These can be mixed, combined and matched after convenience. 
101
 
105
 
102
 * `-r` Raw mode, values (printed and interpreted from commandline) will be treated as integers in the controllers native range, instead of in percent.
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
 * `-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.
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
 * `-s <devicepath>` Specifies which device to work on. List available devices with the -L command. Full path is needed.
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 View File

403
                 return false;
403
                 return false;
404
             }
404
             }
405
             
405
             
406
-            percent_value = light_percent_clamp(percent_value);                        
406
+            percent_value = light_percent_clamp(percent_value);
407
             need_float_value = true;
407
             need_float_value = true;
408
         }
408
         }
409
     }
409
     }