M155 turns on automatic periodic temperature reporting.
Enables live temperature reporting while waiting for temps (M119)
and during normal gcode processing without depending on M105 requests
from the host.
Also add "cap: AUTOREPORT_TEMP" capability report to M115. Octoprint
relies on this feature to determine if M155 is supported. Perhaps this
is a bug in Octoprint since M115 "cap" reporting is optional.
Usage: M155 S<period> [P<sensor>]
S specifies the period in seconds to report the temperatures
P optionally specifies a 0-based sensor index to report
S0 disables automatic reporting
Omitting the P field reports on all sensors
Example: M155 S5
Causes Teacup to send a temperature report for all sensors
every 5 seconds.
Ref: https://reprap.org/wiki/Firmware_Capabilities_Protocol
The plan is to remove this stuff from the movement queue.
We still accept additional G-code ... until a G0 or G1 appears.
This e.g. allows to do homing or read temperature reports while
waiting.
Keep messages exactly as they were before, perhaps some Host
applications try to parse this.
This needs 2 bytes RAM and 138 bytes binary size. Performance is
unchanged. Let's see how this compares to the size reduction when
we remove the temperature handling code from the movement queue.
ATmega sizes '168 '328(P) '644(P) '1280
Program: 19646 bytes 138% 64% 31% 16%
Data: 2177 bytes 213% 107% 54% 27%
EEPROM: 32 bytes 4% 2% 2% 1%
short-moves.gcode statistics:
LED on occurences: 888.
LED on time minimum: 280 clock cycles.
LED on time maximum: 458 clock cycles.
LED on time average: 284.653 clock cycles.
smooth-curves.gcode statistics:
LED on occurences: 23648.
LED on time minimum: 272 clock cycles.
LED on time maximum: 501 clock cycles.
LED on time average: 307.275 clock cycles.
triangle-odd.gcode statistics:
LED on occurences: 1636.
LED on time minimum: 272 clock cycles.
LED on time maximum: 458 clock cycles.
LED on time average: 297.625 clock cycles.
Temperature residency time / temperature achieved check is in
the order of seconds, while updates for residency time were being
called every 10ms - unnecessarily often.
Thermal managers (PID, bang-bang, etc.) assume they're being
ticked on 250ms intervals. In reality, they were being updated on
each temperature reading, which was between 10ms and 250ms. This
caused thermal management to malfunction.
https://github.com/Traumflug/Teacup_Firmware/issues/211
Test code which wants to customize config.h can do so without
touching config.h itself by wrapping config.h in a macro variable
which is passed in to the compiler. It defaults to "config.h" if
no override is provided.
This change would break makefile dependency checking since the selection
of a different header file on the command line is not noticed by make
as a build-trigger. To solve this, we add a layer to the BUILDDIR path
so build products are now specific to the USER_CONFIG choice if it is
not "config.h".
The requirement was simply neither obvious nor intuitive. Drawback
is, the indices of temperature sensors can now differ from these
of the heaters. That's easier to recognize for newbies, though.
This is useful when operation a milling spindle. In this case,
set the spindle speed with M104 Sxxx, where xxx is 1..255.
M104 S0 turns the spindle off.
As of reprap-mendel-20100806, the RepRap java host expects resend requests using the new "rs " format only, the version before this only excepted "Resend:"
Repsnapper as of SVN 348 accepts both formats.
Also fixed typo in config.h.dist
Traumflug: to avoid breaking compatibility with earlier host versions, I took the chance to additionally introduce a sort of rudimentary version compatibility system.