Inline manage_inactivity, tweak autoreport_paused

This commit is contained in:
Scott Lahteine
2020-02-20 20:09:37 -06:00
parent 2b788e9aa6
commit a1f026f57a
7 changed files with 41 additions and 28 deletions

View File

@@ -351,6 +351,18 @@ public:
process_subcommands_now_P(G28_STR);
}
#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
static bool autoreport_paused;
static inline bool set_autoreport_paused(const bool p) {
const bool was = autoreport_paused;
autoreport_paused = p;
return was;
}
#else
static constexpr bool autoreport_paused = false;
static inline bool set_autoreport_paused(const bool) { return false; }
#endif
#if ENABLED(HOST_KEEPALIVE_FEATURE)
/**
* States for managing Marlin and host communication