aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmccrohan <jmccrohan@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2017-05-27 17:37:05 +0000
committerjmccrohan <jmccrohan@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2017-05-27 17:37:05 +0000
commitcb69a93a4501b2a58e1f991c953b3c58d6ceeb67 (patch)
tree94aa584f67a541435d06f0f375e40f2f0e5f9ff6
parent4e055ed9cbda058f02f81571cc31e4cd6ef9afc2 (diff)
downloadlcd4linux-cb69a93a4501b2a58e1f991c953b3c58d6ceeb67.tar.gz
picoLCDGraphic: change backlight from bool to byteHEADtrunkmaster
Based on patch submitted by Mike Edwards <pf-debian-bugs@mirkwood.net> to Debian Bug #861993 (https://bugs.debian.org/861993). See excerpt from bug report below. ----------------------------------------- Dear Maintainer, Using driver 'picoLCDGraphic' in lcd4linux.conf, backlight can only be set to 0 or 1 (off/on). While the backlight of the picolcd is on at boot, the moment lcd4linux starts, the backlight turns off with either setting. Looking at the source for the driver, I found that somewhere along the line, the function to set the backlight had been changed to use an 8 bit value from 0 - 255, effectively making this a brightness setting: static int drv_pLG_backlight(int backlight) { unsigned char cmd[2] = { 0x91 }; /* set backlight */ if (backlight < 0) backlight = 0; if (backlight > 255) backlight = 255; cmd[1] = backlight; drv_pLG_send(cmd, 2); return backlight; } ... but the config option for backlight was still limited to only accepting a 0 or 1: if (cfg_number(section, "Backlight", 0, 0, 1, &value) > 0) { info("Setting backlight to %d", value); drv_pLG_backlight(value); } I've patched that if statement above to accept values between 0 and 255. Now, setting the config option for backlight to 255 in lcd4linux.conf does result in the backlight being turned on at full brightness. ----------------------------------------- Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1204 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r--drv_picoLCDGraphic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drv_picoLCDGraphic.c b/drv_picoLCDGraphic.c
index fa7e15b..1bbb4fa 100644
--- a/drv_picoLCDGraphic.c
+++ b/drv_picoLCDGraphic.c
@@ -539,7 +539,7 @@ static int drv_pLG_start(const char *section, const int quiet)
drv_pLG_contrast(value);
}
- if (cfg_number(section, "Backlight", 0, 0, 1, &value) > 0) {
+ if (cfg_number(section, "Backlight", 0, 0, 255, &value) > 0) {
info("Setting backlight to %d", value);
drv_pLG_backlight(value);
}
ogmsg'> Framework for bar widget opened git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@320 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-18[lcd4linux @ 2004-01-18 09:01:45 by reinelt]reinelt5-61/+220 /proc/stat parsing finished git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@319 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-18[lcd4linux @ 2004-01-18 06:54:08 by reinelt]reinelt4-27/+76 bug in expr.c fixed (thanks to Xavier) some progress with /proc/stat parsing git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@318 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-16[lcd4linux @ 2004-01-16 11:12:26 by reinelt]reinelt4-49/+128 some bugs in plugin_xmms fixed, parsing moved to own function plugin_proc_stat nearly finished git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@317 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-16[lcd4linux @ 2004-01-16 10:09:49 by mkeil]mkeil1-12/+29 -include caching for values git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@316 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-16[lcd4linux @ 2004-01-16 07:26:25 by reinelt]reinelt5-196/+146 moved various /proc parsing to own functions made some progress with /proc/stat parsing git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@315 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-16[lcd4linux @ 2004-01-16 05:04:53 by reinelt]reinelt10-32/+326 started plugin proc_stat which should parse /proc/stat which again is a paint in the a** thinking over implementation methods of delta functions (CPU load, ...) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@314 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-15[lcd4linux @ 2004-01-15 07:47:02 by reinelt]reinelt7-100/+210 debian/ postinst and watch added (did CVS forget about them?) evaluator: conditional expressions (a?b:c) added text widget nearly finished git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@313 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-15[lcd4linux @ 2004-01-15 04:32:14 by reinelt]reinelt1-0/+101 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@312 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-15[lcd4linux @ 2004-01-15 04:29:45 by reinelt]reinelt10-335/+719 moved lcd4linux.conf.sample to *.old lcd4linux.conf.sample with new layout new plugins 'loadavg' and 'meminfo' text widget have pre- and postfix git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@311 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-14[lcd4linux @ 2004-01-14 11:33:00 by reinelt]reinelt15-160/+607 new plugin 'uname' which does what it's called text widget nearly finished first results displayed on MatrixOrbital git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@310 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-13[lcd4linux @ 2004-01-13 10:03:01 by reinelt]reinelt8-23/+458 new util 'hash' for associative arrays new plugin 'cpuinfo' git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@309 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-13[lcd4linux @ 2004-01-13 08:18:07 by reinelt]reinelt12-154/+469 timer queues added liblcd4linux deactivated turing transformation to new layout git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@308 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-12[lcd4linux @ 2004-01-12 03:51:01 by reinelt]reinelt5-15/+44 evaluating the 'Variables' section in the config file git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@307 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-11[lcd4linux @ 2004-01-11 18:26:02 by reinelt]reinelt10-79/+158 further widget and layout processing git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@306 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-11[lcd4linux @ 2004-01-11 09:26:15 by reinelt]reinelt4-19/+67 layout starts to exist... git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@305 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 20:22:33 by reinelt]reinelt13-210/+554 added new function 'cfg_list()' (not finished yet) added layout.c (will replace processor.c someday) added widget_text.c (will be the first and most important widget) modified lcd4linux.c so that old-style configs should work, too git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@304 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 17:45:26 by reinelt]reinelt2-5/+15 changed initialization order so cfg() gets initialized before plugins. This way a plugin's init() can use cfg_get(). Thanks to Xavier for reporting this one! git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@303 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 17:36:56 by reinelt]reinelt4-10/+207 I2C Sensors plugin from Xavier added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@302 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 17:34:40 by reinelt]reinelt3-176/+138 further matrixOrbital changes widgets initialized git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@301 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-10[lcd4linux @ 2004-01-10 10:20:22 by reinelt]reinelt2-14/+605 new MatrixOrbital changes git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@300 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-09[lcd4linux @ 2004-01-09 17:03:06 by reinelt]reinelt10-51/+420 initiated transfer to new driver architecture new file 'drv.c' will someday replace 'display.c' new file 'drv_MatrixOrbital.c' will replace 'MatrixOrbital.c' due to this 'soft' transfer lcd4linux should stay usable during the switch (at least I hope so) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@299 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-09[lcd4linux @ 2004-01-09 04:16:06 by reinelt]reinelt28-193/+332 added 'section' argument to cfg_get(), but NULLed it on all calls by now. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@298 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-08[lcd4linux @ 2004-01-08 06:00:28 by reinelt]reinelt1-8/+14 allowed '.' in key names allowed empty group keys (not only "group anything {", but "anything {") git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@297 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-08[lcd4linux @ 2004-01-08 05:28:12 by reinelt]reinelt3-42/+198 Luk Claes added to AUTHORS cfg: group handling ('{}') added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@296 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-07[lcd4linux @ 2004-01-07 10:15:41 by reinelt]reinelt4-184/+436 small glitch in evaluator fixed made config table sorted and access with bsearch(), which should be much faster git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@295 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 23:01:37 by reinelt]reinelt3-4/+7 more copyright issues git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@294 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 22:33:13 by reinelt]reinelt14-472/+542 Copyright statements cleaned up git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@293 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 21:14:51 by reinelt]reinelt4-14/+7 more debianizing git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@292 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 18:22:41 by reinelt]reinelt1-3/+13 debian updates git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@291 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 17:56:43 by reinelt]reinelt3-1000/+2045 autotools update git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@290 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 17:37:00 by reinelt]reinelt1-0/+20 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@289 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 17:33:45 by reinelt]reinelt6-28/+298 Evaluator: functions with variable argument lists Evaluator: plugin_sample.c and README.Plugins added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@288 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-06[lcd4linux @ 2004-01-06 15:19:12 by reinelt]reinelt2-104/+136 Evaluator rearrangements... git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@287 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-05[lcd4linux @ 2004-01-05 11:57:38 by reinelt]reinelt7-8/+168 added %y tokens to make the Evaluator useable git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@286 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-02[lcd4linux @ 2004-01-02 14:20:15 by reinelt]reinelt10-0/+201 debianization added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@285 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2004-01-02[lcd4linux @ 2004-01-02 14:18:54 by reinelt]reinelt2-0/+101 Changelog, TODO updated git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@284 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2003-12-19[lcd4linux @ 2003-12-19 06:27:33 by reinelt]reinelt4-8/+119 added XMMS plugin from Markus Keil git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@283 3ae390bd-cb1e-0410-b409-cd5a39f66f1f