[Lcdproc] Xoxide PC Tach
RJ Marquette
rj@rjmarq.org
Tue Jan 2 23:01:01 2007
Okay, this may seem an odd place to ask this, but I have a good reason...
First, I have the PC Tachometer from xoxide.com
(http://www.xoxide.com/pctachometer1.html) - with the included Windows
driver, the tach revs up as your system load increases. Fun, geeky stuff,
especially since I'm also a bit of an auto enthusiast. I've written a
proof-of-concept program (http://rjmarq.org/pctach/drivetach.cpp) that
drives the tach based on the 1-minute average system load. It seems to
work pretty well, but I'm not a programmer, as will likely be obvious by
anyone looking at the code (note most of the code was an example program
that came with LibSerial - I'm sure you'll see the difference between that
and my hacking).
After writing the above program, I realized the tach could display just
about any variable that can be expressed as a percentage: CPU load, disk
space, network load, etc. Then I remembered that LCDProc already has
sensors available for all of that and plenty more. :)
I've figured out the method and mathematics of taking some value and
making the tach read whatever. What I was thinking was that all the tach
output driver would need as input is a single number, such as a percent.
It would do some math (two lines of code), then send the letter "z" to the
serial port repeatedly, with a calculated delay value between each one
(the result of the math).
I downloaded the LCDproc code and took a look to see if I could figure out
whether such code would fit in the architecture of LCDproc. It looks like
the individual sensor programs (such as batt.c, for example) send the
actual data they want to display to the server, rather than just numbers
(which makes sense now that I think about it) - so maybe my idea of using
the lcdproc server as a backend isn't going to work as easily as I'd
hoped.
Any thoughts or comments on this? Do I understand the LCDproc
architecture correctly? (If nothing else, I can reuse things like cpu.c
by modifying it to only give the server a number, then modify the lcdproc
server to drive the tach - still more work than I was hoping for, but not
reinventing the wheel...)
Thanks.
--RJ
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
RJ Marquette RSA:448B035F DSS:CB45C555
http://rjmarq.org