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

Fix Spindle/Laser compile error #14312

Merged
merged 3 commits into from Jun 17, 2019
Merged

Fix Spindle/Laser compile error #14312

merged 3 commits into from Jun 17, 2019

Conversation

Ludy87
Copy link
Contributor

@Ludy87 Ludy87 commented Jun 17, 2019

Fixes #14307

@thinkyhead thinkyhead changed the title Compile Error Spindle Laser Fix Spindle/Laser compile error Jun 17, 2019
@thinkyhead thinkyhead merged commit 35aabd1 into MarlinFirmware:bugfix-2.0.x Jun 17, 2019
@Ludy87
Copy link
Contributor Author

Ludy87 commented Jun 18, 2019

@thinkyhead

uint8 goes from 0 to 255

SPEED_POWER_MIN is 5000
SPEED_POWER_MAX is 30000

is coming to overflow, so I had put on uint16


MENU_ITEM_EDIT_CALLBACK(uint8, MSG_LASER_POWER, &spindle_laser_power, SPEED_POWER_MIN, SPEED_POWER_MAX, update_spindle_laser_power);
MENU_ITEM_EDIT_CALLBACK(uint8, "Laser power", uint8_t=0, 5000, 30000, void update_spindle_laser_power());

@thinkyhead
Copy link
Member

thinkyhead commented Jun 18, 2019

There will be more code needing changes to support these variable SPEED_POWER_MAX values. I'm rewriting the Spindle / Laser code as a class, and there the size of the power will be set using TypeSelector<(SPEED_POWER_MAX)>255, uint16_t, uint8_t>.

@Ludy87 Ludy87 deleted the bf2_spindle_laser branch July 1, 2019 18:42
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.

None yet

2 participants