Skip to content

Commit 859aa4d

Browse files
committed
Reuse M123 during fan selftest to report RPM
M123 reports both fan speeds nicely in RPM, as well as the requested PWM for each so that we don't need to show the test "number" to distinguish between the two in the serial output.
1 parent 7671ff3 commit 859aa4d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Firmware/ultralcd.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -7586,7 +7586,7 @@ static void lcd_selftest_setfan(uint8_t speed) {
75867586

75877587
// Wait for the specified number of seconds while displaying some single-character indicator on the
75887588
// screen coordinate col/row, then perform fan measurement
7589-
static void lcd_selftest_measure_fans(uint8_t delay, uint8_t col, uint8_t row, int n) {
7589+
static void lcd_selftest_measure_fans(uint8_t delay, uint8_t col, uint8_t row) {
75907590
// spin-up delay
75917591
static char symbols[] = {'-', '|'};
75927592
static_assert(1000 / sizeof(symbols) * sizeof(symbols) == 1000);
@@ -7605,9 +7605,7 @@ static void lcd_selftest_measure_fans(uint8_t delay, uint8_t col, uint8_t row, i
76057605
delay_keep_alive(100);
76067606
}
76077607

7608-
printf_P(PSTR("Test %d:\n"), n);
7609-
printf_P(PSTR("Print fan speed: %d\n"), fan_speed[1]);
7610-
printf_P(PSTR("Extr fan speed: %d\n"), fan_speed[0]);
7608+
gcode_M123();
76117609
}
76127610

76137611
static FanCheck lcd_selftest_fan_auto(int _fan)
@@ -7622,7 +7620,7 @@ static FanCheck lcd_selftest_fan_auto(int _fan)
76227620
case 0:
76237621
setExtruderAutoFanState(3); // extruder fan
76247622
lcd_selftest_setfan(0); // print fan off
7625-
lcd_selftest_measure_fans(2, 18, 2, 1);
7623+
lcd_selftest_measure_fans(2, 18, 2);
76267624
setExtruderAutoFanState(0); // extruder fan off
76277625
if (fan_speed[0] < failThr) {
76287626
return FanCheck::ExtruderFan;
@@ -7634,7 +7632,7 @@ static FanCheck lcd_selftest_fan_auto(int _fan)
76347632

76357633
case 1:
76367634
lcd_selftest_setfan(255);
7637-
lcd_selftest_measure_fans(5, 18, 3, 2);
7635+
lcd_selftest_measure_fans(5, 18, 3);
76387636
lcd_selftest_setfan(0);
76397637
if (fan_speed[1] < failThr) {
76407638
return FanCheck::PrintFan;

0 commit comments

Comments
 (0)