Commit Graph

25 Commits

Author SHA1 Message Date
Phil Hord 47dfcf1a44 Add M155 support for periodic temperature reporting
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
2018-08-20 10:10:30 -07:00
Markus Hitter fb49aef14d Make temperature waiting independent from the movement queue.
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.
2016-12-05 13:56:09 +01:00
Robert Konklewski 03c8d71a56 Temp: have residency updates on 1s clock.
Temperature residency time / temperature achieved check is in
the order of seconds, while updates for residency time were being
called every 10ms - unnecessarily often.
2016-06-23 22:32:51 +02:00
Robert Konklewski 8e977d50ce Temp: have heater update on 250ms intervals.
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
2016-06-23 22:32:51 +02:00
Witold Sowa fdf6dbe849 Added support for MCP3008 and MCP3004 ADC for temperature read 2016-04-12 22:37:50 +02:00
Markus Hitter d29737699f temp.h: remove indirection temp_tick(). 2015-04-21 02:51:31 +02:00
Phil Hord 21e5343552 Add config.h wrapper to simplify test automation
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".
2014-03-04 19:56:23 +01:00
Markus Hitter 042d9ddfc2 Move temp_all_zero() to heaters_all_zero().
We need the power supply for the heaters, after all, not for
the temperature sensors. Some heaters (e.g. fans) don't even have
a temp sensor.
2013-01-03 15:34:47 +01:00
Markus Hitter 6f2ec09837 Make temperature sensor type TT_NONE obsolete.
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.
2013-01-03 15:34:41 +01:00
Markus Hitter f9a4495aa1 Introduce TEMP_NONE, a "sensor" just storing the target temperature.
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.
2011-09-01 19:03:33 +02:00
Michael Moon a68ae12679 add NO_AUTO_IDLE option to prevent powercuts after inactivity, add temp_all_zero so power isn't cut if heater remains off for a while but has a non-zero set temperature 2011-06-14 23:05:13 +10:00
Markus Amsler e937b052af Add support for multiple thermistor tables.
DEFINE_TEMP_SENSOR takes one additional argument. For TT_THERMISOR you can specify there which thermistor table to use.
2011-04-12 20:00:18 +02:00
Markus Amsler d97a4519d3 extruder: Get rid of _CONFIG_H, like on the mainboard config. 2011-04-07 03:29:17 +02:00
Michael Moon d0601716e8 reorganise intercom to send packets from extruder main loop, also generalise protocol as discussed in forum 2011-03-05 13:38:12 +11:00
Stephan Walter eecf3af9f1 analog mask calculated automagically 2011-02-21 13:57:51 +11:00
Michael Moon 97f344f0fa changes discussed in chat on pull 19 2011-02-06 21:11:39 +11:00
Stephan Walter fcaa76d3c0 Simpler definition of temp sensors and heaters. 2011-02-01 19:40:27 +11:00
Michael Moon 096d7dfdf3 Merge release-candidate-triffid branch 2011-01-07 23:09:13 +11:00
Stephan Walter 3028b297f3 Add simulation code: use "make sim" 2010-10-21 11:05:55 +11:00
dps.lwk a565f31dbb Resend Request changed from "Resend:" to "rs "
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.
2010-10-11 23:46:51 +02:00
Michael Moon e78381c56d Move configuration to config.h.dist 2010-09-27 09:20:07 +10:00
Michael Moon b80c5ea7b5 UNTESTED support for thermistor and AD595 2010-09-13 17:14:12 +10:00
Michael Moon 273d63f242 splitting heater stuff out into a separate file 2010-09-12 14:47:49 +10:00
Michael Moon 0b51c1d0ab Merge branch 'mendel-triffid'
Conflicts:
	dda.c
	gcode.c
	machine.h
	temp.c
2010-08-10 14:55:06 +10:00
Michael Moon 595b66a341 setting up new branch 2 2010-08-10 14:26:24 +10:00