[Lcdproc] imonlcd 0x0 command turning off progress bar
Eric Pooch
epooch at cox.net
Mon Oct 17 19:16:34 UTC 2011
Here is the patch to fix the issues raise by Yura.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imonlcd_output_allon.patch
Type: application/octet-stream
Size: 1615 bytes
Desc: not available
URL: <http://lists.omnipotent.net/pipermail/lcdproc/attachments/20111017/cb632aa7/attachment.obj>
-------------- next part --------------
I noticed a few things:
1) The IMON_OUTPUT_PBARS_MASK captures an output value of -1 because
of the binary value of negative numbers. I don't think this was
expected in the previous version and resulted in not all of the icons
coming on.
2) an output value of -1 includes the CD spinning bit, so the driver
would continue to send commands to set the icons even if nothing was
changing. I accounted for that in the cache check:
if (state == p->last_output_state && !(state != -1 && (state &
IMON_OUTPUT_CD_MASK)))
3)The left-most bar on the top and bottom does not light up due to a
pre-existing bug . I will have a patch for that shortly.
--Eric
On Oct 16, 2011, at 10:06 AM, Yura Scheglyuk wrote:
> Hi!
>
> On 16.10.2011 15:36, Markus Dolze wrote:
>
>>> Now imonlcd driver assuming that 0x0 clear icons only. The simple
>>> solution is to modify driver that on 0x0 command it should clear the
>>> bar state too.
>>
>> Currently there are two options:
>>
>> 1. '-1' will turn all icons _and_ bars on. '0x0' will turn all
>> icons
>> _and_ bars off.
>> 2. '-1' will _not_ turn on the bars and '0x0' will _not_ turn
>> them off.
>>
>> 1.) This Is current behavior and has not been changed since 0.5.4.
>> The
>> bug is that bars do not turn on again after '0x0' if the same bar
>> state
>> is sent again. This will be easy to fix.
>>
>> 2.) This is a change in the meaning of '-1' and '0x0' and will
>> require
>> applications to be updated to additionally set and clear the bars.
>>
>> I suggest to stay with 1.) and to just reset the
>> last_output_bar_state
>> upon '-1' or '0x0'.
>
> Yes, I think option 1 is more preferable.
>
> --
> Best regards, Yura.
> _______________________________________________
> LCDproc mailing list
> LCDproc at lists.omnipotent.net
> http://lists.omnipotent.net/mailman/listinfo/lcdproc
More information about the LCDproc
mailing list