View previous topic :: View next topic |
Author |
Message |
chrisale
Joined: 09 Nov 2005 Posts: 187
|
Posted: Sat Dec 03, 2005 8:03 pm Post subject: User defined Metric images |
|
|
How do I go about making user-defined images metric? Do I add it to the images-metric.conf file?
Or make a new images-metric-user.conf file? |
|
Back to top |
|
|
mteel
Joined: 30 Jun 2005 Posts: 435 Location: Collinsville, TX
|
Posted: Sat Dec 03, 2005 10:10 pm Post subject: |
|
|
I don't understand the question...
If you want to create a user defined image, put the code in images-user.c and list the image (and index number) in images-user.conf. It's up to you in the code to make it "metric". |
|
Back to top |
|
|
chrisale
Joined: 09 Nov 2005 Posts: 187
|
Posted: Sun Dec 04, 2005 4:50 pm Post subject: |
|
|
Ah, ok.
I activated the Intemp.png bucket to get the inside temperature and noticed it was in Farenheit... so I thought maybe there was a way to either add it to the images-metric.conf file, or add a user defined file to convert the images-user.conf to metric. |
|
Back to top |
|
|
mteel
Joined: 30 Jun 2005 Posts: 435 Location: Collinsville, TX
|
Posted: Sun Dec 04, 2005 5:23 pm Post subject: |
|
|
If you look in that intemp bucket generator example in images-user.c, you see that it is passing the value, high and low directly without checking to see if the system is metric. But the metric flag is available in the img pointer (passed to htmlGenPngBucket) and you could test that and do the metric conversion there before passing it to htmlGenPngBucket.
This was an example generator to demo how to create your own generators and was put there before wview even supported metric units. |
|
Back to top |
|
|
chrisale
Joined: 09 Nov 2005 Posts: 187
|
Posted: Sun Dec 04, 2005 9:44 pm Post subject: |
|
|
ok cool thanks |
|
Back to top |
|
|
chrisale
Joined: 09 Nov 2005 Posts: 187
|
Posted: Thu Dec 08, 2005 4:07 pm Post subject: |
|
|
not to be a pain in the bu-cket
but, my limited C coding skills are failing me. I'm looking for a way to create an indoor, combined, humidity and temperature graph, but either I'm doing something wrong or maybe there are no "hi/lo" stored values for inside temp and humidity?
Could you maybe provide an example of how to create a graph in images-user? |
|
Back to top |
|
|
mteel
Joined: 30 Jun 2005 Posts: 435 Location: Collinsville, TX
|
Posted: Thu Dec 08, 2005 4:31 pm Post subject: |
|
|
First, you won't need a HI and LOW value for a graph (chart), only for a bucket.
Second, see the struct "HILOW_PKT" in common /datadefs.h - there are your HI LOW inside values.
There are a "bucket" load of examples - they live in images.c. There is one in there for composite temperature/dewpoint (better than humidity).
Besides, I already provided an inside temp/humidity chart for day and month (see the release notes). What do you want?
http://www.weather.teel.ws/intempdaycomp.png
Finally, I do not have time to implement every single whimsical desire. There is ample examples and documentation in the code for someone wanting some strange chart.
Again, I've already implemented what I think you are describing. The example in images-user.c is for a bucket, not a chart. |
|
Back to top |
|
|
|