Skip to content

Small fixes - proper return in void, omit unused #27858

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

Merged

Conversation

classicrocker883
Copy link
Contributor

@classicrocker883 classicrocker883 commented May 15, 2025

Description

More to come

Change to Linear Advance in ProUI dwin.cpp does not work:


Omit:

  • Omit unused in planner.h + Conditionals-2-LCD.h

Fixes for additional Check All errors/warnings:

  • See Related Issues

Use proper return in void functions:

  • Move if (blah blah) return [code] down for void functions
    • example: if (blah blah) { [code]; return; }

  • Adjust some spacing

Requirements

Benefits

Configurations

Related Issues

To see what errors/warnings show, do the following:
PlatformIO > Default (or another env) > Advanced > Check All

  • [high:error] failed to expand 'DO', Wrong number of parameters for macro '_DO_2'. [preprocessorErrorDirective]

    • #define _DO_N
  • [medium:warning] Comparison of a boolean expression with an integer.

    • #define _ABS
  • [low:performance] Function parameter 'pxy' should be passed by const reference. [passedByValue]

    • FI void set(const XYval<T> pxy, const T pz, const T pe) { set(pxy, pz); e = pe; }

@classicrocker883
Copy link
Contributor Author

classicrocker883 commented May 20, 2025

something wrong with Linear Advance, it will take a value, like 0.01, then turn to 0.10, then 1000.0, after every time you click on it or switch menu.

I believe it has to use an intermediate variable, such as like used for JyersUI, that might be the issue.

has the value changed for K? should it also be / MINUNITMULT for getting/reading the value? seems so

update: so it should be POW(10, 3)

@classicrocker883 classicrocker883 changed the title Small fixes Small fixes - proper return in void, omit unused May 25, 2025
@@ -582,7 +582,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 109: M109(); break; // M109: Wait for hotend temperature to reach target
#endif

case 105: M105(); return; // M105: Report Temperatures (and say "ok")
case 105: M105(); no_ok = true; break; // M105: Report Temperatures (and say "ok")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed to bypass "ok" but still do SERIAL_IMPL.msgDone().

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x-May4 branch from 2123090 to af54f16 Compare May 26, 2025 21:29
@thinkyhead thinkyhead merged commit 122c411 into MarlinFirmware:bugfix-2.1.x May 26, 2025
66 checks passed
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.

3 participants