Two thermistor tables included:
ThermistorTable.h.dist.old, which is the table we used to have, included so those already using it don't have to recalibrate.
ThermistorTable.h.dist, which was generated with 50 entries, and trimmed down in lower temperature ranges where we don't care as much about accuracy and there's less deviation from a straight line anyway.
Corrected default temp sensor entry in config.h.dist to thermistor instead of intercom. (Now matches earlier definitions which by default say we're using a thermistor)
Added noheater sensor example to config.h.dist
Copied CreateTemperatureLook.py from "official" firmware, and modified it for 14.2 fixed point, no negative temperatures (we're using uint16_t's), and PROGMEM.
Since I simply copied the example linear interpolation formula from wikipedia, I'm certian that it could be more efficient. The code that was there wouldn't work with 14.2 table values, and my understanding of it was too shallow to fix it. This works, and upgading the calculations to uint32_t actually takes less code space than leaving them at uint16_t. I assume it's calling a library routine that's already being linked in for the 32-bit math.
The old implementation with an overflow interrupt for the clock and a comparator interrupt for stepping, had an unsolvable bug: If the comparator interrupt should happen very shortly after the overflow interrupt the comparator interrupt would miss. And with 2 comparators the implementation is more straightforward.
Which includes a seperate file (graycode.c) with the defines and additional variable declaration.
I went with the "graycode" spelling, as there's about ten times as many hits for that as for "greycode" on google. I've read that both spellings are acceptable, but whatever.
Signed-off-by: Michael Moon <triffid.hunter@gmail.com>