-
Notifications
You must be signed in to change notification settings - Fork 229
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
Add basic bed leveling screen to Calibration menu #2438
base: master
Are you sure you want to change the base?
Conversation
9193e81
to
22a9df3
Compare
src/gui/screen_bed_leveling.cpp
Outdated
const uint8_t *data = reinterpret_cast<const uint8_t *>(msg); | ||
auto newText = string_view_utf8::MakeRAM(data); | ||
if (newText != this->m_statusMsg.GetText()) { | ||
this->m_statusMsg.SetText(newText); |
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 data could change under our hands between the call and invalidate.
MakeRAM does not allocate any memory, it uses the memory where the pointer points.
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.
This should be fixed by keeping an internal copy.
src/gui/screen_bed_leveling.hpp
Outdated
|
||
/** While an instance exists, MenuTimeout will be disabled. | ||
**/ | ||
class MenuTimeoutBlocker { |
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.
Just call DisableMenuTimeout()
in constructor. and it will disable timeout for this screen. This object is not needed.
With Screens::Access()
you get pinter to current screen
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.
Removed, switched to DisableMenuTimeout()
src/gui/screen_bed_leveling.hpp
Outdated
#include "screen.hpp" | ||
#include "ScreenHandler.hpp" | ||
|
||
class screen_bed_leveling_t : public AddSuperWindow<screen_t> { |
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.
Use CamelCase for the name of the screen.
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.
Renamed
src/gui/screen_bed_leveling.cpp
Outdated
, footer(this) { | ||
header.SetIcon(IDR_PNG_heatbed_16px); | ||
header.SetText(_("BED LEVELING")); | ||
this->m_statusMsg.SetText(_("")); |
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.
Text will be initialized as empty, but if you want use directly stringview insted of translating empty string.
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.
Removed.
22a9df3
to
a2f2952
Compare
- Use screen_t as ancestor and get the last marlin message localy from the screen - Block MenuTimeout when Mesh Bed Leveling is in progress - Add progressBar BFW-2586
a2f2952
to
c0d8435
Compare
BFW-2586