Update comments, rename next_ping_ms, followup to #3797
This commit is contained in:
parent
6d68b12e28
commit
8218558953
@ -452,7 +452,7 @@
|
|||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets. Needs ~2666 bytes
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -7597,14 +7597,14 @@ void prepare_move() {
|
|||||||
|
|
||||||
float feed_rate = feedrate * feedrate_multiplier / 60 / 100.0;
|
float feed_rate = feedrate * feedrate_multiplier / 60 / 100.0;
|
||||||
|
|
||||||
millis_t next_ping_ms = millis() + 200UL;
|
millis_t next_idle_ms = millis() + 200UL;
|
||||||
|
|
||||||
for (i = 1; i < segments; i++) { // Iterate (segments-1) times
|
for (i = 1; i < segments; i++) { // Iterate (segments-1) times
|
||||||
|
|
||||||
thermalManager.manage_heater();
|
thermalManager.manage_heater();
|
||||||
millis_t now = millis();
|
millis_t now = millis();
|
||||||
if (ELAPSED(now, next_ping_ms)) {
|
if (ELAPSED(now, next_idle_ms)) {
|
||||||
next_ping_ms = now + 200UL;
|
next_idle_ms = now + 200UL;
|
||||||
idle();
|
idle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7854,7 +7854,7 @@ void idle(
|
|||||||
host_keepalive();
|
host_keepalive();
|
||||||
lcd_update();
|
lcd_update();
|
||||||
#if ENABLED(PRINTCOUNTER)
|
#if ENABLED(PRINTCOUNTER)
|
||||||
print_job_timer.tick();
|
print_job_timer.tick();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,11 +448,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -448,11 +448,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -448,11 +448,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -454,11 +454,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 2; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 2; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -448,11 +448,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -448,11 +448,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -456,11 +456,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -448,11 +448,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -450,11 +450,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -450,11 +450,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -449,11 +449,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -454,11 +454,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -450,11 +450,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -448,11 +448,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -448,11 +448,11 @@
|
|||||||
// @section extras
|
// @section extras
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
#define N_ARC_CORRECTION 25
|
#define N_ARC_CORRECTION 25
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
//#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||||
|
@ -118,14 +118,14 @@ void cubic_b_spline(const float position[NUM_AXIS], const float target[NUM_AXIS]
|
|||||||
bez_target[Y_AXIS] = position[Y_AXIS];
|
bez_target[Y_AXIS] = position[Y_AXIS];
|
||||||
float step = MAX_STEP;
|
float step = MAX_STEP;
|
||||||
|
|
||||||
millis_t next_ping_ms = millis() + 200UL;
|
millis_t next_idle_ms = millis() + 200UL;
|
||||||
|
|
||||||
while (t < 1.0) {
|
while (t < 1.0) {
|
||||||
|
|
||||||
thermalManager.manage_heater();
|
thermalManager.manage_heater();
|
||||||
millis_t now = millis();
|
millis_t now = millis();
|
||||||
if (ELAPSED(now, next_ping_ms)) {
|
if (ELAPSED(now, next_idle_ms)) {
|
||||||
next_ping_ms = now + 200UL;
|
next_idle_ms = now + 200UL;
|
||||||
idle();
|
idle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,6 +516,7 @@ float Temperature::get_pid_output(int e) {
|
|||||||
/**
|
/**
|
||||||
* Manage heating activities for extruder hot-ends and a heated bed
|
* Manage heating activities for extruder hot-ends and a heated bed
|
||||||
* - Acquire updated temperature readings
|
* - Acquire updated temperature readings
|
||||||
|
* - Also resets the watchdog timer
|
||||||
* - Invoke thermal runaway protection
|
* - Invoke thermal runaway protection
|
||||||
* - Manage extruder auto-fan
|
* - Manage extruder auto-fan
|
||||||
* - Apply filament width to the extrusion rate (may move)
|
* - Apply filament width to the extrusion rate (may move)
|
||||||
@ -525,7 +526,7 @@ void Temperature::manage_heater() {
|
|||||||
|
|
||||||
if (!temp_meas_ready) return;
|
if (!temp_meas_ready) return;
|
||||||
|
|
||||||
updateTemperaturesFromRawValues();
|
updateTemperaturesFromRawValues(); // also resets the watchdog
|
||||||
|
|
||||||
#if ENABLED(HEATER_0_USES_MAX6675)
|
#if ENABLED(HEATER_0_USES_MAX6675)
|
||||||
float ct = current_temperature[0];
|
float ct = current_temperature[0];
|
||||||
|
@ -2247,7 +2247,7 @@ void lcd_update() {
|
|||||||
}
|
}
|
||||||
#endif //ULTIPANEL
|
#endif //ULTIPANEL
|
||||||
|
|
||||||
// Here we arrive every ~100ms when ideling often enough.
|
// We arrive here every ~100ms when idling often enough.
|
||||||
// Instead of tracking the changes simply redraw the Info Screen ~1 time a second.
|
// Instead of tracking the changes simply redraw the Info Screen ~1 time a second.
|
||||||
static int8_t lcd_status_update_delay = 1; // first update one loop delayed
|
static int8_t lcd_status_update_delay = 1; // first update one loop delayed
|
||||||
if (currentMenu == lcd_status_screen && !lcd_status_update_delay--) {
|
if (currentMenu == lcd_status_screen && !lcd_status_update_delay--) {
|
||||||
|
Loading…
Reference in New Issue
Block a user