AutoReport class (Temperature, Cardreader) (#20913)
This commit is contained in:
@@ -1226,21 +1226,10 @@ void CardReader::fileHasFinished() {
|
||||
}
|
||||
|
||||
#if ENABLED(AUTO_REPORT_SD_STATUS)
|
||||
uint8_t CardReader::auto_report_sd_interval = 0;
|
||||
millis_t CardReader::next_sd_report_ms;
|
||||
#if HAS_MULTI_SERIAL
|
||||
serial_index_t CardReader::auto_report_port;
|
||||
#endif
|
||||
|
||||
void CardReader::auto_report_sd_status() {
|
||||
millis_t current_ms = millis();
|
||||
if (auto_report_sd_interval && ELAPSED(current_ms, next_sd_report_ms)) {
|
||||
next_sd_report_ms = current_ms + 1000UL * auto_report_sd_interval;
|
||||
PORT_REDIRECT(auto_report_port);
|
||||
report_status();
|
||||
}
|
||||
}
|
||||
#endif // AUTO_REPORT_SD_STATUS
|
||||
TERN_(HAS_MULTI_SERIAL, serial_index_t CardReader::auto_report_port);
|
||||
CardReader::AutoReportSD CardReader::auto_reporter;
|
||||
void CardReader::AutoReportSD::auto_report() { report_status(); }
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user