Browse Source

Follow-up the PR #3643(Temperature singleton)

Follow-up the PR #3643(Temperature singleton)

・Change from fanSpeedSoftPwm[0] to thermalManager.fanSpeedSoftPwm[0] in planner.cpp
It fix compilation error when FAN_SOFT_PWM is enabled.

・Remove declaration of setExtruderAutoFanState() in temperature.h
Because that function was abolished.

・Change from babystepsTodo to thermalManager.babystepsTodo in ultralcd.cpp
It fix compilation errors when BABYSTEPPING is enabled.
esenapaj 8 years ago
parent
commit
1a97442d19
3 changed files with 12 additions and 13 deletions
  1. 3
    3
      Marlin/planner.cpp
  2. 0
    1
      Marlin/temperature.h
  3. 9
    9
      Marlin/ultralcd.cpp

+ 3
- 3
Marlin/planner.cpp View File

421
 
421
 
422
     #if ENABLED(FAN_SOFT_PWM)
422
     #if ENABLED(FAN_SOFT_PWM)
423
       #if HAS_FAN0
423
       #if HAS_FAN0
424
-        fanSpeedSoftPwm[0] = CALC_FAN_SPEED(0);
424
+        thermalManager.fanSpeedSoftPwm[0] = CALC_FAN_SPEED(0);
425
       #endif
425
       #endif
426
       #if HAS_FAN1
426
       #if HAS_FAN1
427
-        fanSpeedSoftPwm[1] = CALC_FAN_SPEED(1);
427
+        thermalManager.fanSpeedSoftPwm[1] = CALC_FAN_SPEED(1);
428
       #endif
428
       #endif
429
       #if HAS_FAN2
429
       #if HAS_FAN2
430
-        fanSpeedSoftPwm[2] = CALC_FAN_SPEED(2);
430
+        thermalManager.fanSpeedSoftPwm[2] = CALC_FAN_SPEED(2);
431
       #endif
431
       #endif
432
     #else
432
     #else
433
       #if HAS_FAN0
433
       #if HAS_FAN0

+ 0
- 1
Marlin/temperature.h View File

313
       int read_max6675();
313
       int read_max6675();
314
     #endif
314
     #endif
315
 
315
 
316
-    void setExtruderAutoFanState(int pin, bool state);
317
     void checkExtruderAutoFans();
316
     void checkExtruderAutoFans();
318
 
317
 
319
     float get_pid_output(int e);
318
     float get_pid_output(int e);

+ 9
- 9
Marlin/ultralcd.cpp View File

562
         #if ENABLED(BABYSTEP_XY)
562
         #if ENABLED(BABYSTEP_XY)
563
           switch(axis) {
563
           switch(axis) {
564
             case X_AXIS: // X on CoreXY and CoreXZ
564
             case X_AXIS: // X on CoreXY and CoreXZ
565
-              babystepsTodo[A_AXIS] += distance * 2;
566
-              babystepsTodo[CORE_AXIS_2] += distance * 2;
565
+              thermalManager.babystepsTodo[A_AXIS] += distance * 2;
566
+              thermalManager.babystepsTodo[CORE_AXIS_2] += distance * 2;
567
               break;
567
               break;
568
             case CORE_AXIS_2: // Y on CoreXY, Z on CoreXZ
568
             case CORE_AXIS_2: // Y on CoreXY, Z on CoreXZ
569
-              babystepsTodo[A_AXIS] += distance * 2;
570
-              babystepsTodo[CORE_AXIS_2] -= distance * 2;
569
+              thermalManager.babystepsTodo[A_AXIS] += distance * 2;
570
+              thermalManager.babystepsTodo[CORE_AXIS_2] -= distance * 2;
571
               break;
571
               break;
572
             case CORE_AXIS_3: // Z on CoreXY, Y on CoreXZ
572
             case CORE_AXIS_3: // Z on CoreXY, Y on CoreXZ
573
-              babystepsTodo[CORE_AXIS_3] += distance;
573
+              thermalManager.babystepsTodo[CORE_AXIS_3] += distance;
574
               break;
574
               break;
575
           }
575
           }
576
         #elif ENABLED(COREXZ)
576
         #elif ENABLED(COREXZ)
577
-          babystepsTodo[A_AXIS] += distance * 2;
578
-          babystepsTodo[C_AXIS] -= distance * 2;
577
+          thermalManager.babystepsTodo[A_AXIS] += distance * 2;
578
+          thermalManager.babystepsTodo[C_AXIS] -= distance * 2;
579
         #else
579
         #else
580
-          babystepsTodo[Z_AXIS] += distance;
580
+          thermalManager.babystepsTodo[Z_AXIS] += distance;
581
         #endif
581
         #endif
582
       #else
582
       #else
583
-        babystepsTodo[axis] += distance;
583
+        thermalManager.babystepsTodo[axis] += distance;
584
       #endif
584
       #endif
585
 
585
 
586
       babysteps_done += distance;
586
       babysteps_done += distance;

Loading…
Cancel
Save