Move dwell to gcode
This commit is contained in:
@ -31,12 +31,13 @@ GcodeSuite gcode;
|
||||
#include "parser.h"
|
||||
#include "queue.h"
|
||||
#include "../module/motion.h"
|
||||
#include "../module/printcounter.h"
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
#include "../module/printcounter.h"
|
||||
#endif
|
||||
|
||||
#include "../Marlin.h" // for idle()
|
||||
|
||||
uint8_t GcodeSuite::target_extruder;
|
||||
millis_t GcodeSuite::previous_cmd_ms;
|
||||
|
||||
@ -99,6 +100,15 @@ void GcodeSuite::get_destination_from_command() {
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Dwell waits immediately. It does not synchronize. Use M400 instead of G4
|
||||
*/
|
||||
void GcodeSuite::dwell(millis_t time) {
|
||||
refresh_cmd_timeout();
|
||||
time += previous_cmd_ms;
|
||||
while (PENDING(millis(), time)) idle();
|
||||
}
|
||||
|
||||
//
|
||||
// Placeholders for non-migrated codes
|
||||
//
|
||||
|
Reference in New Issue
Block a user