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] Persistent info not updating #2804

Closed
rondlh opened this issue Jun 5, 2023 · 4 comments
Closed

[BUG] Persistent info not updating #2804

rondlh opened this issue Jun 5, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@rondlh
Copy link

rondlh commented Jun 5, 2023

Description

I noticed that under certain conditions the persistent info is not updating.

Steps to reproduce

  1. Let temps stabilize at room temp
  2. Increase the E1 target temp (IDEX system)
  3. Watch the shown persistent temp for E1

IMG_20230605_170409

Expected behavior
Persistent temp updates correctly

Actual behavior
E1 temp is not updated

Hardware Variant

BTT TFT35 V3.0

TFT Firmware Version & Main Board Firmware details

Latest release (2023-06-05)

Additional Information

The issue seems to be in PersistentInfo.c

  uint8_t tmpHeater[3];  // chamber, bed, hotend
  uint8_t tmpIndex = 0;

  if (infoSettings.hotend_count)  // global hotend
    tmpHeater[tmpIndex++] = heatGetCurrentHotend();

  if (infoSettings.bed_en)  // global bed
    tmpHeater[tmpIndex++] = BED;

  if (infoSettings.chamber_en)  // global chamber
    tmpHeater[tmpIndex++] = CHAMBER;

  bool update = false;
  static int16_t lastCurrent[3];
  static int16_t lastTarget[3];

  for (int8_t i = tmpIndex - 1; i >= 0; i--)
  {
    int16_t actCurrent = heatGetCurrentTemp(tmpHeater[i]);
    int16_t actTarget = heatGetTargetTemp(tmpHeater[i]);

    if (lastCurrent[i] != actCurrent || lastTarget[i] != actTarget)
    {
      lastCurrent[i] = actCurrent;
      lastTarget[i] = actTarget;
      update = true;
   }
  }

To check if an update of the persistent info is needed, only the E0 temp/target, bed temp/target and chamber temp/target are used, not the E1 temp/target.

@rondlh rondlh added the bug Something isn't working label Jun 5, 2023
@kisslorand
Copy link
Contributor

@rondlh
Please check PR #2805.

@rondlh
Copy link
Author

rondlh commented Jun 5, 2023

@rondlh Please check PR #2805.

That's a very nice solution, which handles the various configurations quite well.

@rondlh
Copy link
Author

rondlh commented Jun 6, 2023

Solved, thanks to @kisslorand

Copy link

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 Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants