Browse Source

theTarget => target_temp

Scott Lahteine 8 years ago
parent
commit
c7063eb55c
1 changed files with 10 additions and 10 deletions
  1. 10
    10
      Marlin/Marlin_main.cpp

+ 10
- 10
Marlin/Marlin_main.cpp View File

6077
     #define TEMP_CONDITIONS (wants_to_cool ? thermalManager.isCoolingHotend(target_extruder) : thermalManager.isHeatingHotend(target_extruder))
6077
     #define TEMP_CONDITIONS (wants_to_cool ? thermalManager.isCoolingHotend(target_extruder) : thermalManager.isHeatingHotend(target_extruder))
6078
   #endif
6078
   #endif
6079
 
6079
 
6080
-  float theTarget = -1.0, old_temp = 9999.0;
6080
+  float target_temp = -1.0, old_temp = 9999.0;
6081
   bool wants_to_cool = false;
6081
   bool wants_to_cool = false;
6082
   wait_for_heatup = true;
6082
   wait_for_heatup = true;
6083
   millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
6083
   millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
6086
 
6086
 
6087
   do {
6087
   do {
6088
     // Target temperature might be changed during the loop
6088
     // Target temperature might be changed during the loop
6089
-    if (theTarget != thermalManager.degTargetHotend(target_extruder)) {
6089
+    if (target_temp != thermalManager.degTargetHotend(target_extruder)) {
6090
       wants_to_cool = thermalManager.isCoolingHotend(target_extruder);
6090
       wants_to_cool = thermalManager.isCoolingHotend(target_extruder);
6091
-      theTarget = thermalManager.degTargetHotend(target_extruder);
6091
+      target_temp = thermalManager.degTargetHotend(target_extruder);
6092
 
6092
 
6093
       // Exit if S<lower>, continue if S<higher>, R<lower>, or R<higher>
6093
       // Exit if S<lower>, continue if S<higher>, R<lower>, or R<higher>
6094
       if (no_wait_for_cooling && wants_to_cool) break;
6094
       if (no_wait_for_cooling && wants_to_cool) break;
6115
     idle();
6115
     idle();
6116
     refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
6116
     refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
6117
 
6117
 
6118
-    float temp = thermalManager.degHotend(target_extruder);
6118
+    const float temp = thermalManager.degHotend(target_extruder);
6119
 
6119
 
6120
     #if TEMP_RESIDENCY_TIME > 0
6120
     #if TEMP_RESIDENCY_TIME > 0
6121
 
6121
 
6122
-      float temp_diff = fabs(theTarget - temp);
6122
+      const float temp_diff = fabs(target_temp - temp);
6123
 
6123
 
6124
       if (!residency_start_ms) {
6124
       if (!residency_start_ms) {
6125
         // Start the TEMP_RESIDENCY_TIME timer when we reach target temp for the first time.
6125
         // Start the TEMP_RESIDENCY_TIME timer when we reach target temp for the first time.
6186
       #define TEMP_BED_CONDITIONS (wants_to_cool ? thermalManager.isCoolingBed() : thermalManager.isHeatingBed())
6186
       #define TEMP_BED_CONDITIONS (wants_to_cool ? thermalManager.isCoolingBed() : thermalManager.isHeatingBed())
6187
     #endif
6187
     #endif
6188
 
6188
 
6189
-    float theTarget = -1.0, old_temp = 9999.0;
6189
+    float target_temp = -1.0, old_temp = 9999.0;
6190
     bool wants_to_cool = false;
6190
     bool wants_to_cool = false;
6191
     wait_for_heatup = true;
6191
     wait_for_heatup = true;
6192
     millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
6192
     millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
6197
 
6197
 
6198
     do {
6198
     do {
6199
       // Target temperature might be changed during the loop
6199
       // Target temperature might be changed during the loop
6200
-      if (theTarget != thermalManager.degTargetBed()) {
6200
+      if (target_temp != thermalManager.degTargetBed()) {
6201
         wants_to_cool = thermalManager.isCoolingBed();
6201
         wants_to_cool = thermalManager.isCoolingBed();
6202
-        theTarget = thermalManager.degTargetBed();
6202
+        target_temp = thermalManager.degTargetBed();
6203
 
6203
 
6204
         // Exit if S<lower>, continue if S<higher>, R<lower>, or R<higher>
6204
         // Exit if S<lower>, continue if S<higher>, R<lower>, or R<higher>
6205
         if (no_wait_for_cooling && wants_to_cool) break;
6205
         if (no_wait_for_cooling && wants_to_cool) break;
6226
       idle();
6226
       idle();
6227
       refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
6227
       refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
6228
 
6228
 
6229
-      float temp = thermalManager.degBed();
6229
+      const float temp = thermalManager.degBed();
6230
 
6230
 
6231
       #if TEMP_BED_RESIDENCY_TIME > 0
6231
       #if TEMP_BED_RESIDENCY_TIME > 0
6232
 
6232
 
6233
-        float temp_diff = fabs(theTarget - temp);
6233
+        const float temp_diff = fabs(target_temp - temp);
6234
 
6234
 
6235
         if (!residency_start_ms) {
6235
         if (!residency_start_ms) {
6236
           // Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time.
6236
           // Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time.

Loading…
Cancel
Save