Bläddra i källkod

Merge pull request #7070 from thinkyhead/bf_cleanups_fixes

Thursday cleanup / bugfixes
Scott Lahteine 8 år sedan
förälder
incheckning
43c96eb31f

+ 15
- 19
Marlin/Marlin_main.cpp Visa fil

752
   #endif
752
   #endif
753
 
753
 
754
   #define DEBUG_POS(SUFFIX,VAR) do { \
754
   #define DEBUG_POS(SUFFIX,VAR) do { \
755
-    print_xyz(PSTR("  " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
755
+    print_xyz(PSTR("  " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); }while(0)
756
 #endif
756
 #endif
757
 
757
 
758
 /**
758
 /**
3492
       SERIAL_ECHOPAIR("Probe Offset X:", X_PROBE_OFFSET_FROM_EXTRUDER);
3492
       SERIAL_ECHOPAIR("Probe Offset X:", X_PROBE_OFFSET_FROM_EXTRUDER);
3493
       SERIAL_ECHOPAIR(" Y:", Y_PROBE_OFFSET_FROM_EXTRUDER);
3493
       SERIAL_ECHOPAIR(" Y:", Y_PROBE_OFFSET_FROM_EXTRUDER);
3494
       SERIAL_ECHOPAIR(" Z:", zprobe_zoffset);
3494
       SERIAL_ECHOPAIR(" Z:", zprobe_zoffset);
3495
-      #if (X_PROBE_OFFSET_FROM_EXTRUDER > 0)
3495
+      #if X_PROBE_OFFSET_FROM_EXTRUDER > 0
3496
         SERIAL_ECHOPGM(" (Right");
3496
         SERIAL_ECHOPGM(" (Right");
3497
-      #elif (X_PROBE_OFFSET_FROM_EXTRUDER < 0)
3497
+      #elif X_PROBE_OFFSET_FROM_EXTRUDER < 0
3498
         SERIAL_ECHOPGM(" (Left");
3498
         SERIAL_ECHOPGM(" (Left");
3499
-      #elif (Y_PROBE_OFFSET_FROM_EXTRUDER != 0)
3499
+      #elif Y_PROBE_OFFSET_FROM_EXTRUDER != 0
3500
         SERIAL_ECHOPGM(" (Middle");
3500
         SERIAL_ECHOPGM(" (Middle");
3501
       #else
3501
       #else
3502
         SERIAL_ECHOPGM(" (Aligned With");
3502
         SERIAL_ECHOPGM(" (Aligned With");
3503
       #endif
3503
       #endif
3504
-      #if (Y_PROBE_OFFSET_FROM_EXTRUDER > 0)
3504
+      #if Y_PROBE_OFFSET_FROM_EXTRUDER > 0
3505
         SERIAL_ECHOPGM("-Back");
3505
         SERIAL_ECHOPGM("-Back");
3506
-      #elif (Y_PROBE_OFFSET_FROM_EXTRUDER < 0)
3506
+      #elif Y_PROBE_OFFSET_FROM_EXTRUDER < 0
3507
         SERIAL_ECHOPGM("-Front");
3507
         SERIAL_ECHOPGM("-Front");
3508
-      #elif (X_PROBE_OFFSET_FROM_EXTRUDER != 0)
3508
+      #elif X_PROBE_OFFSET_FROM_EXTRUDER != 0
3509
         SERIAL_ECHOPGM("-Center");
3509
         SERIAL_ECHOPGM("-Center");
3510
       #endif
3510
       #endif
3511
       if (zprobe_zoffset < 0)
3511
       if (zprobe_zoffset < 0)
11279
     delta[A_AXIS] = DELTA_Z(A_AXIS); \
11279
     delta[A_AXIS] = DELTA_Z(A_AXIS); \
11280
     delta[B_AXIS] = DELTA_Z(B_AXIS); \
11280
     delta[B_AXIS] = DELTA_Z(B_AXIS); \
11281
     delta[C_AXIS] = DELTA_Z(C_AXIS); \
11281
     delta[C_AXIS] = DELTA_Z(C_AXIS); \
11282
-  } while(0)
11282
+  }while(0)
11283
 
11283
 
11284
   #define DELTA_LOGICAL_IK() do {      \
11284
   #define DELTA_LOGICAL_IK() do {      \
11285
     const float raw[XYZ] = {           \
11285
     const float raw[XYZ] = {           \
11288
       RAW_Z_POSITION(logical[Z_AXIS])  \
11288
       RAW_Z_POSITION(logical[Z_AXIS])  \
11289
     };                                 \
11289
     };                                 \
11290
     DELTA_RAW_IK();                    \
11290
     DELTA_RAW_IK();                    \
11291
-  } while(0)
11291
+  }while(0)
11292
 
11292
 
11293
   #define DELTA_DEBUG() do { \
11293
   #define DELTA_DEBUG() do { \
11294
       SERIAL_ECHOPAIR("cartesian X:", raw[X_AXIS]); \
11294
       SERIAL_ECHOPAIR("cartesian X:", raw[X_AXIS]); \
11297
       SERIAL_ECHOPAIR("delta A:", delta[A_AXIS]);   \
11297
       SERIAL_ECHOPAIR("delta A:", delta[A_AXIS]);   \
11298
       SERIAL_ECHOPAIR(" B:", delta[B_AXIS]);        \
11298
       SERIAL_ECHOPAIR(" B:", delta[B_AXIS]);        \
11299
       SERIAL_ECHOLNPAIR(" C:", delta[C_AXIS]);      \
11299
       SERIAL_ECHOLNPAIR(" C:", delta[C_AXIS]);      \
11300
-    } while(0)
11300
+    }while(0)
11301
 
11301
 
11302
   void inverse_kinematics(const float logical[XYZ]) {
11302
   void inverse_kinematics(const float logical[XYZ]) {
11303
     DELTA_LOGICAL_IK();
11303
     DELTA_LOGICAL_IK();
11847
           SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
11847
           SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
11848
         }
11848
         }
11849
         #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
11849
         #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
11850
-          if (labs(destination[E_AXIS] - current_position[E_AXIS]) > EXTRUDE_MAXLENGTH) {
11850
+          if (destination[E_AXIS] - current_position[E_AXIS] > EXTRUDE_MAXLENGTH) {
11851
             current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
11851
             current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
11852
             SERIAL_ECHO_START();
11852
             SERIAL_ECHO_START();
11853
             SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
11853
             SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
11859
   #endif
11859
   #endif
11860
 
11860
 
11861
   if (
11861
   if (
11862
-    #if IS_KINEMATIC
11863
-      #if UBL_DELTA
11864
-        ubl.prepare_segmented_line_to(destination, feedrate_mm_s)
11865
-      #else
11866
-        prepare_kinematic_move_to(destination)
11867
-      #endif
11862
+    #if UBL_DELTA // Also works for CARTESIAN (smaller segments follow mesh more closely)
11863
+      ubl.prepare_segmented_line_to(destination, feedrate_mm_s)
11864
+    #elif IS_KINEMATIC
11865
+      prepare_kinematic_move_to(destination)
11868
     #elif ENABLED(DUAL_X_CARRIAGE)
11866
     #elif ENABLED(DUAL_X_CARRIAGE)
11869
       prepare_move_to_destination_dualx()
11867
       prepare_move_to_destination_dualx()
11870
-    #elif UBL_DELTA // will work for CARTESIAN too (smaller segments follow mesh more closely)
11871
-      ubl.prepare_segmented_line_to(destination, feedrate_mm_s)
11872
     #else
11868
     #else
11873
       prepare_move_to_destination_cartesian()
11869
       prepare_move_to_destination_cartesian()
11874
     #endif
11870
     #endif

+ 0
- 4
Marlin/fastio.h Visa fil

215
 
215
 
216
 // Set Compare Mode bits
216
 // Set Compare Mode bits
217
 #define _SET_COM(T,Q,V) (TCCR##T##Q = (TCCR##T##Q & ~(0x3 << COM##T##Q##0)) | (int(V) << COM##T##Q##0))
217
 #define _SET_COM(T,Q,V) (TCCR##T##Q = (TCCR##T##Q & ~(0x3 << COM##T##Q##0)) | (int(V) << COM##T##Q##0))
218
-#define _SET_COMA(T,V) _SET_COM(T,A,V)
219
-#define _SET_COMB(T,V) _SET_COM(T,B,V)
220
-#define _SET_COMC(T,V) _SET_COM(T,C,V)
221
-#define _SET_COMS(T,V1,V2,V3) do{ _SET_COMA(T,V1); _SET_COMB(T,V2); _SET_COMC(T,V3); }while(0)
222
 #define SET_COM(T,Q,V) _SET_COM(T,Q,COM_##V)
218
 #define SET_COM(T,Q,V) _SET_COM(T,Q,COM_##V)
223
 #define SET_COMA(T,V) SET_COM(T,A,V)
219
 #define SET_COMA(T,V) SET_COM(T,A,V)
224
 #define SET_COMB(T,V) SET_COM(T,B,V)
220
 #define SET_COMB(T,V) SET_COM(T,B,V)

+ 36
- 37
Marlin/pinsDebug_plus_70.h Visa fil

25
  *  structurs for 2560 family boards that use morre than 70 pins
25
  *  structurs for 2560 family boards that use morre than 70 pins
26
  */
26
  */
27
 
27
 
28
-#ifndef Plus_70_h
29
-  #define Plus_70_h
30
-  
28
+#ifndef __PINSDEBUG_PLUS_70_H__
29
+#define __PINSDEBUG_PLUS_70_H__
30
+
31
 #undef NUM_DIGITAL_PINS
31
 #undef NUM_DIGITAL_PINS
32
 #if MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D
32
 #if MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D
33
   #define NUM_DIGITAL_PINS            85
33
   #define NUM_DIGITAL_PINS            85
124
   PK  , // PK 5 ** 67 ** A13
124
   PK  , // PK 5 ** 67 ** A13
125
   PK  , // PK 6 ** 68 ** A14
125
   PK  , // PK 6 ** 68 ** A14
126
   PK  , // PK 7 ** 69 ** A15
126
   PK  , // PK 7 ** 69 ** A15
127
-  PG  , // PG 4 ** 70 ** 
128
-  PG  , // PG 3 ** 71 ** 
129
-  PJ  , // PJ 2 ** 72 ** 
130
-  PJ  , // PJ 3 ** 73 ** 
131
-  PJ  , // PJ 7 ** 74 ** 
132
-  PJ  , // PJ 4 ** 75 ** 
133
-  PJ  , // PJ 5 ** 76 ** 
134
-  PJ  , // PJ 6 ** 77 ** 
135
-  PE  , // PE 2 ** 78 ** 
136
-  PE  , // PE 6 ** 79 ** 
137
-  PE  , // PE 7 ** 80 ** 
138
-  PD  , // PD 4 ** 81 ** 
139
-  PD  , // PD 5 ** 82 ** 
140
-  PD  , // PD 6 ** 83 ** 
141
-  PH  , // PH 2 ** 84 ** 
142
-  PH  , // PH 7 ** 85 ** 
127
+  PG  , // PG 4 ** 70 **
128
+  PG  , // PG 3 ** 71 **
129
+  PJ  , // PJ 2 ** 72 **
130
+  PJ  , // PJ 3 ** 73 **
131
+  PJ  , // PJ 7 ** 74 **
132
+  PJ  , // PJ 4 ** 75 **
133
+  PJ  , // PJ 5 ** 76 **
134
+  PJ  , // PJ 6 ** 77 **
135
+  PE  , // PE 2 ** 78 **
136
+  PE  , // PE 6 ** 79 **
137
+  PE  , // PE 7 ** 80 **
138
+  PD  , // PD 4 ** 81 **
139
+  PD  , // PD 5 ** 82 **
140
+  PD  , // PD 6 ** 83 **
141
+  PH  , // PH 2 ** 84 **
142
+  PH  , // PH 7 ** 85 **
143
 };
143
 };
144
 
144
 
145
 #define digitalPinToPort_plus_70(P) ( pgm_read_byte( digital_pin_to_port_PGM_plus_70 + (P) ) )
145
 #define digitalPinToPort_plus_70(P) ( pgm_read_byte( digital_pin_to_port_PGM_plus_70 + (P) ) )
217
   _BV( 5 )  , // PK 5 ** 67 ** A13
217
   _BV( 5 )  , // PK 5 ** 67 ** A13
218
   _BV( 6 )  , // PK 6 ** 68 ** A14
218
   _BV( 6 )  , // PK 6 ** 68 ** A14
219
   _BV( 7 )  , // PK 7 ** 69 ** A15
219
   _BV( 7 )  , // PK 7 ** 69 ** A15
220
-  _BV( 4 )  , // PG 4 ** 70 ** 
221
-  _BV( 3 )  , // PG 3 ** 71 ** 
222
-  _BV( 2 )  , // PJ 2 ** 72 ** 
223
-  _BV( 3 )  , // PJ 3 ** 73 ** 
224
-  _BV( 7 )  , // PJ 7 ** 74 ** 
225
-  _BV( 4 )  , // PJ 4 ** 75 ** 
226
-  _BV( 5 )  , // PJ 5 ** 76 ** 
227
-  _BV( 6 )  , // PJ 6 ** 77 ** 
228
-  _BV( 2 )  , // PE 2 ** 78 ** 
229
-  _BV( 6 )  , // PE 6 ** 79 ** 
230
-  _BV( 7 )  , // PE 7 ** 80 ** 
231
-  _BV( 4 )  , // PD 4 ** 81 ** 
232
-  _BV( 5 )  , // PD 5 ** 82 ** 
233
-  _BV( 6 )  , // PD 6 ** 83 ** 
234
-  _BV( 2 )  , // PH 2 ** 84 ** 
235
-  _BV( 7 )  , // PH 7 ** 85 ** 
220
+  _BV( 4 )  , // PG 4 ** 70 **
221
+  _BV( 3 )  , // PG 3 ** 71 **
222
+  _BV( 2 )  , // PJ 2 ** 72 **
223
+  _BV( 3 )  , // PJ 3 ** 73 **
224
+  _BV( 7 )  , // PJ 7 ** 74 **
225
+  _BV( 4 )  , // PJ 4 ** 75 **
226
+  _BV( 5 )  , // PJ 5 ** 76 **
227
+  _BV( 6 )  , // PJ 6 ** 77 **
228
+  _BV( 2 )  , // PE 2 ** 78 **
229
+  _BV( 6 )  , // PE 6 ** 79 **
230
+  _BV( 7 )  , // PE 7 ** 80 **
231
+  _BV( 4 )  , // PD 4 ** 81 **
232
+  _BV( 5 )  , // PD 5 ** 82 **
233
+  _BV( 6 )  , // PD 6 ** 83 **
234
+  _BV( 2 )  , // PH 2 ** 84 **
235
+  _BV( 7 )  , // PH 7 ** 85 **
236
 };
236
 };
237
 
237
 
238
 #define digitalPinToBitMask_plus_70(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM_plus_70 + (P) ) )
238
 #define digitalPinToBitMask_plus_70(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM_plus_70 + (P) ) )
338
  */
338
  */
339
 
339
 
340
 
340
 
341
-#endif
342
-
341
+#endif // __PINSDEBUG_PLUS_70_H__

+ 1
- 1
Marlin/pins_SETHI.h Visa fil

99
 #define HEATER_BED_PIN      3
99
 #define HEATER_BED_PIN      3
100
 
100
 
101
 
101
 
102
-#if (GEN7_VERSION >= 13)
102
+#if GEN7_VERSION >= 13
103
   // Gen7 v1.3 removed the fan pin
103
   // Gen7 v1.3 removed the fan pin
104
   #define FAN_PIN          -1
104
   #define FAN_PIN          -1
105
 #else
105
 #else

+ 10
- 1
Marlin/stepper.cpp Visa fil

370
         ocr_val = (remainder < OCR_VAL_TOLERANCE) ? ENDSTOP_NOMINAL_OCR_VAL + remainder : ENDSTOP_NOMINAL_OCR_VAL; \
370
         ocr_val = (remainder < OCR_VAL_TOLERANCE) ? ENDSTOP_NOMINAL_OCR_VAL + remainder : ENDSTOP_NOMINAL_OCR_VAL; \
371
         step_remaining = (uint16_t)L - ocr_val; \
371
         step_remaining = (uint16_t)L - ocr_val; \
372
       } \
372
       } \
373
-    } while(0)
373
+    }while(0)
374
 
374
 
375
     if (step_remaining && ENDSTOPS_ENABLED) {   // Just check endstops - not yet time for a step
375
     if (step_remaining && ENDSTOPS_ENABLED) {   // Just check endstops - not yet time for a step
376
       endstops.update();
376
       endstops.update();
862
         SET_E_STEP_DIR(2);
862
         SET_E_STEP_DIR(2);
863
         #if E_STEPPERS > 3
863
         #if E_STEPPERS > 3
864
           SET_E_STEP_DIR(3);
864
           SET_E_STEP_DIR(3);
865
+          #if E_STEPPERS > 4
866
+            SET_E_STEP_DIR(4);
867
+          #endif
865
         #endif
868
         #endif
866
       #endif
869
       #endif
867
     #endif
870
     #endif
880
           START_E_PULSE(2);
883
           START_E_PULSE(2);
881
           #if E_STEPPERS > 3
884
           #if E_STEPPERS > 3
882
             START_E_PULSE(3);
885
             START_E_PULSE(3);
886
+            #if E_STEPPERS > 4
887
+              START_E_PULSE(4);
888
+            #endif
883
           #endif
889
           #endif
884
         #endif
890
         #endif
885
       #endif
891
       #endif
899
           STOP_E_PULSE(2);
905
           STOP_E_PULSE(2);
900
           #if E_STEPPERS > 3
906
           #if E_STEPPERS > 3
901
             STOP_E_PULSE(3);
907
             STOP_E_PULSE(3);
908
+            #if E_STEPPERS > 4
909
+              STOP_E_PULSE(4);
910
+            #endif
902
           #endif
911
           #endif
903
         #endif
912
         #endif
904
       #endif
913
       #endif

+ 1
- 1
Marlin/stepper_indirection.cpp Visa fil

296
     stepper##A.setMicroSteps(A##_MICROSTEPS); \
296
     stepper##A.setMicroSteps(A##_MICROSTEPS); \
297
     stepper##A.setOverCurrent(A##_OVERCURRENT); \
297
     stepper##A.setOverCurrent(A##_OVERCURRENT); \
298
     stepper##A.setStallCurrent(A##_STALLCURRENT); \
298
     stepper##A.setStallCurrent(A##_STALLCURRENT); \
299
-  } while(0)
299
+  }while(0)
300
 
300
 
301
   void L6470_init() {
301
   void L6470_init() {
302
     #if ENABLED(X_IS_L6470)
302
     #if ENABLED(X_IS_L6470)

+ 12
- 12
Marlin/temperature.cpp Visa fil

421
           bedKp = workKp; \
421
           bedKp = workKp; \
422
           bedKi = scalePID_i(workKi); \
422
           bedKi = scalePID_i(workKi); \
423
           bedKd = scalePID_d(workKd); \
423
           bedKd = scalePID_d(workKd); \
424
-          updatePID(); } while(0)
424
+          updatePID(); }while(0)
425
 
425
 
426
         #define _SET_EXTRUDER_PID() do { \
426
         #define _SET_EXTRUDER_PID() do { \
427
           PID_PARAM(Kp, hotend) = workKp; \
427
           PID_PARAM(Kp, hotend) = workKp; \
428
           PID_PARAM(Ki, hotend) = scalePID_i(workKi); \
428
           PID_PARAM(Ki, hotend) = scalePID_i(workKi); \
429
           PID_PARAM(Kd, hotend) = scalePID_d(workKd); \
429
           PID_PARAM(Kd, hotend) = scalePID_d(workKd); \
430
-          updatePID(); } while(0)
430
+          updatePID(); }while(0)
431
 
431
 
432
         // Use the result? (As with "M303 U1")
432
         // Use the result? (As with "M303 U1")
433
         if (set_result) {
433
         if (set_result) {
505
 //
505
 //
506
 // Temperature Error Handlers
506
 // Temperature Error Handlers
507
 //
507
 //
508
-void Temperature::_temp_error(int e, const char* serial_msg, const char* lcd_msg) {
508
+void Temperature::_temp_error(const int8_t e, const char * const serial_msg, const char * const lcd_msg) {
509
   static bool killed = false;
509
   static bool killed = false;
510
   if (IsRunning()) {
510
   if (IsRunning()) {
511
     SERIAL_ERROR_START();
511
     SERIAL_ERROR_START();
524
   #endif
524
   #endif
525
 }
525
 }
526
 
526
 
527
-void Temperature::max_temp_error(int8_t e) {
527
+void Temperature::max_temp_error(const int8_t e) {
528
   #if HAS_TEMP_BED
528
   #if HAS_TEMP_BED
529
     _temp_error(e, PSTR(MSG_T_MAXTEMP), e >= 0 ? PSTR(MSG_ERR_MAXTEMP) : PSTR(MSG_ERR_MAXTEMP_BED));
529
     _temp_error(e, PSTR(MSG_T_MAXTEMP), e >= 0 ? PSTR(MSG_ERR_MAXTEMP) : PSTR(MSG_ERR_MAXTEMP_BED));
530
   #else
530
   #else
534
     #endif
534
     #endif
535
   #endif
535
   #endif
536
 }
536
 }
537
-void Temperature::min_temp_error(int8_t e) {
537
+void Temperature::min_temp_error(const int8_t e) {
538
   #if HAS_TEMP_BED
538
   #if HAS_TEMP_BED
539
     _temp_error(e, PSTR(MSG_T_MINTEMP), e >= 0 ? PSTR(MSG_ERR_MINTEMP) : PSTR(MSG_ERR_MINTEMP_BED));
539
     _temp_error(e, PSTR(MSG_T_MINTEMP), e >= 0 ? PSTR(MSG_ERR_MINTEMP) : PSTR(MSG_ERR_MINTEMP_BED));
540
   #else
540
   #else
545
   #endif
545
   #endif
546
 }
546
 }
547
 
547
 
548
-float Temperature::get_pid_output(int e) {
548
+float Temperature::get_pid_output(const int8_t e) {
549
   #if HOTENDS == 1
549
   #if HOTENDS == 1
550
     UNUSED(e);
550
     UNUSED(e);
551
     #define _HOTEND_TEST     true
551
     #define _HOTEND_TEST     true
890
 
890
 
891
 // Derived from RepRap FiveD extruder::getTemperature()
891
 // Derived from RepRap FiveD extruder::getTemperature()
892
 // For bed temperature measurement.
892
 // For bed temperature measurement.
893
-float Temperature::analog2tempBed(int raw) {
893
+float Temperature::analog2tempBed(const int raw) {
894
   #if ENABLED(BED_USES_THERMISTOR)
894
   #if ENABLED(BED_USES_THERMISTOR)
895
     float celsius = 0;
895
     float celsius = 0;
896
     byte i;
896
     byte i;
1148
 
1148
 
1149
   #define TEMP_MIN_ROUTINE(NR) \
1149
   #define TEMP_MIN_ROUTINE(NR) \
1150
     minttemp[NR] = HEATER_ ##NR## _MINTEMP; \
1150
     minttemp[NR] = HEATER_ ##NR## _MINTEMP; \
1151
-    while(analog2temp(minttemp_raw[NR], NR) < HEATER_ ##NR## _MINTEMP) { \
1151
+    while (analog2temp(minttemp_raw[NR], NR) < HEATER_ ##NR## _MINTEMP) { \
1152
       if (HEATER_ ##NR## _RAW_LO_TEMP < HEATER_ ##NR## _RAW_HI_TEMP) \
1152
       if (HEATER_ ##NR## _RAW_LO_TEMP < HEATER_ ##NR## _RAW_HI_TEMP) \
1153
         minttemp_raw[NR] += OVERSAMPLENR; \
1153
         minttemp_raw[NR] += OVERSAMPLENR; \
1154
       else \
1154
       else \
1156
     }
1156
     }
1157
   #define TEMP_MAX_ROUTINE(NR) \
1157
   #define TEMP_MAX_ROUTINE(NR) \
1158
     maxttemp[NR] = HEATER_ ##NR## _MAXTEMP; \
1158
     maxttemp[NR] = HEATER_ ##NR## _MAXTEMP; \
1159
-    while(analog2temp(maxttemp_raw[NR], NR) > HEATER_ ##NR## _MAXTEMP) { \
1159
+    while (analog2temp(maxttemp_raw[NR], NR) > HEATER_ ##NR## _MAXTEMP) { \
1160
       if (HEATER_ ##NR## _RAW_LO_TEMP < HEATER_ ##NR## _RAW_HI_TEMP) \
1160
       if (HEATER_ ##NR## _RAW_LO_TEMP < HEATER_ ##NR## _RAW_HI_TEMP) \
1161
         maxttemp_raw[NR] -= OVERSAMPLENR; \
1161
         maxttemp_raw[NR] -= OVERSAMPLENR; \
1162
       else \
1162
       else \
1203
   #endif // HOTENDS > 1
1203
   #endif // HOTENDS > 1
1204
 
1204
 
1205
   #ifdef BED_MINTEMP
1205
   #ifdef BED_MINTEMP
1206
-    while(analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
1206
+    while (analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
1207
       #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
1207
       #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
1208
         bed_minttemp_raw += OVERSAMPLENR;
1208
         bed_minttemp_raw += OVERSAMPLENR;
1209
       #else
1209
       #else
1292
         SERIAL_EOL();
1292
         SERIAL_EOL();
1293
     */
1293
     */
1294
 
1294
 
1295
-    int heater_index = heater_id >= 0 ? heater_id : HOTENDS;
1295
+    const int heater_index = heater_id >= 0 ? heater_id : HOTENDS;
1296
 
1296
 
1297
     #if HEATER_IDLE_HANDLER
1297
     #if HEATER_IDLE_HANDLER
1298
       // If the heater idle timeout expires, restart
1298
       // If the heater idle timeout expires, restart
1922
     case SensorsReady: {
1922
     case SensorsReady: {
1923
       // All sensors have been read. Stay in this state for a few
1923
       // All sensors have been read. Stay in this state for a few
1924
       // ISRs to save on calls to temp update/checking code below.
1924
       // ISRs to save on calls to temp update/checking code below.
1925
-      constexpr int extra_loops = MIN_ADC_ISR_LOOPS - (int)SensorsReady;
1925
+      constexpr int8_t extra_loops = MIN_ADC_ISR_LOOPS - (int8_t)SensorsReady;
1926
       static uint8_t delay_count = 0;
1926
       static uint8_t delay_count = 0;
1927
       if (extra_loops > 0) {
1927
       if (extra_loops > 0) {
1928
         if (delay_count == 0) delay_count = extra_loops;   // Init this delay
1928
         if (delay_count == 0) delay_count = extra_loops;   // Init this delay

+ 4
- 4
Marlin/temperature.h Visa fil

535
 
535
 
536
     static void checkExtruderAutoFans();
536
     static void checkExtruderAutoFans();
537
 
537
 
538
-    static float get_pid_output(int e);
538
+    static float get_pid_output(const int8_t e);
539
 
539
 
540
     #if ENABLED(PIDTEMPBED)
540
     #if ENABLED(PIDTEMPBED)
541
       static float get_pid_output_bed();
541
       static float get_pid_output_bed();
542
     #endif
542
     #endif
543
 
543
 
544
-    static void _temp_error(int e, const char* serial_msg, const char* lcd_msg);
545
-    static void min_temp_error(int8_t e);
546
-    static void max_temp_error(int8_t e);
544
+    static void _temp_error(const int8_t e, const char * const serial_msg, const char * const lcd_msg);
545
+    static void min_temp_error(const int8_t e);
546
+    static void max_temp_error(const int8_t e);
547
 
547
 
548
     #if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED
548
     #if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED
549
 
549
 

+ 6
- 6
Marlin/thermistortable_20.h Visa fil

23
 // PT100 with INA826 amp on Ultimaker v2.0 electronics
23
 // PT100 with INA826 amp on Ultimaker v2.0 electronics
24
 // The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
24
 // The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
25
 // This does not match the normal thermistor behaviour so we need to set the following defines
25
 // This does not match the normal thermistor behaviour so we need to set the following defines
26
-#if (THERMISTORHEATER_0 == 20)
26
+#if THERMISTORHEATER_0 == 20
27
   #define HEATER_0_RAW_HI_TEMP 16383
27
   #define HEATER_0_RAW_HI_TEMP 16383
28
   #define HEATER_0_RAW_LO_TEMP 0
28
   #define HEATER_0_RAW_LO_TEMP 0
29
 #endif
29
 #endif
30
-#if (THERMISTORHEATER_1 == 20)
30
+#if THERMISTORHEATER_1 == 20
31
   #define HEATER_1_RAW_HI_TEMP 16383
31
   #define HEATER_1_RAW_HI_TEMP 16383
32
   #define HEATER_1_RAW_LO_TEMP 0
32
   #define HEATER_1_RAW_LO_TEMP 0
33
 #endif
33
 #endif
34
-#if (THERMISTORHEATER_2 == 20)
34
+#if THERMISTORHEATER_2 == 20
35
   #define HEATER_2_RAW_HI_TEMP 16383
35
   #define HEATER_2_RAW_HI_TEMP 16383
36
   #define HEATER_2_RAW_LO_TEMP 0
36
   #define HEATER_2_RAW_LO_TEMP 0
37
 #endif
37
 #endif
38
-#if (THERMISTORHEATER_3 == 20)
38
+#if THERMISTORHEATER_3 == 20
39
   #define HEATER_3_RAW_HI_TEMP 16383
39
   #define HEATER_3_RAW_HI_TEMP 16383
40
   #define HEATER_3_RAW_LO_TEMP 0
40
   #define HEATER_3_RAW_LO_TEMP 0
41
 #endif
41
 #endif
42
-#if (THERMISTORHEATER_4 == 20)
42
+#if THERMISTORHEATER_4 == 20
43
   #define HEATER_4_RAW_HI_TEMP 16383
43
   #define HEATER_4_RAW_HI_TEMP 16383
44
   #define HEATER_4_RAW_LO_TEMP 0
44
   #define HEATER_4_RAW_LO_TEMP 0
45
 #endif
45
 #endif
46
-#if (THERMISTORBED == 20)
46
+#if THERMISTORBED == 20
47
   #define HEATER_BED_RAW_HI_TEMP 16383
47
   #define HEATER_BED_RAW_HI_TEMP 16383
48
   #define HEATER_BED_RAW_LO_TEMP 0
48
   #define HEATER_BED_RAW_LO_TEMP 0
49
 #endif
49
 #endif

+ 2
- 2
Marlin/ubl_G29.cpp Visa fil

45
     void lcd_mesh_edit_setup(float initial);
45
     void lcd_mesh_edit_setup(float initial);
46
     float lcd_mesh_edit();
46
     float lcd_mesh_edit();
47
     void lcd_z_offset_edit_setup(float);
47
     void lcd_z_offset_edit_setup(float);
48
-    #ifdef DOGLCD
48
+    #if ENABLED(DOGLCD)
49
       extern void _lcd_ubl_output_map_lcd();
49
       extern void _lcd_ubl_output_map_lcd();
50
     #endif
50
     #endif
51
     float lcd_z_offset_edit();
51
     float lcd_z_offset_edit();
1575
       SERIAL_ECHOLNPGM("Done Editing Mesh");
1575
       SERIAL_ECHOLNPGM("Done Editing Mesh");
1576
 
1576
 
1577
       if (ubl_lcd_map_control) {
1577
       if (ubl_lcd_map_control) {
1578
-        #ifdef DOGLCD
1578
+        #if ENABLED(DOGLCD)
1579
         lcd_goto_screen(_lcd_ubl_output_map_lcd);
1579
         lcd_goto_screen(_lcd_ubl_output_map_lcd);
1580
         #endif
1580
         #endif
1581
       }
1581
       }

+ 34
- 32
Marlin/ultralcd.cpp Visa fil

257
       _skipStatic = false; \
257
       _skipStatic = false; \
258
       _MENU_ITEM_PART_1(TYPE, ## __VA_ARGS__); \
258
       _MENU_ITEM_PART_1(TYPE, ## __VA_ARGS__); \
259
       _MENU_ITEM_PART_2(TYPE, LABEL, ## __VA_ARGS__); \
259
       _MENU_ITEM_PART_2(TYPE, LABEL, ## __VA_ARGS__); \
260
-    } while(0)
260
+    }while(0)
261
 
261
 
262
   #define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
262
   #define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
263
 
263
 
289
         encoderRateMultiplierEnabled = true; \
289
         encoderRateMultiplierEnabled = true; \
290
         lastEncoderMovementMillis = 0; \
290
         lastEncoderMovementMillis = 0; \
291
         _MENU_ITEM_PART_2(type, label, ## __VA_ARGS__); \
291
         _MENU_ITEM_PART_2(type, label, ## __VA_ARGS__); \
292
-      } while(0)
292
+      }while(0)
293
 
293
 
294
   #else // !ENCODER_RATE_MULTIPLIER
294
   #else // !ENCODER_RATE_MULTIPLIER
295
     #define ENCODER_RATE_MULTIPLY(F) NOOP
295
     #define ENCODER_RATE_MULTIPLY(F) NOOP
296
   #endif // !ENCODER_RATE_MULTIPLIER
296
   #endif // !ENCODER_RATE_MULTIPLIER
297
 
297
 
298
-  #define MENU_ITEM_DUMMY() do { _thisItemNr++; } while(0)
298
+  #define MENU_ITEM_DUMMY() do { _thisItemNr++; }while(0)
299
   #define MENU_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
299
   #define MENU_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
300
   #define MENU_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
300
   #define MENU_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
301
   #if ENABLED(ENCODER_RATE_MULTIPLIER)
301
   #if ENABLED(ENCODER_RATE_MULTIPLIER)
1098
     #endif // HOTENDS > 1
1098
     #endif // HOTENDS > 1
1099
   #endif // HAS_TEMP_HOTEND
1099
   #endif // HAS_TEMP_HOTEND
1100
 
1100
 
1101
-  #if WATCH_THE_BED
1102
-    void watch_temp_callback_bed() { thermalManager.start_watching_bed(); }
1103
-  #endif
1101
+  void watch_temp_callback_bed() {
1102
+    #if WATCH_THE_BED
1103
+      thermalManager.start_watching_bed();
1104
+    #endif
1105
+  }
1104
 
1106
 
1105
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
1107
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
1106
 
1108
 
1162
     //
1164
     //
1163
     // Bed:
1165
     // Bed:
1164
     //
1166
     //
1165
-    #if WATCH_THE_BED
1167
+    #if HAS_TEMP_BED
1166
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
1168
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
1167
     #endif
1169
     #endif
1168
 
1170
 
1810
     void _lcd_ubl_build_custom_mesh() {
1812
     void _lcd_ubl_build_custom_mesh() {
1811
       char UBL_LCD_GCODE[20];
1813
       char UBL_LCD_GCODE[20];
1812
       enqueue_and_echo_commands_P(PSTR("G28"));
1814
       enqueue_and_echo_commands_P(PSTR("G28"));
1813
-      #if WATCH_THE_BED
1815
+      #if HAS_TEMP_BED
1814
         sprintf_P(UBL_LCD_GCODE, PSTR("M190 S%i"), custom_bed_temp);
1816
         sprintf_P(UBL_LCD_GCODE, PSTR("M190 S%i"), custom_bed_temp);
1815
         enqueue_and_echo_command(UBL_LCD_GCODE);
1817
         enqueue_and_echo_command(UBL_LCD_GCODE);
1816
       #endif
1818
       #endif
1826
       START_MENU();
1828
       START_MENU();
1827
       MENU_BACK(MSG_UBL_BUILD_MESH_MENU);
1829
       MENU_BACK(MSG_UBL_BUILD_MESH_MENU);
1828
       MENU_ITEM_EDIT(int3, MSG_UBL_CUSTOM_HOTEND_TEMP, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 10));
1830
       MENU_ITEM_EDIT(int3, MSG_UBL_CUSTOM_HOTEND_TEMP, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 10));
1829
-      #if WATCH_THE_BED
1831
+      #if HAS_TEMP_BED
1830
         MENU_ITEM_EDIT(int3, MSG_UBL_CUSTOM_BED_TEMP, &custom_bed_temp, BED_MINTEMP, (BED_MAXTEMP - 5));
1832
         MENU_ITEM_EDIT(int3, MSG_UBL_CUSTOM_BED_TEMP, &custom_bed_temp, BED_MINTEMP, (BED_MAXTEMP - 5));
1831
       #endif
1833
       #endif
1832
       MENU_ITEM(function, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_build_custom_mesh);
1834
       MENU_ITEM(function, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_build_custom_mesh);
1875
     void _lcd_ubl_validate_custom_mesh() {
1877
     void _lcd_ubl_validate_custom_mesh() {
1876
       char UBL_LCD_GCODE[24];
1878
       char UBL_LCD_GCODE[24];
1877
       const int temp =
1879
       const int temp =
1878
-        #if WATCH_THE_BED
1880
+        #if HAS_TEMP_BED
1879
           custom_bed_temp
1881
           custom_bed_temp
1880
         #else
1882
         #else
1881
           0
1883
           0
1891
     void _lcd_ubl_validate_mesh() {
1893
     void _lcd_ubl_validate_mesh() {
1892
       START_MENU();
1894
       START_MENU();
1893
       MENU_BACK(MSG_UBL_TOOLS);
1895
       MENU_BACK(MSG_UBL_TOOLS);
1894
-      #if WATCH_THE_BED
1896
+      #if HAS_TEMP_BED
1895
         MENU_ITEM(gcode, MSG_UBL_VALIDATE_PLA_MESH, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_1_TEMP_BED) " H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P"));
1897
         MENU_ITEM(gcode, MSG_UBL_VALIDATE_PLA_MESH, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_1_TEMP_BED) " H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P"));
1896
         MENU_ITEM(gcode, MSG_UBL_VALIDATE_ABS_MESH, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_2_TEMP_BED) " H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P"));
1898
         MENU_ITEM(gcode, MSG_UBL_VALIDATE_ABS_MESH, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_2_TEMP_BED) " H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P"));
1897
       #else
1899
       #else
1978
     void _lcd_ubl_build_mesh() {
1980
     void _lcd_ubl_build_mesh() {
1979
       START_MENU();
1981
       START_MENU();
1980
       MENU_BACK(MSG_UBL_TOOLS);
1982
       MENU_BACK(MSG_UBL_TOOLS);
1981
-      #if WATCH_THE_BED
1983
+      #if HAS_TEMP_BED
1982
         MENU_ITEM(gcode, MSG_UBL_BUILD_PLA_MESH, PSTR(
1984
         MENU_ITEM(gcode, MSG_UBL_BUILD_PLA_MESH, PSTR(
1983
           "G28\n"
1985
           "G28\n"
1984
           "M190 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\n"
1986
           "M190 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\n"
2075
       enqueue_and_echo_command(ubl_lcd_gcode);
2077
       enqueue_and_echo_command(ubl_lcd_gcode);
2076
     }
2078
     }
2077
 
2079
 
2078
-  #ifdef DOGLCD
2080
+  #if ENABLED(DOGLCD)
2079
 
2081
 
2080
     /**
2082
     /**
2081
      * UBL LCD "radar" map data
2083
      * UBL LCD "radar" map data
2082
      */
2084
      */
2083
-  #define MAP_UPPER_LEFT_CORNER_X 35  // These probably should be moved to the .h file  But for now,
2084
-  #define MAP_UPPER_LEFT_CORNER_Y 8  // it is easier to play with things having them here
2085
-  #define MAP_MAX_PIXELS_X        53
2086
-  #define MAP_MAX_PIXELS_Y        49
2085
+    #define MAP_UPPER_LEFT_CORNER_X 35  // These probably should be moved to the .h file  But for now,
2086
+    #define MAP_UPPER_LEFT_CORNER_Y 8   // it is easier to play with things having them here
2087
+    #define MAP_MAX_PIXELS_X        53
2088
+    #define MAP_MAX_PIXELS_Y        49
2087
 
2089
 
2088
     void _lcd_ubl_plot_drawing_prep() {
2090
     void _lcd_ubl_plot_drawing_prep() {
2089
-      uint8_t i, j, x_offset, y_offset, x_map_pixels, y_map_pixels;
2090
-      uint8_t pixels_per_X_mesh_pnt, pixels_per_Y_mesh_pnt, inverted_y;
2091
+      uint8_t i, j, x_offset, y_offset, x_map_pixels, y_map_pixels,
2092
+              pixels_per_X_mesh_pnt, pixels_per_Y_mesh_pnt, inverted_y;
2091
 
2093
 
2092
       /*********************************************************/
2094
       /*********************************************************/
2093
       /************ Scale the box pixels appropriately *********/
2095
       /************ Scale the box pixels appropriately *********/
2098
       pixels_per_X_mesh_pnt = x_map_pixels / GRID_MAX_POINTS_X;
2100
       pixels_per_X_mesh_pnt = x_map_pixels / GRID_MAX_POINTS_X;
2099
       pixels_per_Y_mesh_pnt = y_map_pixels / GRID_MAX_POINTS_Y;
2101
       pixels_per_Y_mesh_pnt = y_map_pixels / GRID_MAX_POINTS_Y;
2100
 
2102
 
2101
-      x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X-x_map_pixels-2)/2;
2102
-      y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y-y_map_pixels-2)/2;
2103
+      x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2;
2104
+      y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2;
2103
 
2105
 
2104
       /*********************************************************/
2106
       /*********************************************************/
2105
       /************ Clear the Mesh Map Box**********************/
2107
       /************ Clear the Mesh Map Box**********************/
2106
       /*********************************************************/
2108
       /*********************************************************/
2107
 
2109
 
2108
       u8g.setColorIndex(1);  // First draw the bigger box in White so we have a border around the mesh map box
2110
       u8g.setColorIndex(1);  // First draw the bigger box in White so we have a border around the mesh map box
2109
-      u8g.drawBox(x_offset-2, y_offset-2, x_map_pixels+4, y_map_pixels+4);
2111
+      u8g.drawBox(x_offset - 2, y_offset - 2, x_map_pixels + 4, y_map_pixels + 4);
2110
 
2112
 
2111
       u8g.setColorIndex(0);  // Now actually clear the mesh map box
2113
       u8g.setColorIndex(0);  // Now actually clear the mesh map box
2112
       u8g.drawBox(x_offset, y_offset, x_map_pixels, y_map_pixels);
2114
       u8g.drawBox(x_offset, y_offset, x_map_pixels, y_map_pixels);
2118
       u8g.setColorIndex(1);
2120
       u8g.setColorIndex(1);
2119
       for (i = 0; i < GRID_MAX_POINTS_X; i++) {
2121
       for (i = 0; i < GRID_MAX_POINTS_X; i++) {
2120
         for (j = 0; j < GRID_MAX_POINTS_Y; j++) {
2122
         for (j = 0; j < GRID_MAX_POINTS_Y; j++) {
2121
-          u8g.drawBox(x_offset+i*pixels_per_X_mesh_pnt+pixels_per_X_mesh_pnt/2,  
2122
-                      y_offset+j*pixels_per_Y_mesh_pnt+pixels_per_Y_mesh_pnt/2, 1, 1);
2123
+          u8g.drawBox(x_offset + i * pixels_per_X_mesh_pnt + pixels_per_X_mesh_pnt / 2,
2124
+                      y_offset + j * pixels_per_Y_mesh_pnt + pixels_per_Y_mesh_pnt / 2, 1, 1);
2123
         }
2125
         }
2124
       }
2126
       }
2125
 
2127
 
2127
       /************ Fill in the Specified Mesh Point ***********/
2129
       /************ Fill in the Specified Mesh Point ***********/
2128
       /*********************************************************/
2130
       /*********************************************************/
2129
 
2131
 
2130
-      inverted_y = GRID_MAX_POINTS_Y - y_plot - 1;    // The origin is typically in the lower right corner.  We need to 
2132
+      inverted_y = GRID_MAX_POINTS_Y - y_plot - 1;    // The origin is typically in the lower right corner.  We need to
2131
                                                       // invert the Y to get it to plot in the right location.
2133
                                                       // invert the Y to get it to plot in the right location.
2132
-      u8g.drawBox(x_offset+x_plot*pixels_per_X_mesh_pnt, y_offset+inverted_y*pixels_per_Y_mesh_pnt, 
2134
+      u8g.drawBox(x_offset + x_plot * pixels_per_X_mesh_pnt, y_offset + inverted_y * pixels_per_Y_mesh_pnt,
2133
                     pixels_per_X_mesh_pnt, pixels_per_Y_mesh_pnt);
2135
                     pixels_per_X_mesh_pnt, pixels_per_Y_mesh_pnt);
2134
 
2136
 
2135
       /*********************************************************/
2137
       /*********************************************************/
2147
 
2149
 
2148
       // Print plot position
2150
       // Print plot position
2149
       u8g.setPrintPos(5, 64);
2151
       u8g.setPrintPos(5, 64);
2150
-      lcd_print("(");
2152
+      lcd_print('(');
2151
       u8g.print(x_plot);
2153
       u8g.print(x_plot);
2152
-      lcd_print(",");
2154
+      lcd_print(',');
2153
       u8g.print(y_plot);
2155
       u8g.print(y_plot);
2154
-      lcd_print(")");
2156
+      lcd_print(')');
2155
 
2157
 
2156
       // Show the location value
2158
       // Show the location value
2157
       u8g.setPrintPos(74, 64);
2159
       u8g.setPrintPos(74, 64);
2262
     void _lcd_ubl_output_map_lcd_cmd() {
2264
     void _lcd_ubl_output_map_lcd_cmd() {
2263
       if (!(axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]))
2265
       if (!(axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]))
2264
         enqueue_and_echo_commands_P(PSTR("G28"));
2266
         enqueue_and_echo_commands_P(PSTR("G28"));
2265
-      lcd_goto_screen(_lcd_ubl_map_homing);     
2267
+      lcd_goto_screen(_lcd_ubl_map_homing);
2266
     }
2268
     }
2267
 
2269
 
2268
     /**
2270
     /**
2968
     //
2970
     //
2969
     // Bed:
2971
     // Bed:
2970
     //
2972
     //
2971
-    #if WATCH_THE_BED
2973
+    #if HAS_TEMP_BED
2972
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
2974
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
2973
     #endif
2975
     #endif
2974
 
2976
 
3624
         lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
3626
         lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
3625
       } \
3627
       } \
3626
       ++_thisItemNr; \
3628
       ++_thisItemNr; \
3627
-    } while(0)
3629
+    }while(0)
3628
 
3630
 
3629
     void lcd_advanced_pause_toocold_menu() {
3631
     void lcd_advanced_pause_toocold_menu() {
3630
       START_MENU();
3632
       START_MENU();

+ 2
- 2
Marlin/ultralcd_impl_DOGM.h Visa fil

424
           lcd_print_utf(stat);                                  // The string leaves space
424
           lcd_print_utf(stat);                                  // The string leaves space
425
           chars -= slen - status_scroll_pos;                    // Amount of space left
425
           chars -= slen - status_scroll_pos;                    // Amount of space left
426
         }
426
         }
427
-        lcd.print('.');                                         // Always at 1+ spaces left, draw a dot
427
+        u8g.print('.');                                         // Always at 1+ spaces left, draw a dot
428
         if (--chars) {
428
         if (--chars) {
429
           if (status_scroll_pos < slen + 1)                     // Draw a second dot if there's space
429
           if (status_scroll_pos < slen + 1)                     // Draw a second dot if there's space
430
-            --chars, lcd.print('.');
430
+            --chars, u8g.print('.');
431
           if (chars) lcd_print_utf(lcd_status_message, chars);  // Print a second copy of the message
431
           if (chars) lcd_print_utf(lcd_status_message, chars);  // Print a second copy of the message
432
         }
432
         }
433
       }
433
       }

+ 1
- 1
Marlin/ultralcd_impl_HD44780.h Visa fil

1012
 
1012
 
1013
   #endif // SDSUPPORT
1013
   #endif // SDSUPPORT
1014
 
1014
 
1015
-  #define lcd_implementation_drawmenu_back(sel, row, pstr, dummy) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_UPLEVEL_CHAR,LCD_UPLEVEL_CHAR)
1015
+  #define lcd_implementation_drawmenu_back(sel, row, pstr, dummy) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_UPLEVEL_CHAR, LCD_UPLEVEL_CHAR)
1016
   #define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
1016
   #define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
1017
   #define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
1017
   #define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
1018
   #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
1018
   #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')

Laddar…
Avbryt
Spara