Fixup after review
This commit is contained in:
parent
8720602b0e
commit
d2f3835b2c
|
|
@ -836,9 +836,9 @@ void MMU2::execute_extruder_sequence(const E_Step *sequence, uint8_t steps) {
|
|||
const E_Step *step = sequence;
|
||||
for (uint8_t i = 0; i < steps; i++) {
|
||||
const float es = pgm_read_float(&(step->extrude));
|
||||
const feedRate_t fr_mm_m = pgm_read_float(&(step->feedRate));
|
||||
const feedRate_t fr_mm_s = pgm_read_float(&(step->feedRate));
|
||||
planner_set_current_position_E(planner_get_current_position_E() + es);
|
||||
planner_line_to_current_position(MMM_TO_MMS(fr_mm_m));
|
||||
planner_line_to_current_position(fr_mm_s);
|
||||
|
||||
step++;
|
||||
}
|
||||
|
|
@ -1012,24 +1012,4 @@ void MMU2::OnMMUProgressMsgSame(ProgressCode pc) {
|
|||
}
|
||||
}
|
||||
|
||||
//void MMU2::LogErrorEvent(const char *msg) {
|
||||
// MMU2_ERROR_MSG(msg);
|
||||
// SERIAL_ECHOLN();
|
||||
//}
|
||||
|
||||
void MMU2::LogErrorEvent_P(const char *msg_P) {
|
||||
MMU2_ERROR_MSGRPGM(msg_P);
|
||||
SERIAL_ECHOLN();
|
||||
}
|
||||
|
||||
//void MMU2::LogEchoEvent(const char *msg) {
|
||||
// MMU2_ECHO_MSG(msg);
|
||||
// SERIAL_ECHOLN();
|
||||
//}
|
||||
|
||||
void MMU2::LogEchoEvent_P(const char *msg_P) {
|
||||
MMU2_ECHO_MSGRPGM(msg_P);
|
||||
SERIAL_ECHOLN();
|
||||
}
|
||||
|
||||
} // namespace MMU2
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ public:
|
|||
bool is_mmu_error_monitor_active;
|
||||
|
||||
/// Method to read-only mmu_print_saved
|
||||
bool MMU_PRINT_SAVED() const { return mmu_print_saved != SavedState::None; }
|
||||
inline bool MMU_PRINT_SAVED() const { return mmu_print_saved != SavedState::None; }
|
||||
|
||||
/// Automagically "press" a Retry button if we have any retry attempts left
|
||||
/// @param ec ErrorCode enum value
|
||||
|
|
@ -243,20 +243,6 @@ private:
|
|||
/// Repeated calls when progress code remains the same
|
||||
void OnMMUProgressMsgSame(ProgressCode pc);
|
||||
|
||||
/// Report the msg into the general logging subsystem (through Marlin's SERIAL_ECHO stuff)
|
||||
// void LogErrorEvent(const char *msg);
|
||||
/// Report the msg into the general logging subsystem.
|
||||
/// On the AVR platform this variant reads the input string from PROGMEM.
|
||||
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
||||
void LogErrorEvent_P(const char *msg_P);
|
||||
|
||||
/// Report the msg into the general logging subsystem (through Marlin's SERIAL_ECHO stuff)
|
||||
// void LogEchoEvent(const char *msg);
|
||||
/// Report the msg into the general logging subsystem.
|
||||
/// On the AVR platform this variant reads the input string from PROGMEM.
|
||||
/// On the ARM platform it calls LogEchoEvent directly (silently expecting the compiler to optimize it away)
|
||||
void LogEchoEvent_P(const char *msg_P);
|
||||
|
||||
/// @brief Save hotend temperature and set flag to cooldown hotend after 60 minutes
|
||||
/// @param turn_off_nozzle if true, the hotend temperature will be set to 0degC after 60 minutes
|
||||
void SaveHotendTemp(bool turn_off_nozzle);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ static constexpr uint8_t MMU2_NO_TOOL = 99;
|
|||
static constexpr uint32_t MMU_BAUD = 115200;
|
||||
|
||||
struct E_Step {
|
||||
float extrude; ///< extrude distance in mm
|
||||
float extrude; ///< extrude distance in mm
|
||||
float feedRate; ///< feed rate in mm/s
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ constexpr InputIt find_if_cx(InputIt first, InputIt last, UnaryPredicate p) {
|
|||
return last;
|
||||
}
|
||||
|
||||
// Making a constexpr FindError should instruct the compiler to optimize the ConvertMMUErrorCode
|
||||
// Making a constexpr FindError should instruct the compiler to optimize the PrusaErrorCodeIndex
|
||||
// in such a way that no searching will ever be done at runtime.
|
||||
// A call to FindError then compiles to a single instruction even on the AVR.
|
||||
static constexpr uint8_t FindErrorIndex(uint16_t pec) {
|
||||
|
|
|
|||
|
|
@ -12,10 +12,14 @@ namespace MMU2 {
|
|||
|
||||
/// Report the msg into the general logging subsystem (through Marlin's SERIAL_ECHO stuff)
|
||||
/// @param msg pointer to a string in PROGMEM
|
||||
/// On the AVR platform this variant reads the input string from PROGMEM.
|
||||
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
||||
void LogErrorEvent_P(const char *msg);
|
||||
|
||||
/// Report the msg into the general logging subsystem (through Marlin's SERIAL_ECHO stuff)
|
||||
/// @param msg pointer to a string in PROGMEM
|
||||
/// On the AVR platform this variant reads the input string from PROGMEM.
|
||||
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
||||
void LogEchoEvent_P(const char *msg);
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ float planner_get_machine_position_E_mm();
|
|||
float planner_get_current_position_E();
|
||||
void planner_set_current_position_E(float e);
|
||||
void planner_line_to_current_position(float feedRate_mm_s);
|
||||
void planner_line_to_current_position_sync(float feedRate_mm_s);
|
||||
pos3d planner_current_position();
|
||||
|
||||
void motion_do_blocking_move_to_xy(float rx, float ry, float feedRate_mm_s);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace MMU2 {
|
|||
|
||||
void MoveE(float delta, float feedRate) {
|
||||
current_position[E_AXIS] += delta;
|
||||
plan_buffer_line_curposXYZE(feedRate);
|
||||
planner_line_to_current_position(feedRate);
|
||||
}
|
||||
|
||||
float MoveRaiseZ(float delta) {
|
||||
|
|
@ -40,7 +40,11 @@ void planner_set_current_position_E(float e){
|
|||
|
||||
void planner_line_to_current_position(float feedRate_mm_s){
|
||||
plan_buffer_line_curposXYZE(feedRate_mm_s);
|
||||
st_synchronize();
|
||||
}
|
||||
|
||||
void planner_line_to_current_position_sync(float feedRate_mm_s){
|
||||
planner_line_to_current_position(feedRate_mm_s);
|
||||
planner_synchronize();
|
||||
}
|
||||
|
||||
pos3d planner_current_position(){
|
||||
|
|
@ -48,23 +52,20 @@ pos3d planner_current_position(){
|
|||
}
|
||||
|
||||
void motion_do_blocking_move_to_xy(float rx, float ry, float feedRate_mm_s){
|
||||
current_position[X_AXIS] = rx;
|
||||
current_position[Y_AXIS] = ry;
|
||||
plan_buffer_line_curposXYZE(feedRate_mm_s);
|
||||
st_synchronize();
|
||||
current_position[X_AXIS] = rx;
|
||||
current_position[Y_AXIS] = ry;
|
||||
planner_line_to_current_position_sync(feedRate_mm_s);
|
||||
}
|
||||
|
||||
void motion_do_blocking_move_to_z(float z, float feedRate_mm_s){
|
||||
current_position[Z_AXIS] = z;
|
||||
plan_buffer_line_curposXYZE(feedRate_mm_s);
|
||||
st_synchronize();
|
||||
current_position[Z_AXIS] = z;
|
||||
planner_line_to_current_position_sync(feedRate_mm_s);
|
||||
}
|
||||
|
||||
void nozzle_park() {
|
||||
current_position[X_AXIS] = MMU_ERR_X_PAUSE_POS;
|
||||
current_position[Y_AXIS] = MMU_ERR_Y_PAUSE_POS;
|
||||
planner_line_to_current_position(NOZZLE_PARK_XY_FEEDRATE);
|
||||
st_synchronize();
|
||||
planner_line_to_current_position_sync(NOZZLE_PARK_XY_FEEDRATE);
|
||||
}
|
||||
|
||||
bool marlin_printingIsActive() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue