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

Added sample heater display mode check in custom_pid function. #729

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

mjrand
Copy link
Contributor

@mjrand mjrand commented Aug 20, 2024

Description

I added in a simple check for the display mode of the sample heater in the custom PID function.
If the sample heater is not in "current" mode, then the display mode will be changed to "current" mode.

Motivation and Context

The custom PID function assumes that the sample heater display mode is set to current mode but does not check.
This leads to situations where the sample heater is in power mode and the custom PID will attempt to set the sample heater to a very high number in Watts instead of % of max current. This usually causes the PID function to break because the power in W is over the maximum range of the heater output. This confuses people when the custom PID will seemingly not work when started.

Resolves #494.

How Has This Been Tested?

Simple function addition shouldn't cause issues.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mjrand mjrand linked an issue Aug 20, 2024 that may be closed by this pull request
Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

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

This looks good to me. I linked it to the relevant issue, #494. Also just merged in main, since the branch is 8 months old and docs weren't building properly because of it.

@BrianJKoopman BrianJKoopman merged commit 99854a7 into main Aug 26, 2024
4 checks passed
@BrianJKoopman BrianJKoopman deleted the fix_custom_PID_display_mode_bug branch August 26, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LS372 Custom PID needs to check mode 372 custom pid -- sample heater setting
2 participants