Browse Source

Merge pull request #1291 from alhirzel/Development

Define analogInputToDigitalPin only if needed
Bo Herrmannsen 9 years ago
parent
commit
c5f138ea07
1 changed files with 9 additions and 5 deletions
  1. 9
    5
      Marlin/Marlin.h

+ 9
- 5
Marlin/Marlin.h View File

30
 # include "Arduino.h"
30
 # include "Arduino.h"
31
 #else
31
 #else
32
 # include "WProgram.h"
32
 # include "WProgram.h"
33
-  //Arduino < 1.0.0 does not define this, so we need to do it ourselves
33
+#endif
34
+
35
+// Arduino < 1.0.0 does not define this, so we need to do it ourselves
36
+#ifndef analogInputToDigitalPin
34
 # define analogInputToDigitalPin(p) ((p) + A0)
37
 # define analogInputToDigitalPin(p) ((p) + A0)
35
 #endif
38
 #endif
36
 
39
 
240
 #endif
243
 #endif
241
 
244
 
242
 #ifdef FILAMENT_SENSOR
245
 #ifdef FILAMENT_SENSOR
243
-  extern float filament_width_nominal;  //holds the theoretical filament diameter ie., 3.00 or 1.75 
244
-  extern bool filament_sensor;  //indicates that filament sensor readings should control extrusion  
245
-  extern float filament_width_meas; //holds the filament diameter as accurately measured 
246
+  extern float filament_width_nominal;  //holds the theoretical filament diameter ie., 3.00 or 1.75
247
+  extern bool filament_sensor;  //indicates that filament sensor readings should control extrusion
248
+  extern float filament_width_meas; //holds the filament diameter as accurately measured
246
   extern signed char measurement_delay[];  //ring buffer to delay measurement
249
   extern signed char measurement_delay[];  //ring buffer to delay measurement
247
   extern int delay_index1, delay_index2;  //index into ring buffer
250
   extern int delay_index1, delay_index2;  //index into ring buffer
248
   extern float delay_dist; //delay distance counter
251
   extern float delay_dist; //delay distance counter
269
 
272
 
270
 #endif
273
 #endif
271
 
274
 
272
-extern void calculate_volumetric_multipliers();
275
+extern void calculate_volumetric_multipliers();
276
+

Loading…
Cancel
Save