Apply HAS_SPI_LCD as needed
This commit is contained in:
parent
8837cd3b53
commit
eae543adf3
|
@ -385,7 +385,7 @@ inline bool turn_on_heaters() {
|
||||||
#if HAS_HEATED_BED
|
#if HAS_HEATED_BED
|
||||||
|
|
||||||
if (g26_bed_temp > 25) {
|
if (g26_bed_temp > 25) {
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
ui.set_status_P(PSTR("G26 Heating Bed."), 99);
|
ui.set_status_P(PSTR("G26 Heating Bed."), 99);
|
||||||
ui.quick_feedback();
|
ui.quick_feedback();
|
||||||
#if HAS_LCD_MENU
|
#if HAS_LCD_MENU
|
||||||
|
@ -406,7 +406,7 @@ inline bool turn_on_heaters() {
|
||||||
#endif // HAS_HEATED_BED
|
#endif // HAS_HEATED_BED
|
||||||
|
|
||||||
// Start heating the active nozzle
|
// Start heating the active nozzle
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
ui.set_status_P(PSTR("G26 Heating Nozzle."), 99);
|
ui.set_status_P(PSTR("G26 Heating Nozzle."), 99);
|
||||||
ui.quick_feedback();
|
ui.quick_feedback();
|
||||||
#endif
|
#endif
|
||||||
|
@ -420,7 +420,7 @@ inline bool turn_on_heaters() {
|
||||||
)
|
)
|
||||||
) return G26_ERR;
|
) return G26_ERR;
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
ui.reset_status();
|
ui.reset_status();
|
||||||
ui.quick_feedback();
|
ui.quick_feedback();
|
||||||
#endif
|
#endif
|
||||||
|
@ -472,7 +472,7 @@ inline bool prime_nozzle() {
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
ui.set_status_P(PSTR("Fixed Length Prime."), 99);
|
ui.set_status_P(PSTR("Fixed Length Prime."), 99);
|
||||||
ui.quick_feedback();
|
ui.quick_feedback();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "../inc/MarlinConfig.h"
|
#include "../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
#include "../Marlin.h"
|
#include "../Marlin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -330,7 +330,7 @@ void Endstops::resync() {
|
||||||
void Endstops::event_handler() {
|
void Endstops::event_handler() {
|
||||||
static uint8_t prev_hit_state; // = 0
|
static uint8_t prev_hit_state; // = 0
|
||||||
if (hit_state && hit_state != prev_hit_state) {
|
if (hit_state && hit_state != prev_hit_state) {
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
|
char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
|
||||||
#define _SET_STOP_CHAR(A,C) (chr## A = C)
|
#define _SET_STOP_CHAR(A,C) (chr## A = C)
|
||||||
#else
|
#else
|
||||||
|
@ -361,7 +361,7 @@ void Endstops::event_handler() {
|
||||||
#endif
|
#endif
|
||||||
SERIAL_EOL();
|
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);
|
ui.status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ float Planner::previous_speed[NUM_AXIS],
|
||||||
float Planner::position_cart[XYZE];
|
float Planner::position_cart[XYZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
volatile uint32_t Planner::block_buffer_runtime_us = 0;
|
volatile uint32_t Planner::block_buffer_runtime_us = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1469,7 +1469,7 @@ void Planner::quick_stop() {
|
||||||
// forced to empty, there's no risk the ISR will touch this.
|
// forced to empty, there's no risk the ISR will touch this.
|
||||||
delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE;
|
delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE;
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
// Clear the accumulated runtime
|
// Clear the accumulated runtime
|
||||||
clear_block_buffer_runtime();
|
clear_block_buffer_runtime();
|
||||||
#endif
|
#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.
|
// 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);
|
const uint32_t nst = segment_time_us + LROUND(2 * (settings.min_segment_time_us - segment_time_us) / moves_queued);
|
||||||
inverse_secs = 1000000.0f / nst;
|
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;
|
segment_time_us = nst;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
// Protect the access to the position.
|
// Protect the access to the position.
|
||||||
const bool was_enabled = STEPPER_ISR_ENABLED();
|
const bool was_enabled = STEPPER_ISR_ENABLED();
|
||||||
if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||||
|
|
|
@ -334,7 +334,7 @@ class Planner {
|
||||||
static uint32_t axis_segment_time_us[2][3];
|
static uint32_t axis_segment_time_us[2][3];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
volatile static uint32_t block_buffer_runtime_us; //Theoretical block buffer runtime in µs
|
volatile static uint32_t block_buffer_runtime_us; //Theoretical block buffer runtime in µs
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -773,7 +773,7 @@ class Planner {
|
||||||
// No trapezoid calculated? Don't execute yet.
|
// No trapezoid calculated? Don't execute yet.
|
||||||
if (TEST(block->flag, BLOCK_BIT_RECALCULATE)) return nullptr;
|
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.
|
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
|
#endif
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@ class Planner {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The queue became empty
|
// 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.
|
clear_block_buffer_runtime(); // paranoia. Buffer is empty now - so reset accumulated time to zero.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -806,7 +806,7 @@ class Planner {
|
||||||
block_buffer_tail = next_block_index(block_buffer_tail);
|
block_buffer_tail = next_block_index(block_buffer_tail);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
|
|
||||||
static uint16_t block_buffer_runtime() {
|
static uint16_t block_buffer_runtime() {
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
|
|
|
@ -268,7 +268,7 @@
|
||||||
// LCDs and Controllers //
|
// LCDs and Controllers //
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if HAS_SPI_LCD
|
||||||
|
|
||||||
//
|
//
|
||||||
// LCD Display output pins
|
// LCD Display output pins
|
||||||
|
|
Loading…
Reference in a new issue