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
[1.1.x] Fix compilation warnings #8395
[1.1.x] Fix compilation warnings #8395
Conversation
I love making TravisCI changes, because the only way to really find it out if it works is to #dil 😎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some questions about this PR…
.travis.yml
Outdated
- opt_enable USE_YMAX_PLUG | ||
- opt_enable USE_ZMIN_PLUG | ||
- opt_enable USE_ZMAX_PLUG | ||
- build_marlin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to combine as many tests as possible into a single build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do that.
.travis.yml
Outdated
@@ -203,7 +203,8 @@ script: | |||
- opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS | |||
- opt_set_adv I2C_SLAVE_ADDRESS 63 | |||
- opt_enable_adv ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU | |||
- opt_add_adv Z2_MIN_PIN 2 | |||
- pins_set RAMPS X_MAX_PIN -1 | |||
- opt_add_adv Z2_MAX_PIN 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the issue here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose you noticed that this is not building for MINIRAMBO
, nor does it enable PWM_MOTOR_CURRENT
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way it was, it would put 500 lines of warnings into the travis log because it was defining Z2_MIN_PIN multiple times. I will make the comment and the build reflect each other. I just changed it to make it the same as the other branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time when I added opt_add_adv Z2_MIN_PIN 2
the compiler error was that no Z2_MIN_PIN
was defined. It would be a good idea to go to the Blame log and find out when changes were made to these lines and what caused the new errors to start showing up.
@@ -1746,15 +1746,15 @@ void Temperature::isr() { | |||
|
|||
#if ENABLED(FAN_SOFT_PWM) | |||
#if HAS_FAN0 | |||
soft_pwm_count_fan[0] = (soft_pwm_count_fan[0] & pwm_mask) + soft_pwm_amount_fan[0] >> 1; | |||
soft_pwm_count_fan[0] = ((soft_pwm_count_fan[0] & pwm_mask) + soft_pwm_amount_fan[0]) >> 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean this…?
soft_pwm_count_fan[0] = (soft_pwm_count_fan[0] & pwm_mask)
+ (soft_pwm_amount_fan[0]) >> 1);
It would be a good idea to check with @StefanBruens before making this kind of change. Here is the original commit with dithering implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that this change is purely cosmetic because addition and subtraction operators have precedence over bitwise left shift and right shift operators ie (x+y>>1 == (x+y) >> 1).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holy crap, you're right. It's one of those aspects of C++ operator precedence that makes me shake my head.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the current implementation is wrong, then. The ">> 1" scaling should only be applied to the fan speed value, not the remainder.
The bug is not critical (resolution is halved), but should be corrected anyway.
fb932f8
to
a747501
Compare
.travis.yml
Outdated
- opt_set_adv I2C_SLAVE_ADDRESS 63 | ||
- opt_enable_adv ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU | ||
- opt_add_adv Z2_MIN_PIN 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would appear that all these tests can be moved to the MINIRAMBO tests which follow below.
Looks pretty good at this point. Squashed commits and will merge shortly. |
adedb1f
to
63c5385
Compare
a7a82d8
to
bfdae60
Compare
Why is there no point in setting all the endstops? With the endstop interrupts feature they all can be used to kill a print. |
Sure, they are useful in situ. However, they are not necessary for the Travis CI build. |
As modified in MarlinFirmware#8395
* Fix up Travis CI and compile warnings/errors * No ULTRA_LCD with REPRAP_DISCOUNT_SMART_CONTROLLER * No point in setting all the endstop plugs
* Fix up Travis CI and compile warnings/errors * No ULTRA_LCD with REPRAP_DISCOUNT_SMART_CONTROLLER * No point in setting all the endstop plugs
I added some brackets that GCC was complaining about in temperature.cpp, updated the MINIRAMBO build in travis to bring it to parity with 2.0.x to get rid of the warnings, and added a build which uses the endstop interrupts feature.
@Roxy-3D @fiveangle Unbricked version of #8384