Too random, eh?

There are several solutions:
1. Modify the owfs source code
    module/owlib/src/c/fakeread.c
change
#define Random_f   (100.*Random)
to
#define Random_f   (10.+27.7*Random)
(My quick Celsius to Farhenheit conversion)
2. Filter the readings in your program with a calculation that moves the
random temperature reading to the correct range.
3. Hook up a real temperature chip.

The fake adapter is really simple-minded. We don't keep an internal model of
all the chips and reasonable emulation, but simply provide a random response
in the proper format.

Paul Alfille

On Sat, Mar 7, 2009 at 12:28 PM, Mike Zimmerman <m...@mkzimms.com> wrote:

> I'm using the owfs fake environment to do some testing on a annotated
> timeline of temperatures.  To setup the test environment ive run
>
>  /opt/owfs/bin/owfs --fake=01,10 /mnt/1-wire/ --allow_other -F
>
> is there anyway to set the limits on the values generated so I do not end
> up with, for example, a test value of 54.12 followed by a value of 251.13
> which really throws off the range on my graph.  Below i pasted a section of
> my dataset so you can see what i mean.  My program in the real world will
> only be dealing with ranges from 50 to 100, so i'd like to test with a more
> realistic dataset if possible.
>
> ID    tempdata               temptime          alert
> 12     112.5        2009-03-07 11:23:01.0    1
> 11     87.3          2009-03-07 11:22:01.0    0
> 10     173.5        2009-03-07 11:21:01.0    1
> 9       82.6          2009-03-07 11:20:01.0    0
> 8       143.5        2009-03-07 11:19:01.0    1
> 7        22.8         2009-03-07 11:18:01.0    1
> 6       147.4        2009-03-07 11:17:01.0    1
> 5       190.6        2009-03-07 11:16:01.0    1
> 4       58.6          2009-03-07 11:15:01.0    1
> 3      197.6         2009-03-07 11:14:01.0    1
> 2      203.0         2009-03-07 11:13:01.0    1
> 1      70.8           2009-03-07 11:12:01.0    0
>
>
> Mike
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to