Add SRAM command injection (#17459)

This commit is contained in:
Scott Lahteine
2020-04-09 20:05:58 -05:00
committed by GitHub
parent 7af0da7f93
commit 48919c54fb
21 changed files with 120 additions and 109 deletions

View File

@@ -31,6 +31,7 @@
#include "menu.h"
#include "../../module/temperature.h"
#include "../../feature/pause.h"
#include "../../gcode/queue.h"
#if HAS_FILAMENT_SENSOR
#include "../../feature/runout.h"
#endif
@@ -60,7 +61,7 @@ static void _change_filament_temp(const uint16_t temperature) {
char cmd[11];
sprintf_P(cmd, _change_filament_temp_command(), _change_filament_temp_extruder);
thermalManager.setTargetHotend(temperature, _change_filament_temp_extruder);
lcd_enqueue_one_now(cmd);
queue.inject(cmd);
}
//
@@ -121,7 +122,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
ACTION_ITEM_N_P(s, msg, []{
char cmd[13];
sprintf_P(cmd, PSTR("M600 B0 T%i"), int(MenuItemBase::itemIndex));
lcd_enqueue_one_now(cmd);
queue.inject(cmd);
});
}
}
@@ -145,7 +146,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
ACTION_ITEM_N_P(s, msg_load, []{
char cmd[12];
sprintf_P(cmd, PSTR("M701 T%i"), int(MenuItemBase::itemIndex));
lcd_enqueue_one_now(cmd);
queue.inject(cmd);
});
}
}
@@ -181,7 +182,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
ACTION_ITEM_N_P(s, msg_unload, []{
char cmd[12];
sprintf_P(cmd, PSTR("M702 T%i"), int(MenuItemBase::itemIndex));
lcd_enqueue_one_now(cmd);
queue.inject(cmd);
});
}
}