Browse Source

Apply HAS_SPI_LCD as needed

Scott Lahteine 6 years ago
parent
commit
eae543adf3

+ 4
- 4
Marlin/src/gcode/bedlevel/G26.cpp View File

385
   #if HAS_HEATED_BED
385
   #if HAS_HEATED_BED
386
 
386
 
387
     if (g26_bed_temp > 25) {
387
     if (g26_bed_temp > 25) {
388
-      #if ENABLED(ULTRA_LCD)
388
+      #if HAS_SPI_LCD
389
         ui.set_status_P(PSTR("G26 Heating Bed."), 99);
389
         ui.set_status_P(PSTR("G26 Heating Bed."), 99);
390
         ui.quick_feedback();
390
         ui.quick_feedback();
391
         #if HAS_LCD_MENU
391
         #if HAS_LCD_MENU
406
   #endif // HAS_HEATED_BED
406
   #endif // HAS_HEATED_BED
407
 
407
 
408
   // Start heating the active nozzle
408
   // Start heating the active nozzle
409
-  #if ENABLED(ULTRA_LCD)
409
+  #if HAS_SPI_LCD
410
     ui.set_status_P(PSTR("G26 Heating Nozzle."), 99);
410
     ui.set_status_P(PSTR("G26 Heating Nozzle."), 99);
411
     ui.quick_feedback();
411
     ui.quick_feedback();
412
   #endif
412
   #endif
420
     )
420
     )
421
   ) return G26_ERR;
421
   ) return G26_ERR;
422
 
422
 
423
-  #if ENABLED(ULTRA_LCD)
423
+  #if HAS_SPI_LCD
424
     ui.reset_status();
424
     ui.reset_status();
425
     ui.quick_feedback();
425
     ui.quick_feedback();
426
   #endif
426
   #endif
472
     else
472
     else
473
   #endif
473
   #endif
474
   {
474
   {
475
-    #if ENABLED(ULTRA_LCD)
475
+    #if HAS_SPI_LCD
476
       ui.set_status_P(PSTR("Fixed Length Prime."), 99);
476
       ui.set_status_P(PSTR("Fixed Length Prime."), 99);
477
       ui.quick_feedback();
477
       ui.quick_feedback();
478
     #endif
478
     #endif

+ 1
- 1
Marlin/src/lcd/fontutils.cpp View File

9
 
9
 
10
 #include "../inc/MarlinConfig.h"
10
 #include "../inc/MarlinConfig.h"
11
 
11
 
12
-#if ENABLED(ULTRA_LCD)
12
+#if HAS_SPI_LCD
13
   #include "ultralcd.h"
13
   #include "ultralcd.h"
14
   #include "../Marlin.h"
14
   #include "../Marlin.h"
15
 #endif
15
 #endif

+ 2
- 2
Marlin/src/module/endstops.cpp View File

330
 void Endstops::event_handler() {
330
 void Endstops::event_handler() {
331
   static uint8_t prev_hit_state; // = 0
331
   static uint8_t prev_hit_state; // = 0
332
   if (hit_state && hit_state != prev_hit_state) {
332
   if (hit_state && hit_state != prev_hit_state) {
333
-    #if ENABLED(ULTRA_LCD)
333
+    #if HAS_SPI_LCD
334
       char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
334
       char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
335
       #define _SET_STOP_CHAR(A,C) (chr## A = C)
335
       #define _SET_STOP_CHAR(A,C) (chr## A = C)
336
     #else
336
     #else
361
     #endif
361
     #endif
362
     SERIAL_EOL();
362
     SERIAL_EOL();
363
 
363
 
364
-    #if ENABLED(ULTRA_LCD)
364
+    #if HAS_SPI_LCD
365
       ui.status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
365
       ui.status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
366
     #endif
366
     #endif
367
 
367
 

+ 4
- 4
Marlin/src/module/planner.cpp View File

212
   float Planner::position_cart[XYZE];
212
   float Planner::position_cart[XYZE];
213
 #endif
213
 #endif
214
 
214
 
215
-#if ENABLED(ULTRA_LCD)
215
+#if HAS_SPI_LCD
216
   volatile uint32_t Planner::block_buffer_runtime_us = 0;
216
   volatile uint32_t Planner::block_buffer_runtime_us = 0;
217
 #endif
217
 #endif
218
 
218
 
1469
   // forced to empty, there's no risk the ISR will touch this.
1469
   // forced to empty, there's no risk the ISR will touch this.
1470
   delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE;
1470
   delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE;
1471
 
1471
 
1472
-  #if ENABLED(ULTRA_LCD)
1472
+  #if HAS_SPI_LCD
1473
     // Clear the accumulated runtime
1473
     // Clear the accumulated runtime
1474
     clear_block_buffer_runtime();
1474
     clear_block_buffer_runtime();
1475
   #endif
1475
   #endif
2024
         // buffer is draining, add extra time.  The amount of time added increases if the buffer is still emptied more.
2024
         // buffer is draining, add extra time.  The amount of time added increases if the buffer is still emptied more.
2025
         const uint32_t nst = segment_time_us + LROUND(2 * (settings.min_segment_time_us - segment_time_us) / moves_queued);
2025
         const uint32_t nst = segment_time_us + LROUND(2 * (settings.min_segment_time_us - segment_time_us) / moves_queued);
2026
         inverse_secs = 1000000.0f / nst;
2026
         inverse_secs = 1000000.0f / nst;
2027
-        #if defined(XY_FREQUENCY_LIMIT) || ENABLED(ULTRA_LCD)
2027
+        #if defined(XY_FREQUENCY_LIMIT) || HAS_SPI_LCD
2028
           segment_time_us = nst;
2028
           segment_time_us = nst;
2029
         #endif
2029
         #endif
2030
       }
2030
       }
2031
     }
2031
     }
2032
   #endif
2032
   #endif
2033
 
2033
 
2034
-  #if ENABLED(ULTRA_LCD)
2034
+  #if HAS_SPI_LCD
2035
     // Protect the access to the position.
2035
     // Protect the access to the position.
2036
     const bool was_enabled = STEPPER_ISR_ENABLED();
2036
     const bool was_enabled = STEPPER_ISR_ENABLED();
2037
     if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();
2037
     if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT();

+ 4
- 4
Marlin/src/module/planner.h View File

334
       static uint32_t axis_segment_time_us[2][3];
334
       static uint32_t axis_segment_time_us[2][3];
335
     #endif
335
     #endif
336
 
336
 
337
-    #if ENABLED(ULTRA_LCD)
337
+    #if HAS_SPI_LCD
338
       volatile static uint32_t block_buffer_runtime_us; //Theoretical block buffer runtime in µs
338
       volatile static uint32_t block_buffer_runtime_us; //Theoretical block buffer runtime in µs
339
     #endif
339
     #endif
340
 
340
 
773
         // No trapezoid calculated? Don't execute yet.
773
         // No trapezoid calculated? Don't execute yet.
774
         if (TEST(block->flag, BLOCK_BIT_RECALCULATE)) return nullptr;
774
         if (TEST(block->flag, BLOCK_BIT_RECALCULATE)) return nullptr;
775
 
775
 
776
-        #if ENABLED(ULTRA_LCD)
776
+        #if HAS_SPI_LCD
777
           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.
777
           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.
778
         #endif
778
         #endif
779
 
779
 
789
       }
789
       }
790
 
790
 
791
       // The queue became empty
791
       // The queue became empty
792
-      #if ENABLED(ULTRA_LCD)
792
+      #if HAS_SPI_LCD
793
         clear_block_buffer_runtime(); // paranoia. Buffer is empty now - so reset accumulated time to zero.
793
         clear_block_buffer_runtime(); // paranoia. Buffer is empty now - so reset accumulated time to zero.
794
       #endif
794
       #endif
795
 
795
 
806
         block_buffer_tail = next_block_index(block_buffer_tail);
806
         block_buffer_tail = next_block_index(block_buffer_tail);
807
     }
807
     }
808
 
808
 
809
-    #if ENABLED(ULTRA_LCD)
809
+    #if HAS_SPI_LCD
810
 
810
 
811
       static uint16_t block_buffer_runtime() {
811
       static uint16_t block_buffer_runtime() {
812
         #ifdef __AVR__
812
         #ifdef __AVR__

+ 1
- 1
Marlin/src/pins/ramps/pins_TT_OSCAR.h View File

268
 // LCDs and Controllers //
268
 // LCDs and Controllers //
269
 //////////////////////////
269
 //////////////////////////
270
 
270
 
271
-#if ENABLED(ULTRA_LCD)
271
+#if HAS_SPI_LCD
272
 
272
 
273
   //
273
   //
274
   // LCD Display output pins
274
   // LCD Display output pins

Loading…
Cancel
Save