Browse Source

solved some compiler warnings that are now visible in arduino 1.0.

Found a couple of unused variables, that I commented.
Tried to solve the program memory warning message, and failed.
Bernhard 12 years ago
parent
commit
7714b98da7

+ 15
- 6
Marlin/Marlin.h View File

16
 #include "Configuration.h"
16
 #include "Configuration.h"
17
 #include "MarlinSerial.h"
17
 #include "MarlinSerial.h"
18
 
18
 
19
-
20
 #define  FORCE_INLINE __attribute__((always_inline)) inline
19
 #define  FORCE_INLINE __attribute__((always_inline)) inline
21
 //#define SERIAL_ECHO(x) Serial << "echo: " << x;
20
 //#define SERIAL_ECHO(x) Serial << "echo: " << x;
22
 //#define SERIAL_ECHOLN(x) Serial << "echo: "<<x<<endl;
21
 //#define SERIAL_ECHOLN(x) Serial << "echo: "<<x<<endl;
25
 //#define SERIAL_PROTOCOL(x) Serial << x;
24
 //#define SERIAL_PROTOCOL(x) Serial << x;
26
 //#define SERIAL_PROTOCOLLN(x) Serial << x<<endl;
25
 //#define SERIAL_PROTOCOLLN(x) Serial << x<<endl;
27
 
26
 
27
+//this is a unfinsihed attemp to removes a lot of warning messages, see:
28
+// http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=57011
29
+//typedef char prog_char PROGMEM; 
30
+// //#define PSTR    (s )        ((const PROGMEM char *)(s))
31
+// //# define MYPGM(s) (__extension__({static prog_char __c[] = (s); &__c[0];})) 
32
+// //#define MYPGM(s) ((const prog_char *g PROGMEM=s))
33
+// //#define MYPGM(s) PSTR(s)
34
+#define MYPGM(s)  (__extension__({static char __c[] __attribute__((__progmem__)) = (s); &__c[0];}))  //This is the normal behaviour
35
+//#define MYPGM(s)  (__extension__({static prog_char __c[]  = (s); &__c[0];})) //this does not work but hides the warnings
28
 
36
 
29
 
37
 
30
 #define SERIAL_PROTOCOL(x) MSerial.print(x);
38
 #define SERIAL_PROTOCOL(x) MSerial.print(x);
31
-#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x));
39
+#define SERIAL_PROTOCOLPGM(x) serialprintPGM(MYPGM(x));
32
 #define SERIAL_PROTOCOLLN(x) {MSerial.print(x);MSerial.write('\n');}
40
 #define SERIAL_PROTOCOLLN(x) {MSerial.print(x);MSerial.write('\n');}
33
-#define SERIAL_PROTOCOLLNPGM(x) {serialprintPGM(PSTR(x));MSerial.write('\n');}
41
+#define SERIAL_PROTOCOLLNPGM(x) {serialprintPGM(MYPGM(x));MSerial.write('\n');}
42
+
34
 
43
 
35
-const char errormagic[] PROGMEM ="Error:";
36
-const char echomagic[] PROGMEM ="echo:";
44
+const prog_char errormagic[] PROGMEM ="Error:";
45
+const prog_char echomagic[] PROGMEM ="echo:";
37
 #define SERIAL_ERROR_START serialprintPGM(errormagic);
46
 #define SERIAL_ERROR_START serialprintPGM(errormagic);
38
 #define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
47
 #define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
39
 #define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
48
 #define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
50
 
59
 
51
 
60
 
52
 //things to write to serial from Programmemory. saves 400 to 2k of RAM.
61
 //things to write to serial from Programmemory. saves 400 to 2k of RAM.
53
-#define SerialprintPGM(x) serialprintPGM(PSTR(x))
62
+#define SerialprintPGM(x) serialprintPGM(MYPGM(x))
54
 FORCE_INLINE void serialprintPGM(const char *str)
63
 FORCE_INLINE void serialprintPGM(const char *str)
55
 {
64
 {
56
   char ch=pgm_read_byte(str);
65
   char ch=pgm_read_byte(str);

+ 2
- 1
Marlin/Marlin.pde View File

167
 
167
 
168
 const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
168
 const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
169
 
169
 
170
-static float tt = 0, bt = 0;
170
+//static float tt = 0;
171
+//static float bt = 0;
171
 
172
 
172
 //Inactivity shutdown variables
173
 //Inactivity shutdown variables
173
 static unsigned long previous_millis_cmd = 0;
174
 static unsigned long previous_millis_cmd = 0;

+ 1
- 0
Marlin/MarlinSerial.cpp View File

20
   Modified 28 September 2010 by Mark Sproul
20
   Modified 28 September 2010 by Mark Sproul
21
 */
21
 */
22
 
22
 
23
+
23
 #include <stdlib.h>
24
 #include <stdlib.h>
24
 #include <stdio.h>
25
 #include <stdio.h>
25
 #include <string.h>
26
 #include <string.h>

+ 1
- 1
Marlin/MarlinSerial.h View File

120
 
120
 
121
     FORCE_INLINE void print(const String &s)
121
     FORCE_INLINE void print(const String &s)
122
     {
122
     {
123
-      for (int i = 0; i < s.length(); i++) {
123
+      for (int i = 0; i < (int)s.length(); i++) {
124
         write(s[i]);
124
         write(s[i]);
125
       }
125
       }
126
     }
126
     }

+ 1
- 1
Marlin/cardreader.h View File

59
   LsAction lsAction; //stored for recursion.
59
   LsAction lsAction; //stored for recursion.
60
   int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
60
   int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
61
   char* diveDirName;
61
   char* diveDirName;
62
-  void lsDive(char *prepend,SdFile parent);
62
+  void lsDive(const char *prepend,SdFile parent);
63
 };
63
 };
64
   
64
   
65
 
65
 

+ 1
- 1
Marlin/cardreader.pde View File

40
 }
40
 }
41
 
41
 
42
 
42
 
43
-void  CardReader::lsDive(char *prepend,SdFile parent)
43
+void  CardReader::lsDive(const char *prepend,SdFile parent)
44
 {
44
 {
45
   dir_t p;
45
   dir_t p;
46
  uint8_t cnt=0;
46
  uint8_t cnt=0;

+ 13
- 10
Marlin/planner.cpp View File

107
 //=============================private variables ============================
107
 //=============================private variables ============================
108
 //===========================================================================
108
 //===========================================================================
109
 
109
 
110
-// Used for the frequency limit
111
-static unsigned char old_direction_bits = 0;               // Old direction bits. Used for speed calculations
112
-static long x_segment_time[3]={0,0,0};                     // Segment times (in us). Used for speed calculations
113
-static long y_segment_time[3]={0,0,0};
110
+#ifdef XY_FREQUENCY_LIMIT
111
+  // Used for the frequency limit
112
+  static unsigned char old_direction_bits = 0;               // Old direction bits. Used for speed calculations
113
+  static long x_segment_time[3]={0,0,0};                     // Segment times (in us). Used for speed calculations
114
+  static long y_segment_time[3]={0,0,0};
115
+#endif
114
 
116
 
115
 // Returns the index of the next block in the ring buffer
117
 // Returns the index of the next block in the ring buffer
116
 // NOTE: Removed modulo (%) operator, which uses an expensive divide and multiplication.
118
 // NOTE: Removed modulo (%) operator, which uses an expensive divide and multiplication.
255
 // planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This 
257
 // planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This 
256
 // implements the reverse pass.
258
 // implements the reverse pass.
257
 void planner_reverse_pass() {
259
 void planner_reverse_pass() {
258
-  char block_index = block_buffer_head;
260
+  uint8_t block_index = block_buffer_head;
259
   if(((block_buffer_head-block_buffer_tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1)) > 3) {
261
   if(((block_buffer_head-block_buffer_tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1)) > 3) {
260
     block_index = (block_buffer_head - 3) & (BLOCK_BUFFER_SIZE - 1);
262
     block_index = (block_buffer_head - 3) & (BLOCK_BUFFER_SIZE - 1);
261
     block_t *block[3] = { NULL, NULL, NULL };
263
     block_t *block[3] = { NULL, NULL, NULL };
294
 // planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This 
296
 // planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This 
295
 // implements the forward pass.
297
 // implements the forward pass.
296
 void planner_forward_pass() {
298
 void planner_forward_pass() {
297
-  char block_index = block_buffer_tail;
299
+  uint8_t block_index = block_buffer_tail;
298
   block_t *block[3] = { NULL, NULL, NULL };
300
   block_t *block[3] = { NULL, NULL, NULL };
299
 
301
 
300
   while(block_index != block_buffer_head) {
302
   while(block_index != block_buffer_head) {
384
     return; //do nothing
386
     return; //do nothing
385
   
387
   
386
   float high=0;
388
   float high=0;
387
-  char block_index = block_buffer_tail;
389
+  uint8_t block_index = block_buffer_tail;
388
   
390
   
389
   while(block_index != block_buffer_head) {
391
   while(block_index != block_buffer_head) {
390
     float se=block_buffer[block_index].steps_e/float(block_buffer[block_index].step_event_count)*block_buffer[block_index].nominal_rate;
392
     float se=block_buffer[block_index].steps_e/float(block_buffer[block_index].step_event_count)*block_buffer[block_index].nominal_rate;
423
   block_t *block;
425
   block_t *block;
424
 
426
 
425
   if(block_buffer_tail != block_buffer_head) {
427
   if(block_buffer_tail != block_buffer_head) {
426
-    char block_index = block_buffer_tail;
428
+    uint8_t block_index = block_buffer_tail;
427
     while(block_index != block_buffer_head) {
429
     while(block_index != block_buffer_head) {
428
       block = &block_buffer[block_index];
430
       block = &block_buffer[block_index];
429
       if(block->steps_x != 0) x_active++;
431
       if(block->steps_x != 0) x_active++;
519
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
521
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
520
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
522
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
521
 
523
 
522
-  //  segment time im micro seconds
523
-  long segment_time = lround(1000000.0/inverse_second);
524
+  
524
  
525
  
525
 
526
 
526
   if (block->steps_e == 0) {
527
   if (block->steps_e == 0) {
538
 #endif
539
 #endif
539
 
540
 
540
 /*
541
 /*
542
+  //  segment time im micro seconds
543
+  long segment_time = lround(1000000.0/inverse_second);
541
   if ((blockcount>0) && (blockcount < (BLOCK_BUFFER_SIZE - 4))) {
544
   if ((blockcount>0) && (blockcount < (BLOCK_BUFFER_SIZE - 4))) {
542
     if (segment_time<minsegmenttime)  { // buffer is draining, add extra time.  The amount of time added increases if the buffer is still emptied more.
545
     if (segment_time<minsegmenttime)  { // buffer is draining, add extra time.  The amount of time added increases if the buffer is still emptied more.
543
         segment_time=segment_time+lround(2*(minsegmenttime-segment_time)/blockcount);
546
         segment_time=segment_time+lround(2*(minsegmenttime-segment_time)/blockcount);

+ 4
- 3
Marlin/stepper.cpp View File

21
 /* The timer calculations of this module informed by the 'RepRap cartesian firmware' by Zack Smith
21
 /* The timer calculations of this module informed by the 'RepRap cartesian firmware' by Zack Smith
22
    and Philipp Tiefenbacher. */
22
    and Philipp Tiefenbacher. */
23
 
23
 
24
+
24
 #include "stepper.h"
25
 #include "stepper.h"
25
 #include "Configuration.h"
26
 #include "Configuration.h"
26
 #include "Marlin.h"
27
 #include "Marlin.h"
444
     // Calculare new timer value
445
     // Calculare new timer value
445
     unsigned short timer;
446
     unsigned short timer;
446
     unsigned short step_rate;
447
     unsigned short step_rate;
447
-    if (step_events_completed <= current_block->accelerate_until) {
448
+    if (step_events_completed <= (unsigned long int)current_block->accelerate_until) {
448
       
449
       
449
       MultiU24X24toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate);
450
       MultiU24X24toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate);
450
       acc_step_rate += current_block->initial_rate;
451
       acc_step_rate += current_block->initial_rate;
463
         }
464
         }
464
       #endif
465
       #endif
465
     } 
466
     } 
466
-    else if (step_events_completed > current_block->decelerate_after) {   
467
+    else if (step_events_completed > (unsigned long int)current_block->decelerate_after) {   
467
       MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate);
468
       MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate);
468
       
469
       
469
       if(step_rate > acc_step_rate) { // Check step_rate stays positive
470
       if(step_rate > acc_step_rate) { // Check step_rate stays positive
678
   CRITICAL_SECTION_END;
679
   CRITICAL_SECTION_END;
679
 }
680
 }
680
 
681
 
681
-long st_get_position(char axis)
682
+long st_get_position(uint8_t axis)
682
 {
683
 {
683
   long count_pos;
684
   long count_pos;
684
   CRITICAL_SECTION_START;
685
   CRITICAL_SECTION_START;

+ 1
- 1
Marlin/stepper.h View File

34
 void st_set_e_position(const long &e);
34
 void st_set_e_position(const long &e);
35
 
35
 
36
 // Get current position in steps
36
 // Get current position in steps
37
-long st_get_position(char axis);
37
+long st_get_position(uint8_t axis);
38
 
38
 
39
 // The stepper subsystem goes to sleep when it runs out of things to execute. Call this
39
 // The stepper subsystem goes to sleep when it runs out of things to execute. Call this
40
 // to notify the subsystem that it is time to go to work.
40
 // to notify the subsystem that it is time to go to work.

+ 14
- 5
Marlin/temperature.cpp View File

67
 //===========================================================================
67
 //===========================================================================
68
 static bool temp_meas_ready = false;
68
 static bool temp_meas_ready = false;
69
 
69
 
70
-static unsigned long previous_millis_heater, previous_millis_bed_heater;
70
+static unsigned long  previous_millis_bed_heater;
71
+//static unsigned long previous_millis_heater;
71
 
72
 
72
 #ifdef PIDTEMP
73
 #ifdef PIDTEMP
73
   //static cannot be external:
74
   //static cannot be external:
80
   static float pid_error;
81
   static float pid_error;
81
   static float temp_iState_min;
82
   static float temp_iState_min;
82
   static float temp_iState_max;
83
   static float temp_iState_max;
83
-  static float pid_input;
84
-  static float pid_output;
84
+ // static float pid_input; 
85
+ // static float pid_output;
85
   static bool pid_reset;
86
   static bool pid_reset;
86
  
87
  
87
 #endif //PIDTEMP
88
 #endif //PIDTEMP
94
 // Init min and max temp with extreme values to prevent false errors during startup
95
 // Init min and max temp with extreme values to prevent false errors during startup
95
   static int minttemp_0   = 0;
96
   static int minttemp_0   = 0;
96
   static int maxttemp_0   = 16383;
97
   static int maxttemp_0   = 16383;
97
-  static int minttemp_1   = 0;
98
-  static int maxttemp_1   = 16383;
98
+  //static int minttemp_1   = 0;
99
+  //static int maxttemp_1   = 16383;
99
   static int bed_minttemp = 0;
100
   static int bed_minttemp = 0;
100
   static int bed_maxttemp = 16383;
101
   static int bed_maxttemp = 16383;
101
 
102
 
268
     return (1023 * OVERSAMPLENR) - raw;
269
     return (1023 * OVERSAMPLENR) - raw;
269
   #elif defined BED_USES_AD595
270
   #elif defined BED_USES_AD595
270
     return lround(celsius * (1024.0 * OVERSAMPLENR/ (5.0 * 100.0) ) );
271
     return lround(celsius * (1024.0 * OVERSAMPLENR/ (5.0 * 100.0) ) );
272
+  #else
273
+    #warning No heater-type defined for the bed.
271
   #endif
274
   #endif
275
+  return 0;
272
 }
276
 }
273
 
277
 
274
 // Derived from RepRap FiveD extruder::getTemperature()
278
 // Derived from RepRap FiveD extruder::getTemperature()
296
     return celsius;
300
     return celsius;
297
   #elif defined HEATER_0_USES_AD595
301
   #elif defined HEATER_0_USES_AD595
298
     return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR;
302
     return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR;
303
+  #else
304
+    #error PLEASE DEFINE HEATER TYPE 
299
   #endif
305
   #endif
300
 }
306
 }
301
 
307
 
328
     
334
     
329
   #elif defined BED_USES_AD595
335
   #elif defined BED_USES_AD595
330
     return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR;
336
     return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR;
337
+  #else
338
+    #warning No heater-type defined for the bed.
331
   #endif
339
   #endif
340
+  return 0;
332
 }
341
 }
333
 
342
 
334
 void tp_init()
343
 void tp_init()

+ 5
- 3
Marlin/temperature.h View File

86
   #endif //PIDTEMP
86
   #endif //PIDTEMP
87
 };
87
 };
88
 FORCE_INLINE void setTargetHotend1(const float &celsius) {  target_raw[TEMPSENSOR_HOTEND_1]=temp2analog(celsius);};
88
 FORCE_INLINE void setTargetHotend1(const float &celsius) {  target_raw[TEMPSENSOR_HOTEND_1]=temp2analog(celsius);};
89
-FORCE_INLINE float setTargetHotend(const float &celcius, uint8_t extruder){  
89
+FORCE_INLINE void setTargetHotend(const float &celcius, uint8_t extruder){  
90
   if(extruder == 0) setTargetHotend0(celcius);
90
   if(extruder == 0) setTargetHotend0(celcius);
91
   if(extruder == 1) setTargetHotend1(celcius);
91
   if(extruder == 1) setTargetHotend1(celcius);
92
 };
92
 };
94
 
94
 
95
 FORCE_INLINE bool isHeatingHotend0() {return heatingtarget_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];};
95
 FORCE_INLINE bool isHeatingHotend0() {return heatingtarget_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];};
96
 FORCE_INLINE bool isHeatingHotend1() {return target_raw[TEMPSENSOR_HOTEND_1] > current_raw[TEMPSENSOR_HOTEND_1];};
96
 FORCE_INLINE bool isHeatingHotend1() {return target_raw[TEMPSENSOR_HOTEND_1] > current_raw[TEMPSENSOR_HOTEND_1];};
97
-FORCE_INLINE float isHeatingHotend(uint8_t extruder){  
97
+FORCE_INLINE bool isHeatingHotend(uint8_t extruder){  
98
   if(extruder == 0) return heatingtarget_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];
98
   if(extruder == 0) return heatingtarget_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];
99
   if(extruder == 1) return target_raw[TEMPSENSOR_HOTEND_1] > current_raw[TEMPSENSOR_HOTEND_1];
99
   if(extruder == 1) return target_raw[TEMPSENSOR_HOTEND_1] > current_raw[TEMPSENSOR_HOTEND_1];
100
+  return false; 
100
 };
101
 };
101
 FORCE_INLINE bool isHeatingBed() {return target_raw[TEMPSENSOR_BED] > current_raw[TEMPSENSOR_BED];};
102
 FORCE_INLINE bool isHeatingBed() {return target_raw[TEMPSENSOR_BED] > current_raw[TEMPSENSOR_BED];};
102
 
103
 
103
 FORCE_INLINE bool isCoolingHotend0() {return target_raw[TEMPSENSOR_HOTEND_0] < current_raw[TEMPSENSOR_HOTEND_0];};
104
 FORCE_INLINE bool isCoolingHotend0() {return target_raw[TEMPSENSOR_HOTEND_0] < current_raw[TEMPSENSOR_HOTEND_0];};
104
 FORCE_INLINE bool isCoolingHotend1() {return target_raw[TEMPSENSOR_HOTEND_1] < current_raw[TEMPSENSOR_HOTEND_1];};
105
 FORCE_INLINE bool isCoolingHotend1() {return target_raw[TEMPSENSOR_HOTEND_1] < current_raw[TEMPSENSOR_HOTEND_1];};
105
-FORCE_INLINE float isCoolingHotend(uint8_t extruder){  
106
+FORCE_INLINE bool isCoolingHotend(uint8_t extruder){  
106
   if(extruder == 0) return target_raw[TEMPSENSOR_HOTEND_0] < current_raw[TEMPSENSOR_HOTEND_0];
107
   if(extruder == 0) return target_raw[TEMPSENSOR_HOTEND_0] < current_raw[TEMPSENSOR_HOTEND_0];
107
   if(extruder == 1) return target_raw[TEMPSENSOR_HOTEND_1] < current_raw[TEMPSENSOR_HOTEND_1];
108
   if(extruder == 1) return target_raw[TEMPSENSOR_HOTEND_1] < current_raw[TEMPSENSOR_HOTEND_1];
109
+  return false; 
108
 };
110
 };
109
 FORCE_INLINE bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMPSENSOR_BED];};
111
 FORCE_INLINE bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMPSENSOR_BED];};
110
 
112
 

+ 2
- 3
Marlin/ultralcd.h View File

1
 #ifndef __ULTRALCDH
1
 #ifndef __ULTRALCDH
2
 #define __ULTRALCDH
2
 #define __ULTRALCDH
3
 #include "Configuration.h"
3
 #include "Configuration.h"
4
-
4
+#include "Marlin.h"
5
 #ifdef ULTRA_LCD
5
 #ifdef ULTRA_LCD
6
 
6
 
7
   void lcd_status();
7
   void lcd_status();
104
             curencoderpos=maxlines*lcdslow; 
104
             curencoderpos=maxlines*lcdslow; 
105
         } 
105
         } 
106
         lastencoderpos=encoderpos=curencoderpos;
106
         lastencoderpos=encoderpos=curencoderpos;
107
-        int lastactiveline=activeline;
108
         activeline=curencoderpos/lcdslow;
107
         activeline=curencoderpos/lcdslow;
109
         if(activeline<0) activeline=0;
108
         if(activeline<0) activeline=0;
110
         if(activeline>LCD_HEIGHT-1) activeline=LCD_HEIGHT-1;
109
         if(activeline>LCD_HEIGHT-1) activeline=LCD_HEIGHT-1;
137
 
136
 
138
 
137
 
139
   #define LCD_MESSAGE(x) lcd_status(x);
138
   #define LCD_MESSAGE(x) lcd_status(x);
140
-  #define LCD_MESSAGEPGM(x) lcd_statuspgm(PSTR(x));
139
+  #define LCD_MESSAGEPGM(x) lcd_statuspgm(MYPGM(x));
141
   #define LCD_STATUS lcd_status()
140
   #define LCD_STATUS lcd_status()
142
 #else //no lcd
141
 #else //no lcd
143
   #define LCD_STATUS
142
   #define LCD_STATUS

+ 3
- 3
Marlin/ultralcd.pde View File

53
     ch=pgm_read_byte(++str);
53
     ch=pgm_read_byte(++str);
54
   }
54
   }
55
 }
55
 }
56
-#define lcdprintPGM(x) lcdProgMemprint(PSTR(x))
56
+#define lcdprintPGM(x) lcdProgMemprint(MYPGM(x))
57
 
57
 
58
 
58
 
59
 //===========================================================================
59
 //===========================================================================
159
 {
159
 {
160
   #ifdef ULTIPANEL
160
   #ifdef ULTIPANEL
161
     static uint8_t oldbuttons=0;
161
     static uint8_t oldbuttons=0;
162
-    static long previous_millis_buttons=0;
163
-    static long previous_lcdinit=0;
162
+    //static long previous_millis_buttons=0;
163
+    //static long previous_lcdinit=0;
164
   //  buttons_check(); // Done in temperature interrupt
164
   //  buttons_check(); // Done in temperature interrupt
165
     //previous_millis_buttons=millis();
165
     //previous_millis_buttons=millis();
166
     
166
     

Loading…
Cancel
Save