Apply HAS_SPI_LCD as needed
This commit is contained in:
@ -330,7 +330,7 @@ void Endstops::resync() {
|
||||
void Endstops::event_handler() {
|
||||
static uint8_t prev_hit_state; // = 0
|
||||
if (hit_state && hit_state != prev_hit_state) {
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
|
||||
#define _SET_STOP_CHAR(A,C) (chr## A = C)
|
||||
#else
|
||||
@ -361,7 +361,7 @@ void Endstops::event_handler() {
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
ui.status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
|
||||
#endif
|
||||
|
||||
|
@ -212,7 +212,7 @@ float Planner::previous_speed[NUM_AXIS],
|
||||
float Planner::position_cart[XYZE];
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
volatile uint32_t Planner::block_buffer_runtime_us = 0;
|
||||
#endif
|
||||
|
||||
@ -1469,7 +1469,7 @@ void Planner::quick_stop() {
|
||||
// forced to empty, there's no risk the ISR will touch this.
|
||||
delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
// Clear the accumulated runtime
|
||||
clear_block_buffer_runtime();
|
||||
#endif
|
||||
@ -2024,14 +2024,14 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
// buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more.
|
||||
const uint32_t nst = segment_time_us + LROUND(2 * (settings.min_segment_time_us - segment_time_us) / moves_queued);
|
||||
inverse_secs = 1000000.0f / nst;
|
||||
#if defined(XY_FREQUENCY_LIMIT) || ENABLED(ULTRA_LCD)
|
||||
#if defined(XY_FREQUENCY_LIMIT) || HAS_SPI_LCD
|
||||
segment_time_us = nst;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
// Protect the access to the position.
|
||||
const bool was_enabled = STEPPER_ISR_ENABLED();
|
||||
if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
|
@ -334,7 +334,7 @@ class Planner {
|
||||
static uint32_t axis_segment_time_us[2][3];
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
volatile static uint32_t block_buffer_runtime_us; //Theoretical block buffer runtime in µs
|
||||
#endif
|
||||
|
||||
@ -773,7 +773,7 @@ class Planner {
|
||||
// No trapezoid calculated? Don't execute yet.
|
||||
if (TEST(block->flag, BLOCK_BIT_RECALCULATE)) return nullptr;
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
block_buffer_runtime_us -= block->segment_time_us; // We can't be sure how long an active block will take, so don't count it.
|
||||
#endif
|
||||
|
||||
@ -789,7 +789,7 @@ class Planner {
|
||||
}
|
||||
|
||||
// The queue became empty
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
clear_block_buffer_runtime(); // paranoia. Buffer is empty now - so reset accumulated time to zero.
|
||||
#endif
|
||||
|
||||
@ -806,7 +806,7 @@ class Planner {
|
||||
block_buffer_tail = next_block_index(block_buffer_tail);
|
||||
}
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#if HAS_SPI_LCD
|
||||
|
||||
static uint16_t block_buffer_runtime() {
|
||||
#ifdef __AVR__
|
||||
|
Reference in New Issue
Block a user