AutoReport class (Temperature, Cardreader) (#20913)

This commit is contained in:
Scott Lahteine
2021-01-28 20:40:20 -06:00
committed by GitHub
parent 9e004a9496
commit 9d0e64a725
16 changed files with 110 additions and 84 deletions

View File

@ -267,7 +267,7 @@ void GcodeSuite::G76() {
say_waiting_for_probe_heating();
SERIAL_ECHOLNPAIR(" Bed:", target_bed, " Probe:", target_probe);
const millis_t probe_timeout_ms = millis() + 900UL * 1000UL;
const millis_t probe_timeout_ms = millis() + SEC_TO_MS(900UL);
while (thermalManager.degProbe() < target_probe) {
if (report_temps(next_temp_report, probe_timeout_ms)) {
SERIAL_ECHOLNPGM("!Probe heating timed out.");

View File

@ -92,7 +92,7 @@ void GcodeSuite::M1001() {
printerEventLEDs.onPrintCompleted();
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PRINT_DONE)));
TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_PRINT_DONE), CONTINUE_STR));
wait_for_user_response(1000UL * TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30));
wait_for_user_response(SEC_TO_MS(TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30)));
printerEventLEDs.onResumeAfterWait();
}
#endif

View File

@ -36,15 +36,17 @@ void GcodeSuite::M27() {
if (parser.seen('C')) {
SERIAL_ECHOPGM("Current file: ");
card.printFilename();
return;
}
#if ENABLED(AUTO_REPORT_SD_STATUS)
else if (parser.seenval('S'))
card.set_auto_report_interval(parser.value_byte());
if (parser.seenval('S')) {
card.auto_reporter.set_interval(parser.value_byte());
return;
}
#endif
else
card.report_status();
card.report_status();
}
#endif // SDSUPPORT

View File

@ -33,7 +33,7 @@
void GcodeSuite::M155() {
if (parser.seenval('S'))
thermalManager.set_auto_report_interval(parser.value_byte());
thermalManager.auto_reporter.set_interval(parser.value_byte());
}