Re: imonlcd 0x0 command turning off progress bar

Markus Dolze <[email protected]>
Newsgroups gmane.comp.sysutils.lcdproc
Message-ID <[email protected]>
Hi,

OK - as there was no feedback I assume everybody is happy with this
patch and will commit it soon.

I will also update the pre-release with it as 0.5.5-pre2.

Regards,
Markus


On 17.10.2011 21:16, Eric Pooch wrote:
> Here is the patch to fix the issues raise by Yura.  
> 
> 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
>> [email protected]
>> http://lists.omnipotent.net/mailman/listinfo/lcdproc
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.