Report fan speed on change (#18013)

This commit is contained in:
Gurmeet Athwal 2020-05-26 04:16:35 +05:30 committed by GitHub
parent 5fbea83840
commit f3bf343c89
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -204,6 +204,16 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
if (target >= FAN_COUNT) return;
fan_speed[target] = speed;
report_fan_speed(target);
}
/**
* Report print fan speed for a target extruder
*/
void Temperature::report_fan_speed(const uint8_t target) {
if (target >= FAN_COUNT) return;
PORT_REDIRECT(SERIAL_BOTH);
SERIAL_ECHOLNPAIR("M106 P", target, " S", fan_speed[target]);
}
#if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE)

View file

@ -483,6 +483,7 @@ class Temperature {
#define FANS_LOOP(I) LOOP_L_N(I, FAN_COUNT)
static void set_fan_speed(const uint8_t target, const uint16_t speed);
static void report_fan_speed(const uint8_t target);
#if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE)
static bool fans_paused;