Fix AutoReporter implementation (#20959)
This commit is contained in:
@ -1226,9 +1226,7 @@ void CardReader::fileHasFinished() {
|
||||
}
|
||||
|
||||
#if ENABLED(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(); }
|
||||
AutoReporter<CardReader::AutoReportSD> CardReader::auto_reporter;
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
|
@ -179,13 +179,8 @@ public:
|
||||
//
|
||||
// SD Auto Reporting
|
||||
//
|
||||
#if HAS_MULTI_SERIAL
|
||||
static serial_index_t auto_report_port;
|
||||
#else
|
||||
static constexpr serial_index_t auto_report_port = 0;
|
||||
#endif
|
||||
class AutoReportSD : public AutoReporter<auto_report_port> { void auto_report(); };
|
||||
static AutoReportSD auto_reporter;
|
||||
struct AutoReportSD { static void report() { report_status(); } };
|
||||
static AutoReporter<AutoReportSD> auto_reporter;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user