Add ExtUI Flow Rate method (#16048)

This commit is contained in:
InsanityAutomation 2019-11-30 08:23:53 -05:00 committed by Scott Lahteine
parent 690ed531b6
commit b24b0f385f
2 changed files with 7 additions and 0 deletions

View file

@ -683,12 +683,17 @@ namespace ExtUI {
#endif #endif
feedRate_t getFeedrate_mm_s() { return feedrate_mm_s; } feedRate_t getFeedrate_mm_s() { return feedrate_mm_s; }
int16_t getFlowPercentage(const extruder_t extr) { return planner.flow_percentage[extr]; }
feedRate_t getMinFeedrate_mm_s() { return planner.settings.min_feedrate_mm_s; } feedRate_t getMinFeedrate_mm_s() { return planner.settings.min_feedrate_mm_s; }
feedRate_t getMinTravelFeedrate_mm_s() { return planner.settings.min_travel_feedrate_mm_s; } feedRate_t getMinTravelFeedrate_mm_s() { return planner.settings.min_travel_feedrate_mm_s; }
float getPrintingAcceleration_mm_s2() { return planner.settings.acceleration; } float getPrintingAcceleration_mm_s2() { return planner.settings.acceleration; }
float getRetractAcceleration_mm_s2() { return planner.settings.retract_acceleration; } float getRetractAcceleration_mm_s2() { return planner.settings.retract_acceleration; }
float getTravelAcceleration_mm_s2() { return planner.settings.travel_acceleration; } float getTravelAcceleration_mm_s2() { return planner.settings.travel_acceleration; }
void setFeedrate_mm_s(const feedRate_t fr) { feedrate_mm_s = fr; } void setFeedrate_mm_s(const feedRate_t fr) { feedrate_mm_s = fr; }
void setFlow_percent(const int16_t flow, const extruder_t extr) {
planner.flow_percentage[extr] = flow;
planner.refresh_e_factor(extr);
}
void setMinFeedrate_mm_s(const feedRate_t fr) { planner.settings.min_feedrate_mm_s = fr; } void setMinFeedrate_mm_s(const feedRate_t fr) { planner.settings.min_feedrate_mm_s = fr; }
void setMinTravelFeedrate_mm_s(const feedRate_t fr) { planner.settings.min_travel_feedrate_mm_s = fr; } void setMinTravelFeedrate_mm_s(const feedRate_t fr) { planner.settings.min_travel_feedrate_mm_s = fr; }
void setPrintingAcceleration_mm_s2(const float acc) { planner.settings.acceleration = acc; } void setPrintingAcceleration_mm_s2(const float acc) { planner.settings.acceleration = acc; }

View file

@ -126,6 +126,7 @@ namespace ExtUI {
float getRetractAcceleration_mm_s2(); float getRetractAcceleration_mm_s2();
float getTravelAcceleration_mm_s2(); float getTravelAcceleration_mm_s2();
float getFeedrate_percent(); float getFeedrate_percent();
int16_t getFlowPercentage(const extruder_t);
uint8_t getProgress_percent(); uint8_t getProgress_percent();
uint32_t getProgress_seconds_elapsed(); uint32_t getProgress_seconds_elapsed();
@ -172,6 +173,7 @@ namespace ExtUI {
void setRetractAcceleration_mm_s2(const float); void setRetractAcceleration_mm_s2(const float);
void setTravelAcceleration_mm_s2(const float); void setTravelAcceleration_mm_s2(const float);
void setFeedrate_percent(const float); void setFeedrate_percent(const float);
void setFlow_percent(const int16_t, const extruder_t);
void setUserConfirmed(); void setUserConfirmed();
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)