-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
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] redundant temperature reports when heating with wait #26805
Comments
Interesting... code is duplicated.. removing it solves the issue, see diff in my next post |
I like it so much when removing code fixes things XD |
this diff removes the duplication diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp
index 9b071ecc36..0bb73dad20 100644
--- a/Marlin/src/module/temperature.cpp
+++ b/Marlin/src/module/temperature.cpp
@@ -4488,7 +4488,7 @@ void Temperature::isr() {
bool wants_to_cool = false;
celsius_float_t target_temp = -1.0, old_temp = 9999.0;
- millis_t now, next_temp_ms = 0, cool_check_ms = 0;
+ millis_t now, cool_check_ms = 0;
wait_for_heatup = true;
do {
// Target temperature might be changed during the loop
@@ -4501,19 +4501,6 @@ void Temperature::isr() {
}
now = millis();
- if (ELAPSED(now, next_temp_ms)) { // Print temp & remaining time every 1s while waiting
- next_temp_ms = now + 1000UL;
- print_heater_states(target_extruder);
- #if TEMP_RESIDENCY_TIME > 0
- SString<20> s(F(" W:"));
- if (residency_start_ms)
- s += long((SEC_TO_MS(TEMP_RESIDENCY_TIME) - (now - residency_start_ms)) / 1000UL);
- else
- s += '?';
- s.echo();
- #endif
- SERIAL_EOL();
- }
idle();
gcode.reset_stepper_timeout(); // Keep steppers powered
@@ -4626,7 +4613,7 @@ void Temperature::isr() {
bool wants_to_cool = false;
celsius_float_t target_temp = -1, old_temp = 9999;
- millis_t now, next_temp_ms = 0, cool_check_ms = 0;
+ millis_t now, cool_check_ms = 0;
wait_for_heatup = true;
do {
// Target temperature might be changed during the loop
@@ -4639,19 +4626,6 @@ void Temperature::isr() {
}
now = millis();
- if (ELAPSED(now, next_temp_ms)) { //Print Temp Reading every 1 second while heating up.
- next_temp_ms = now + 1000UL;
- print_heater_states(active_extruder);
- #if TEMP_BED_RESIDENCY_TIME > 0
- SString<20> s(F(" W:"));
- if (residency_start_ms)
- s += long((SEC_TO_MS(TEMP_BED_RESIDENCY_TIME) - (now - residency_start_ms)) / 1000UL);
- else
- s += '?';
- s.echo();
- #endif
- SERIAL_EOL();
- }
idle();
gcode.reset_stepper_timeout(); // Keep steppers powered
but I notice this looses TEMP_RESIDENCY_TIME and TEMP_BED_RESIDENCY_TIME from the report (ts not in M155) #if TEMP_RESIDENCY_TIME > 0
SString<20> s(F(" W:"));
if (residency_start_ms)
s += long((SEC_TO_MS(TEMP_RESIDENCY_TIME) - (now - residency_start_ms)) / 1000UL);
else
s += '?';
s.echo();
#endif
you can you test this part for now. (ive tested it in the simulator) I also worry how many clients are going to break with this fixed. |
I'm testing it now, it definitely removed too much ( I'm a little puzzled because I still found this:
(there are other) also, this completely removes temperature reports for |
I would suggest adding an optional |
I updated my proposition (it only cleans up the code a little, does NOT remove the redundancy) but it won't compile:
I don't know C well enough to fix it at this point |
there are these I also don't see a reason why |
opened a branch on my repo to fix the issue: https://github.com/petaflot/Marlin/tree/redundant_temperature_reports |
This suspect code was added in #11949 |
@petaflot can you verify the open PR resolves the issue on youre end? |
please give me a few days |
it works. I still think there's room for code cleanup though... |
closing as not planned because of the cleanup required |
following discussion on #26952 |
following discussion on #26952 |
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. |
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
M109
andM190
triggers the reporting of temperatures, in addition to the reports triggered byM155
Bug Timeline
probably old
Expected behavior
redundant temperature reports have been stripped:
Actual behavior
Steps to Reproduce
Version of Marlin Firmware
bugfix-2.1.x
Additional information & file uploads
configuration not needed
The text was updated successfully, but these errors were encountered: