Browse Source

Merge pull request #3153 from thinkyhead/rc_fix_macro_expansion

Additional macro wrapping, patches for #3140
Scott Lahteine 8 years ago
parent
commit
91cdea4022

+ 1
- 1
Marlin/Marlin_main.cpp View File

@@ -6699,7 +6699,7 @@ void plan_arc(
6699 6699
 
6700 6700
   float mm_of_travel = hypot(angular_travel * radius, fabs(linear_travel));
6701 6701
   if (mm_of_travel < 0.001)  return;
6702
-  uint16_t segments = floor(mm_of_travel / MM_PER_ARC_SEGMENT);
6702
+  uint16_t segments = floor(mm_of_travel / (MM_PER_ARC_SEGMENT));
6703 6703
   if (segments == 0) segments = 1;
6704 6704
 
6705 6705
   float theta_per_segment = angular_travel / segments;

+ 2
- 2
Marlin/example_configurations/Felix/Configuration.h View File

@@ -405,10 +405,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
405 405
 
406 406
 #if ENABLED(MESH_BED_LEVELING)
407 407
   #define MESH_MIN_X 10
408
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
408
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
409 409
   #define MESH_MIN_Y 10
410 410
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
411
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
411
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
412 412
   #define MESH_NUM_Y_POINTS 3
413 413
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
414 414
 

+ 2
- 2
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -402,10 +402,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
402 402
 
403 403
 #if ENABLED(MESH_BED_LEVELING)
404 404
   #define MESH_MIN_X 10
405
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
405
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
406 406
   #define MESH_MIN_Y 10
407 407
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
408
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
408
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
409 409
   #define MESH_NUM_Y_POINTS 3
410 410
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
411 411
 

+ 2
- 2
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -415,10 +415,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
415 415
 
416 416
 #if ENABLED(MESH_BED_LEVELING)
417 417
   #define MESH_MIN_X 10
418
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
418
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
419 419
   #define MESH_MIN_Y 10
420 420
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
421
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
421
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
422 422
   #define MESH_NUM_Y_POINTS 3
423 423
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
424 424
 

+ 2
- 2
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -418,10 +418,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
418 418
 
419 419
 #if ENABLED(MESH_BED_LEVELING)
420 420
   #define MESH_MIN_X 10
421
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
421
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
422 422
   #define MESH_MIN_Y 10
423 423
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
424
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
424
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
425 425
   #define MESH_NUM_Y_POINTS 3
426 426
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
427 427
 

+ 2
- 2
Marlin/example_configurations/K8200/Configuration.h View File

@@ -438,10 +438,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
438 438
 
439 439
 #if ENABLED(MESH_BED_LEVELING)
440 440
   #define MESH_MIN_X 10
441
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
441
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
442 442
   #define MESH_MIN_Y 10
443 443
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
444
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
444
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
445 445
   #define MESH_NUM_Y_POINTS 3
446 446
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
447 447
 

+ 2
- 2
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -423,10 +423,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
423 423
 
424 424
 #if ENABLED(MESH_BED_LEVELING)
425 425
   #define MESH_MIN_X 10
426
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
426
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
427 427
   #define MESH_MIN_Y 10
428 428
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
429
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
429
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
430 430
   #define MESH_NUM_Y_POINTS 3
431 431
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
432 432
 

+ 2
- 2
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -417,10 +417,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
417 417
 
418 418
 #if ENABLED(MESH_BED_LEVELING)
419 419
   #define MESH_MIN_X 10
420
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
420
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
421 421
   #define MESH_MIN_Y 10
422 422
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
423
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
423
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
424 424
   #define MESH_NUM_Y_POINTS 3
425 425
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
426 426
 

+ 2
- 2
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -431,10 +431,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
431 431
 
432 432
 #if ENABLED(MESH_BED_LEVELING)
433 433
   #define MESH_MIN_X 10
434
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
434
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
435 435
   #define MESH_MIN_Y 10
436 436
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
437
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
437
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
438 438
   #define MESH_NUM_Y_POINTS 3
439 439
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
440 440
 

+ 2
- 2
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -443,10 +443,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
443 443
 
444 444
 #if ENABLED(MESH_BED_LEVELING)
445 445
   #define MESH_MIN_X 10
446
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
446
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
447 447
   #define MESH_MIN_Y 10
448 448
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
449
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
449
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
450 450
   #define MESH_NUM_Y_POINTS 3
451 451
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
452 452
 

+ 2
- 2
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -415,10 +415,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
415 415
 
416 416
 #if ENABLED(MESH_BED_LEVELING)
417 417
   #define MESH_MIN_X 10
418
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
418
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
419 419
   #define MESH_MIN_Y 10
420 420
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
421
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
421
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
422 422
   #define MESH_NUM_Y_POINTS 3
423 423
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
424 424
 

+ 2
- 2
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -445,10 +445,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
445 445
 
446 446
 #if ENABLED(MESH_BED_LEVELING)
447 447
   #define MESH_MIN_X 10
448
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
448
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
449 449
   #define MESH_MIN_Y 10
450 450
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
451
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
451
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
452 452
   #define MESH_NUM_Y_POINTS 3
453 453
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
454 454
 

+ 2
- 2
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -451,10 +451,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
451 451
 
452 452
 #if ENABLED(MESH_BED_LEVELING)
453 453
   #define MESH_MIN_X 10
454
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
454
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
455 455
   #define MESH_MIN_Y 10
456 456
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
457
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
457
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
458 458
   #define MESH_NUM_Y_POINTS 3
459 459
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
460 460
 

+ 2
- 2
Marlin/example_configurations/makibox/Configuration.h View File

@@ -426,10 +426,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
426 426
 
427 427
 #if ENABLED(MESH_BED_LEVELING)
428 428
   #define MESH_MIN_X 10
429
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
429
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
430 430
   #define MESH_MIN_Y 10
431 431
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
432
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
432
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
433 433
   #define MESH_NUM_Y_POINTS 3
434 434
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
435 435
 

+ 2
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -413,10 +413,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
413 413
 
414 414
 #if ENABLED(MESH_BED_LEVELING)
415 415
   #define MESH_MIN_X 10
416
-    #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
416
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
417 417
   #define MESH_MIN_Y 10
418 418
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
419
-#define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
419
+  #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
420 420
   #define MESH_NUM_Y_POINTS 3
421 421
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
422 422
 

+ 2
- 2
Marlin/mesh_bed_leveling.h View File

@@ -14,8 +14,8 @@
14 14
 
15 15
     void reset();
16 16
 
17
-    float get_x(int i) { return MESH_MIN_X + MESH_X_DIST * i; }
18
-    float get_y(int i) { return MESH_MIN_Y + MESH_Y_DIST * i; }
17
+    float get_x(int i) { return MESH_MIN_X + (MESH_X_DIST) * i; }
18
+    float get_y(int i) { return MESH_MIN_Y + (MESH_Y_DIST) * i; }
19 19
     void set_z(int ix, int iy, float z) { z_values[iy][ix] = z; }
20 20
 
21 21
     int select_x_index(float x) {

+ 4
- 4
Marlin/planner.cpp View File

@@ -331,7 +331,7 @@ void planner_recalculate_trapezoids() {
331 331
   // Last/newest block in buffer. Exit speed is set with MINIMUM_PLANNER_SPEED. Always recalculated.
332 332
   if (next) {
333 333
     float nom = next->nominal_speed;
334
-    calculate_trapezoid_for_block(next, next->entry_speed / nom, MINIMUM_PLANNER_SPEED / nom);
334
+    calculate_trapezoid_for_block(next, next->entry_speed / nom, (MINIMUM_PLANNER_SPEED) / nom);
335 335
     next->recalculate_flag = false;
336 336
   }
337 337
 }
@@ -389,8 +389,8 @@ void plan_init() {
389 389
     float t = autotemp_min + high * autotemp_factor;
390 390
     t = constrain(t, autotemp_min, autotemp_max);
391 391
     if (oldt > t) {
392
-      t *= (1 - AUTOTEMP_OLDWEIGHT);
393
-      t += AUTOTEMP_OLDWEIGHT * oldt;
392
+      t *= (1 - (AUTOTEMP_OLDWEIGHT));
393
+      t += (AUTOTEMP_OLDWEIGHT) * oldt;
394 394
     }
395 395
     oldt = t;
396 396
     setTargetHotend0(t);
@@ -839,7 +839,7 @@ float junction_deviation = 0.1;
839 839
          max_y_segment_time = max(ys0, max(ys1, ys2)),
840 840
          min_xy_segment_time = min(max_x_segment_time, max_y_segment_time);
841 841
     if (min_xy_segment_time < MAX_FREQ_TIME) {
842
-      float low_sf = speed_factor * min_xy_segment_time / MAX_FREQ_TIME;
842
+      float low_sf = speed_factor * min_xy_segment_time / (MAX_FREQ_TIME);
843 843
       speed_factor = min(speed_factor, low_sf);
844 844
     }
845 845
   #endif // XY_FREQUENCY_LIMIT

+ 4
- 4
Marlin/servo.cpp View File

@@ -57,7 +57,7 @@
57 57
 
58 58
 #define TRIM_DURATION       2                               // compensation ticks to trim adjust for digitalWrite delays // 12 August 2009
59 59
 
60
-//#define NBR_TIMERS        (MAX_SERVOS / SERVOS_PER_TIMER)
60
+//#define NBR_TIMERS        ((MAX_SERVOS) / (SERVOS_PER_TIMER))
61 61
 
62 62
 static ServoInfo_t servo_info[MAX_SERVOS];                  // static array of servo info structures
63 63
 static volatile int8_t Channel[_Nbr_16timers ];             // counter for the servo being pulsed for each timer (or -1 if refresh interval)
@@ -66,9 +66,9 @@ uint8_t ServoCount = 0;                                     // the total number
66 66
 
67 67
 
68 68
 // convenience macros
69
-#define SERVO_INDEX_TO_TIMER(_servo_nbr) ((timer16_Sequence_t)(_servo_nbr / SERVOS_PER_TIMER)) // returns the timer controlling this servo
70
-#define SERVO_INDEX_TO_CHANNEL(_servo_nbr) (_servo_nbr % SERVOS_PER_TIMER)       // returns the index of the servo on this timer
71
-#define SERVO_INDEX(_timer,_channel)  ((_timer*SERVOS_PER_TIMER) + _channel)     // macro to access servo index by timer and channel
69
+#define SERVO_INDEX_TO_TIMER(_servo_nbr) ((timer16_Sequence_t)(_servo_nbr / (SERVOS_PER_TIMER))) // returns the timer controlling this servo
70
+#define SERVO_INDEX_TO_CHANNEL(_servo_nbr) (_servo_nbr % (SERVOS_PER_TIMER))       // returns the index of the servo on this timer
71
+#define SERVO_INDEX(_timer,_channel)  ((_timer*(SERVOS_PER_TIMER)) + _channel)     // macro to access servo index by timer and channel
72 72
 #define SERVO(_timer,_channel)  (servo_info[SERVO_INDEX(_timer,_channel)])       // macro to access servo class by timer and channel
73 73
 
74 74
 #define SERVO_MIN() (MIN_PULSE_WIDTH - this->min * 4)  // minimum value in uS for this servo

+ 3
- 3
Marlin/stepper.cpp View File

@@ -1220,9 +1220,9 @@ void digipot_current(uint8_t driver, int current) {
1220 1220
     digitalPotWrite(digipot_ch[driver], current);
1221 1221
   #elif defined(MOTOR_CURRENT_PWM_XY_PIN)
1222 1222
     switch (driver) {
1223
-      case 0: analogWrite(MOTOR_CURRENT_PWM_XY_PIN, 255L * current / MOTOR_CURRENT_PWM_RANGE); break;
1224
-      case 1: analogWrite(MOTOR_CURRENT_PWM_Z_PIN, 255L * current / MOTOR_CURRENT_PWM_RANGE); break;
1225
-      case 2: analogWrite(MOTOR_CURRENT_PWM_E_PIN, 255L * current / MOTOR_CURRENT_PWM_RANGE); break;
1223
+      case 0: analogWrite(MOTOR_CURRENT_PWM_XY_PIN, 255L * current / (MOTOR_CURRENT_PWM_RANGE)); break;
1224
+      case 1: analogWrite(MOTOR_CURRENT_PWM_Z_PIN, 255L * current / (MOTOR_CURRENT_PWM_RANGE)); break;
1225
+      case 2: analogWrite(MOTOR_CURRENT_PWM_E_PIN, 255L * current / (MOTOR_CURRENT_PWM_RANGE)); break;
1226 1226
     }
1227 1227
   #else
1228 1228
     UNUSED(driver);

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -465,7 +465,7 @@ void lcd_set_home_offsets() {
465 465
 
466 466
   static void _lcd_babystep(int axis, const char* msg) {
467 467
     if (encoderPosition != 0) {
468
-      babystepsTodo[axis] += BABYSTEP_MULTIPLICATOR * (int)encoderPosition;
468
+      babystepsTodo[axis] += (BABYSTEP_MULTIPLICATOR) * (int)encoderPosition;
469 469
       encoderPosition = 0;
470 470
       lcdDrawUpdate = 1;
471 471
     }

+ 3
- 3
Marlin/ultralcd_st7920_u8glib_rrd.h View File

@@ -59,7 +59,7 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
59 59
       ST7920_WRITE_BYTE(0x01);       //clear CGRAM ram
60 60
       u8g_Delay(15);                 //delay for CGRAM clear
61 61
       ST7920_WRITE_BYTE(0x3E);       //extended mode + GDRAM active
62
-      for (y = 0; y < LCD_PIXEL_HEIGHT / 2; y++) { //clear GDRAM
62
+      for (y = 0; y < (LCD_PIXEL_HEIGHT) / 2; y++) { //clear GDRAM
63 63
         ST7920_WRITE_BYTE(0x80 | y); //set y
64 64
         ST7920_WRITE_BYTE(0x80);     //set x = 0
65 65
         ST7920_SET_DAT();
@@ -91,7 +91,7 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
91 91
           ST7920_WRITE_BYTE(0x80 | 8);       //x=64
92 92
         }
93 93
         ST7920_SET_DAT();
94
-        ST7920_WRITE_BYTES(ptr, LCD_PIXEL_WIDTH / 8); //ptr is incremented inside of macro
94
+        ST7920_WRITE_BYTES(ptr, (LCD_PIXEL_WIDTH) / 8); //ptr is incremented inside of macro
95 95
         y++;
96 96
       }
97 97
       ST7920_NCS();
@@ -107,7 +107,7 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
107 107
 #endif
108 108
 }
109 109
 
110
-uint8_t   u8g_dev_st7920_128x64_rrd_buf[LCD_PIXEL_WIDTH * (PAGE_HEIGHT / 8)] U8G_NOCOMMON;
110
+uint8_t   u8g_dev_st7920_128x64_rrd_buf[(LCD_PIXEL_WIDTH) * (PAGE_HEIGHT) / 8] U8G_NOCOMMON;
111 111
 u8g_pb_t  u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT, LCD_PIXEL_HEIGHT, 0, 0, 0}, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_rrd_buf};
112 112
 u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g_dev_st7920_128x64_rrd_pb, &u8g_com_null_fn};
113 113
 

Loading…
Cancel
Save