Zsolt,
Thanks for the patches. Could you add an -a option to set it to auto mode
instead of using -s 0?
This is a good catch. The python hpifan version is based on the hpifan
(written in C) in OpenHPI proper. So this needs to be fixed there also.
If you look at the C version you'll see how the python version is about
half the lines of code!
Saludos,
--Renier
"Zsolt Haraszti" <[EMAIL PROTECTED]> wrote on 05/07/2007 03:28:58 AM:
> Renier,
>
> Thanks for making this much wanted Python wrapper available. I found
> 2 minor bugs (I think), to which I provide 2 separate patches.
>
> 1. One of the HPI utility print functions are left as #define in the
> SWIG file. This results in a run-time error when trying to use thus
> function (used, e.g., in the hpifan example). Making it a function
> declaration fixes the issue. See the 1st patch.
>
> 2. There are some typos in the hpifan example. After the fixes (see
> 2nd patch), it works great.
>
> There is also a minor functional issue with hpifan. Typically the
> fan speed on a chassis is running in auto mode. The current
> implementation of hpifan is such that it preserves the control mode,
> so it leaves it in the auto mode. In this mode the speed set by user
> has no effect. So it's kind of misleading to provide the -s option.
> I added a small change that makes the -s option work as follows:
> when a non-zero number is provided, it sets the fan control mode to
> manual and applies the requested speed. The auto mode can be
> regained by using the -s 0 special value. I admit it is not the most
> elegant, but it works well. For this I attach a 3rd patch, which
> also include the 2nd patch's content, so only one of the two should
> be applied.
>
> I hope you find these useful,
> Zsolt Haraszti
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel