Re: [Lxde-list] Using /sys over /proc in lxpanel

On 23.12.2011 21:59, Henry Gebhardt wrote:
> On Fri, Dec 23, 2011 at 08:09:24PM +0100, Henry Gebhardt wrote:
>> On Fri, Dec 23, 2011 at 06:51:28AM +0200, Jakob Lundberg wrote:
>>> Hi,
>>>
>>> I made a smal patch for this that maybe could be used as a starting point.
>>> But it does not include a fallback as Julien suggests.
>>> The patch ID is 3354176
>>>
>>> http://sourceforge.net/tracker/?func=detail&aid=3354176&group_id=180858&atid=894871
>>
>> Nice! I just had to disable "Automatic sensor location", as the
>> check_sensor() function would try to use
>> /sys/class/thermal/thermal_zone0/uevent.
>>
>> In order to support different interfaces perhaps one could duplicate the
>> get_temperature() and get_critical() functions, one for each interface,
>> and record in the 'struct thermal' which one is used. What do you think?
>
> In fact, I just did this based on your patch, see attachment. I couldn't
> test the /proc interface. Comments welcome. Should I post this to the
> SourceForge tracker?
>
>
> Henry
Looks great! Good work.
I just hope we could get it committed and someone would push out a new release of lxpanel.
Jakob

On Fri, Dec 23, 2011 at 06:51:28AM +0200, Jakob Lundberg wrote:
> Hi,
>
> I made a smal patch for this that maybe could be used as a starting point.
> But it does not include a fallback as Julien suggests.
> The patch ID is 3354176
>
> http://sourceforge.net/tracker/?func=detail&aid=3354176&group_id=180858&atid=894871
Nice! I just had to disable "Automatic sensor location", as the
check_sensor() function would try to use
/sys/class/thermal/thermal_zone0/uevent.
In order to support different interfaces perhaps one could duplicate the
get_temperature() and get_critical() functions, one for each interface,
and record in the 'struct thermal' which one is used. What do you think?
Henry

On Fri, Dec 23, 2011 at 08:09:24PM +0100, Henry Gebhardt wrote:
> On Fri, Dec 23, 2011 at 06:51:28AM +0200, Jakob Lundberg wrote:
> > Hi,
> >
> > I made a smal patch for this that maybe could be used as a starting point.
> > But it does not include a fallback as Julien suggests.
> > The patch ID is 3354176
> >
> > http://sourceforge.net/tracker/?func=detail&aid=3354176&group_id=180858&atid=894871
>
> Nice! I just had to disable "Automatic sensor location", as the
> check_sensor() function would try to use
> /sys/class/thermal/thermal_zone0/uevent.
>
> In order to support different interfaces perhaps one could duplicate the
> get_temperature() and get_critical() functions, one for each interface,
> and record in the 'struct thermal' which one is used. What do you think?
In fact, I just did this based on your patch, see attachment. I couldn't
test the /proc interface. Comments welcome. Should I post this to the
SourceForge tracker?
Henry

On 23.12.2011 21:59, Henry Gebhardt wrote:
> On Fri, Dec 23, 2011 at 08:09:24PM +0100, Henry Gebhardt wrote:
>> On Fri, Dec 23, 2011 at 06:51:28AM +0200, Jakob Lundberg wrote:
>>> Hi,
>>>
>>> I made a smal patch for this that maybe could be used as a starting point.
>>> But it does not include a fallback as Julien suggests.
>>> The patch ID is 3354176
>>>
>>> http://sourceforge.net/tracker/?func=detail&aid=3354176&group_id=180858&atid=894871
>>
>> Nice! I just had to disable "Automatic sensor location", as the
>> check_sensor() function would try to use
>> /sys/class/thermal/thermal_zone0/uevent.
>>
>> In order to support different interfaces perhaps one could duplicate the
>> get_temperature() and get_critical() functions, one for each interface,
>> and record in the 'struct thermal' which one is used. What do you think?
>
> In fact, I just did this based on your patch, see attachment. I couldn't
> test the /proc interface. Comments welcome. Should I post this to the
> SourceForge tracker?
>
>
> Henry
Looks great! Good work.
I just hope we could get it committed and someone would push out a new release of lxpanel.
Jakob