You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
If you define
/**
* Normally G28 leaves leveling disabled on completion. Enable one of
* these options to restore the prior leveling state or to always enable
* leveling immediately after G28.
*/
//#define RESTORE_LEVELING_AFTER_G28
#define ENABLE_LEVELING_AFTER_G28
then the line 438: TERN_(RESTORE_LEVELING_AFTER_G28, set_bed_leveling_enabled(leveling_restore_state));
leaves leveling_restore_state unused. It needs EITHERRESTORE_LEVELING_AFTER_G28ENABLE_LEVELING_AFTER_G28
The reason will be displayed to describe this comment to others. Learn more.
was not the problem, but that : SanityCheck.h:1449:6: error: #error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'."
1be16e3
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.
arlin/src/gcode/calibrate/G28.cpp: In static member function 'static void GcodeSuite::G28()':
Marlin/src/gcode/calibrate/G28.cpp:244:16: warning: unused variable 'leveling_restore_state' [-Wunused-variable]
const bool leveling_restore_state = ENABLED(ENABLE_LEVELING_AFTER_G28) || TERN0(RESTORE_LEVELING_AFTER_G28, planner.leveling_active);
1be16e3
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.
@tpruvot Would #20474 be a good fix for that?
1be16e3
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 dont think so, may be related to my RESTORE_LEVELING_AFTER_G28 false value, for UBL
1be16e3
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.
If you define
then the line 438:
TERN_(RESTORE_LEVELING_AFTER_G28, set_bed_leveling_enabled(leveling_restore_state));
leaves
leveling_restore_state
unused. It needs EITHERRESTORE_LEVELING_AFTER_G28
ENABLE_LEVELING_AFTER_G28
1be16e3
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.
And sanity check maybe? Although enabling both shouldn`t hurt, I suppose
1be16e3
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.
Marlin/Marlin/src/inc/SanityCheck.h
Lines 1476 to 1478 in 3f93b8b
1be16e3
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.
Yo, just found it too
1be16e3
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.
was not the problem, but that : SanityCheck.h:1449:6: error: #error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'."
1be16e3
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.
Yes and if you define NONE of these two, you also get the -wunused warning