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

[BUG] IS_CARTHESIAN && DISABLED(SEGMENT_LEVELED_MOVES) wont compile error: conversion from 'XYval<unsigned char>' to non-scalar type 'XYval<signed char>' requested #26718

Closed
1 task done
Weafyr opened this issue Jan 22, 2024 · 7 comments · Fixed by #26819

Comments

@Weafyr
Copy link

Weafyr commented Jan 22, 2024

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

Something is wrong after this commit ba08dcf where is changed file mesh_bed_leveling.h and from this point the firmware cannot be compiled with settings IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)

I dont understand C, but my VSCode see error on line 66 in file mesh_bed_leveling.cpp - changing the line 66 from
xy_int8_t scel = cell_indexes(current_position), ecel = cell_indexes(destination);
to
xy_uint8_t scel = cell_indexes(current_position), ecel = cell_indexes(destination);
makes compilation possible, but I won't risk uploading it to my printer as I have no idea what it does.

obrazek

Bug Timeline

No response

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

not compiled, current bugfix-2.1.x

Printer model

No response

Electronics

No response

LCD/Controller

No response

Other add-ons

No response

Bed Leveling

MBL Manual Bed Leveling

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

No response

@sargonphin
Copy link
Contributor

I did the same fix on my printer for the exact same error and flashed it successfully. Although are you sure you want MBL and not mean bilinear?

@Weafyr
Copy link
Author

Weafyr commented Jan 23, 2024 via email

@sargonphin
Copy link
Contributor

Ah okay then bilinear is not for you in this case. From what I understand of the function, using unsigned should not be a problem. Give it a try and see if you can successfully save a mesh and reload it from EEPROM

@Weafyr
Copy link
Author

Weafyr commented Feb 23, 2024

@thinkyhead Sorry to ping you, but could you look into this? Seems so that your commit ba08dcf created this issue.

@ellensp
Copy link
Contributor

ellensp commented Feb 26, 2024

change
xy_int8_t scel = cell_indexes(current_position), ecel = cell_indexes(destination);
to
xy_uint8_t scel = cell_indexes(current_position), ecel = cell_indexes(destination);

and
const int8_t gcx = _MAX(scel.x, ecel.x), gcy = _MAX(scel.y, ecel.y);
to
const uint8_t gcx = _MAX(scel.x, ecel.x), gcy = _MAX(scel.y, ecel.y);

Builds without issue on the simulator

Give it a try

@thisiskeithb thisiskeithb linked a pull request Feb 26, 2024 that will close this issue
@thisiskeithb
Copy link
Member

This will now be fixed in #26936 instead.

Copy link

github-actions bot commented Jun 4, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants