temp.c: also report target temperatures.
It's handy and some hosts actually expect this.
This commit is contained in:
parent
443c3eb8ad
commit
bb29d50f31
|
|
@ -194,6 +194,14 @@
|
|||
*/
|
||||
#define TEMP_EWMA 1.0
|
||||
|
||||
/** \def REPORT_TARGET_TEMPS
|
||||
With this enabled, M105 commands will return the current temperatures along
|
||||
with the target temps, separated by a slash: ok T:xxx.x/xxx.x B:xxx.x/xxx.x
|
||||
With this disabled, only temps will be returned: ok T:xxx.x B:xxx.x
|
||||
Enabling adds 78 bytes to the image.
|
||||
*/
|
||||
#define REPORT_TARGET_TEMPS
|
||||
|
||||
/** \def HEATER_SANITY_CHECK
|
||||
Check if heater responds to changes in target temperature, disable and spit
|
||||
errors if not largely untested, please comment in forum if this works, or
|
||||
|
|
|
|||
|
|
@ -194,6 +194,14 @@
|
|||
*/
|
||||
#define TEMP_EWMA 1.0
|
||||
|
||||
/** \def REPORT_TARGET_TEMPS
|
||||
With this enabled, M105 commands will return the current temperatures along
|
||||
with the target temps, separated by a slash: ok T:xxx.x/xxx.x B:xxx.x/xxx.x
|
||||
With this disabled, only temps will be returned: ok T:xxx.x B:xxx.x
|
||||
Enabling adds 78 bytes to the image.
|
||||
*/
|
||||
#define REPORT_TARGET_TEMPS
|
||||
|
||||
/** \def HEATER_SANITY_CHECK
|
||||
Check if heater responds to changes in target temperature, disable and spit
|
||||
errors if not largely untested, please comment in forum if this works, or
|
||||
|
|
|
|||
5
temp.c
5
temp.c
|
|
@ -370,6 +370,11 @@ uint16_t temp_get(temp_sensor_t index) {
|
|||
static void single_temp_print(temp_sensor_t index) {
|
||||
uint8_t c = (temp_sensors_runtime[index].last_read_temp & 3) * 25;
|
||||
sersendf_P(PSTR("%u.%u"), temp_sensors_runtime[index].last_read_temp >> 2, c);
|
||||
#ifdef REPORT_TARGET_TEMPS
|
||||
sersendf_P(PSTR("/"));
|
||||
c = (temp_sensors_runtime[index].target_temp & 3) * 25;
|
||||
sersendf_P(PSTR("%u.%u"), temp_sensors_runtime[index].target_temp >> 2, c);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// send temperatures to host
|
||||
|
|
|
|||
Loading…
Reference in New Issue