MMU2 fixes (#13082)

This commit is contained in:
revilor
2019-02-06 03:56:22 +01:00
committed by Scott Lahteine
parent 2f8e89adc3
commit 69aaf5d096
2 changed files with 32 additions and 21 deletions

View File

@@ -24,6 +24,10 @@
#include "../../inc/MarlinConfig.h"
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#include "../runout.h"
#endif
struct E_Step;
class MMU2 {
@@ -75,8 +79,16 @@ private:
static volatile int8_t finda;
static volatile bool findaRunoutValid;
static int16_t version, buildnr;
static millis_t next_request, next_response;
static millis_t last_request, next_P0_request;
static char rx_buffer[16], tx_buffer[16];
static inline void set_runout_valid(const bool valid) {
findaRunoutValid = valid;
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
if (valid) runout.reset();
#endif
}
};
extern MMU2 mmu2;