Add PID functional range setting. With high powered heaters the current functional range of 10 degrees causes high overshoots as the PID needs to kick in before the temperature hits 10 degrees below target.
Fix the sensitive pin definitions, there where analogue numbers in the digital pin list. Also made M42 without a P function on the LED_PIN (which was otherwise a useless pin definition)
Big temperature code update. No longer converts back and forwards between temperature and raw sample value. Reducing complexity, removing code. Also named some variables better. While keeping the safety intact and functionality the same.
Fix the WATCHPERIOD implementation. It did not work correctly in a multi extruder setup, it did not work after 32 seconds after startup (int16 used as millies timestamp). And it did not work if you gave an M104 or M109 when the target was already around the target setpoint. So on average, it did not work at all. The new implementation should be robust in detecting a failure to heat up.
Some minor changes on code style. And a bugfix where the counters for positioning in the stepper where wrong depending on compiler settings. (Caused strange values to reported back with M114 and endstop triggers). Also fixed compiling with FWRETRACT enabled.
First cleanup. Moved all code to cpp files, so there are no dependencies on pde files. And no more odd requirement to cat files together. (Still need to fix the Makefile). Also cleaned up some defines and made defines upper case as by C coding conventions.
Missing #else in temperature.cpp prevented reading bed temp when TEMP_BED_PIN <7. Thanks to Leland Wallace for helping me track this down via "Sesame Street" coding (what is not like the other)
The code to ignore the "bad thermistor reading failsafe"
suicide function depends on the existing of the PS_ON pin
feature. But in some boards this shouldn't be the case
Fix this by adding an explicit definition to make our
intentions more clear and separable.
ON GEN7 there is no temperature reading when power is off.. so Marlin
would kill itself. There seems to be an update from "Traumflug" on GEN7
using standby VCC for thermistors.
- The temperature control is pretty much complete
(not sure what to do w/ autotemp though)
Changed the pins assignment to clearly separate bed and extruder heaters
and temp sensors, changed a bit how termistor tables are handled.
- The steppers control is rudimentary
(only chanages what pins it uses depending on the active_extruder var,
but that's enough for switching extruder in the start.gcode in the
the profiles)
- Tested only w/ RAMPS 1.4
preliminiary implementation for the early heating finish.
Might be replaced by something more clever, e.g. by erik, and does not yet support the second extruder or the bed.
its kind of not so cool, because you need 6 more ints.
Maybe isheating() should use the degrees directly, as it is not used in time-critical anyways.
Then it would be much easier. to have the offsets without additional variables.