Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up the PR #4278 (Fixups for PID_ADD_EXTRUSION_RATE and HOTENDS==1) #4291

Merged
merged 1 commit into from Jul 13, 2016
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jul 13, 2016

Follow-up the PR #4278 (Fixups for PID_ADD_EXTRUSION_RATE and HOTENDS==1)

PR #4278 (Fixups for PID_ADD_EXTRUSION_RATE and HOTENDS==1) causes compilation errors and warning
when PIDTEMP and PID_PARAMS_PER_HOTEND are enabled and HOTENDS == 1.

error message

temperature.cpp:72: error: conflicting declaration 'float Temperature::Kp [1]'

     float Temperature::Kp[HOTENDS] = ARRAY_BY_HOTENDS1(DEFAULT_Kp),

                                  ^

In file included from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\buzzer.h:28:0,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\Marlin.h:386,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\temperature.cpp:27:

temperature.h:88: error: 'Temperature::Kp' has a previous declaration as 'float Temperature::Kp'

         static float Kp, Ki, Kd;

                      ^

temperature.cpp:72: error: declaration of 'float Temperature::Kp' outside of class is not definition [-fpermissive]

     float Temperature::Kp[HOTENDS] = ARRAY_BY_HOTENDS1(DEFAULT_Kp),

                                  ^

temperature.cpp:73: error: conflicting declaration 'float Temperature::Ki [1]'

           Temperature::Ki[HOTENDS] = ARRAY_BY_HOTENDS1((DEFAULT_Ki) * (PID_dT)),

                                  ^

In file included from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\buzzer.h:28:0,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\Marlin.h:386,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\temperature.cpp:27:

temperature.h:88: error: 'Temperature::Ki' has a previous declaration as 'float Temperature::Ki'

         static float Kp, Ki, Kd;

                          ^

temperature.cpp:73: error: declaration of 'float Temperature::Ki' outside of class is not definition [-fpermissive]

           Temperature::Ki[HOTENDS] = ARRAY_BY_HOTENDS1((DEFAULT_Ki) * (PID_dT)),

                                  ^

temperature.cpp:74: error: conflicting declaration 'float Temperature::Kd [1]'

           Temperature::Kd[HOTENDS] = ARRAY_BY_HOTENDS1((DEFAULT_Kd) / (PID_dT));

                                  ^

In file included from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\buzzer.h:28:0,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\Marlin.h:386,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\temperature.cpp:27:

temperature.h:88: error: 'Temperature::Kd' has a previous declaration as 'float Temperature::Kd'

         static float Kp, Ki, Kd;

                              ^

temperature.cpp:74: error: declaration of 'float Temperature::Kd' outside of class is not definition [-fpermissive]

           Temperature::Kd[HOTENDS] = ARRAY_BY_HOTENDS1((DEFAULT_Kd) / (PID_dT));

                                  ^

temperature.cpp:76: error: conflicting declaration 'float Temperature::Kc [1]'

       float Temperature::Kc[HOTENDS] = ARRAY_BY_HOTENDS1(DEFAULT_Kc);

                                    ^

In file included from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\buzzer.h:28:0,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\Marlin.h:386,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\temperature.cpp:27:

temperature.h:90: error: 'Temperature::Kc' has a previous declaration as 'float Temperature::Kc'

           static float Kc;

                        ^

temperature.cpp:76: error: declaration of 'float Temperature::Kc' outside of class is not definition [-fpermissive]

       float Temperature::Kc[HOTENDS] = ARRAY_BY_HOTENDS1(DEFAULT_Kc);

                                    ^

warning message

In file included from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\buzzer.h:28:0,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\Marlin.h:386,

                 from AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\configuration_store.cpp:128:

AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\configuration_store.cpp: In function 'void Config_ResetDefault()':

AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\temperature.h:42:39: warning: unused variable 'e' [-Wunused-variable]

   #define HOTEND_LOOP() const uint8_t e = 0;

                                       ^

AppData\Local\Temp\build6674025c445f92d0b07185e4e4080804.tmp\sketch\configuration_store.cpp:621:7: note: in expansion of macro 'HOTEND_LOOP'

       HOTEND_LOOP()

       ^

@ghost ghost changed the title Follow-up the PR #4728 (Fixups for PID_ADD_EXTRUSION_RATE and HOTENDS==1) Follow-up the PR #4278 (Fixups for PID_ADD_EXTRUSION_RATE and HOTENDS==1) Jul 13, 2016
@thinkyhead thinkyhead merged commit ed89c71 into MarlinFirmware:RCBugFix Jul 13, 2016
@ghost ghost deleted the Follow-up-the-PR-#4278 branch July 14, 2016 09:22
@jbrazio jbrazio modified the milestone: 1.1.0 Jul 18, 2016
@thinkyhead thinkyhead mentioned this pull request Jul 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants