Phil Hord
Phil Hord
If you're looking for speed from the temp table, a binary search would be an obvious first step. The current linear search is needlessly slow most of the time.
In the optimized sample set, 200C appears after 15 samples. But a binary search will consider only 5 samples. I don't think this is a good optimization to consider. The...
These latest commits fix the misplaced-comma bug and include the optimization for the Reinhart-Hart algorithm, too. I don't have any examples of valid Reinhart values to try, but I'm reasonably...
I was thinking of precalculating the deltas also but it will break everyone's existing temperature tables if we implement that in the code unless we do it in a separate...
Which not everyone uses.
Old code reading new tables (3-values wide) is not a problem. New code reading old tables (2-values wide) could be a problem. But it could be mitigated with clever #if's....
Something like this, perhaps. df3d827a361075a976c3c98767db001dc3f008df I've only tested this in the simulator so far. But the simulator is now able to report the calculated temperatures for every ADC value, and...
And this change includes the binary search optimizer.
Heh. I had "if ... sizeof" too but I didn't want the code to be bloated with two algorithms. It didn't occur to me to check if the compiler would...
@wsowa Interesting and unexpected side-effect of zero-filled array padding. Thanks for the detailed analysis. Using a structure is the right way forward, but doesn't solve the problem of zero-filling omitted...