BCN3D / BCN3DSigma-Firmware

Custom Marlin version for the brand new BCN3D Sigma from BCN3D Technologies
https://bcn3d.com
GNU General Public License v3.0
89 stars 74 forks source link

mayby a bug (the same as in the sigmax-firmware) #196

Closed dvb-adenin closed 6 years ago

dvb-adenin commented 6 years ago

degTargetHotend is not an array, but a function

diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index 98d9bf0..9ce147d 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -4800,8 +4800,8 @@ inline void gcode_M34(){
                        Serial.println(current_position[Y_AXIS]);
                        waiting_temps = false;
                        saved_print_smartpurge_flag = true;
-                       if(degTargetHotend[0]>145)Flag_hotend0_relative_temp = true;
-                       if(degTargetHotend[1]>145)Flag_hotend1_relative_temp = true;
+                       if(degTargetHotend(0)>145)Flag_hotend0_relative_temp = true;
+                       if(degTargetHotend(1)>145)Flag_hotend1_relative_temp = true;
                        genie.WriteObject(GENIE_OBJ_USERBUTTON,BUTTON_SDPRINTING_PAUSE,1);
                }
                #endif //SDSUPPORT
@@ -5482,8 +5482,8 @@ inline void gcode_M109(){
                #endif //TEMP_RESIDENCY_TIME
        }
        #endif //TEMP_RESIDENCY_TIME
-       if(degTargetHotend[0]>145)Flag_hotend0_relative_temp = true;
-       if(degTargetHotend[1]>145)Flag_hotend1_relative_temp = true;
+       if(degTargetHotend(0)>145)Flag_hotend0_relative_temp = true;
+       if(degTargetHotend(1)>145)Flag_hotend1_relative_temp = true;
        waiting_temps = false;
        SERIAL_PROTOCOLLNPGM("Extruder Heated");
        LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
AlejandroGarcia92 commented 6 years ago

Yes, I realised a months ago that it can be potential bug and it will be fixed for the next update. Anyway, it seems that compiler fix it while is compiling.