Browse Source

Add M155 - Auto-report temperature with interval

pull/1/head
Scott Lahteine 8 years ago
parent
commit
68b866b5dd
  1. 5
      Marlin/Configuration_adv.h
  2. 38
      Marlin/Marlin_main.cpp
  3. 5
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  4. 5
      Marlin/example_configurations/Felix/Configuration_adv.h
  5. 5
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  6. 5
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  7. 5
      Marlin/example_configurations/K8200/Configuration_adv.h
  8. 5
      Marlin/example_configurations/K8400/Configuration_adv.h
  9. 5
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  10. 5
      Marlin/example_configurations/SCARA/Configuration_adv.h
  11. 5
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  12. 5
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  13. 5
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  14. 5
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  15. 5
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  16. 5
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  17. 5
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  18. 5
      Marlin/example_configurations/makibox/Configuration_adv.h
  19. 5
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h

5
Marlin/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

38
Marlin/Marlin_main.cpp

@ -188,6 +188,7 @@
* M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS) * M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
* M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT) * M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
* M150 - Set BlinkM Color R<red> U<green> B<blue>. Values 0-255. (Requires BLINKM) * M150 - Set BlinkM Color R<red> U<green> B<blue>. Values 0-255. (Requires BLINKM)
* M155 - Auto-report temperatures with interval of S<seconds>. (Requires AUTO_REPORT_TEMPERATURES)
* M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER) * M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER)
* M164 - Save the mix as a virtual extruder. (Requires MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS) * M164 - Save the mix as a virtual extruder. (Requires MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS)
* M165 - Set the proportions for a mixing extruder. Use parameters ABCDHI to set the mixing factors. (Requires MIXING_EXTRUDER) * M165 - Set the proportions for a mixing extruder. Use parameters ABCDHI to set the mixing factors. (Requires MIXING_EXTRUDER)
@ -5135,6 +5136,31 @@ inline void gcode_M105() {
SERIAL_EOL; SERIAL_EOL;
} }
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
static uint8_t auto_report_temp_interval;
static millis_t next_temp_report_ms;
/**
* M155: Set temperature auto-report interval. M155 S<seconds>
*/
inline void gcode_M155() {
if (code_seen('S')) {
auto_report_temp_interval = code_value_byte();
NOMORE(auto_report_temp_interval, 60);
next_temp_report_ms = millis() + 1000UL * auto_report_temp_interval;
}
}
inline void auto_report_temperatures() {
if (auto_report_temp_interval && ELAPSED(millis(), next_temp_report_ms)) {
next_temp_report_ms = millis() + 1000UL * auto_report_temp_interval;
print_heaterstates();
}
}
#endif // AUTO_REPORT_TEMPERATURES
#if FAN_COUNT > 0 #if FAN_COUNT > 0
/** /**
@ -7840,6 +7866,12 @@ void process_next_command() {
KEEPALIVE_STATE(NOT_BUSY); KEEPALIVE_STATE(NOT_BUSY);
return; // "ok" already printed return; // "ok" already printed
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
case 155: // M155: Set temperature auto-report interval
gcode_M155();
break;
#endif
case 109: // M109: Wait for hotend temperature to reach target case 109: // M109: Wait for hotend temperature to reach target
gcode_M109(); gcode_M109();
break; break;
@ -9663,7 +9695,13 @@ void idle(
#endif #endif
) { ) {
lcd_update(); lcd_update();
host_keepalive(); host_keepalive();
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
auto_report_temperatures();
#endif
manage_inactivity( manage_inactivity(
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(FILAMENT_CHANGE_FEATURE)
no_stepper_sleep no_stepper_sleep

5
Marlin/example_configurations/Cartesio/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/Felix/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/Hephestos/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/Hephestos_2/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/K8200/Configuration_adv.h

@ -843,4 +843,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/K8400/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/RigidBot/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/SCARA/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/TAZ4/Configuration_adv.h

@ -845,4 +845,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/WITBOX/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h

@ -839,4 +839,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/delta/generic/Configuration_adv.h

@ -839,4 +839,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h

@ -839,4 +839,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h

@ -844,4 +844,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h

@ -839,4 +839,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/makibox/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

5
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h

@ -837,4 +837,9 @@
*/ */
//#define PINS_DEBUGGING //#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
//#define AUTO_REPORT_TEMPERATURES
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

Loading…
Cancel
Save