Skip to content

Update for fix for #211#214

Merged
PowerBroker2 merged 1 commit intoPowerBroker2:masterfrom
jimwhitelaw:211-update
Jan 5, 2024
Merged

Update for fix for #211#214
PowerBroker2 merged 1 commit intoPowerBroker2:masterfrom
jimwhitelaw:211-update

Conversation

@jimwhitelaw
Copy link
Collaborator

Because scaleFactor in processPID() and conditionResponse() is a float, the product of (response * scaleFactor) is automatically cast to float and potentially loses data. This change makes scaleFactor a double as well, keeping response a full 64 bits wide.

Not all of the return statements in conditionResponse() had the explicit cast to double implemented previously; with this change the typecast is no longer needed as it always returns a double.

I have updated the comment/description for both methods to reflect the change in return type.

@PowerBroker2 PowerBroker2 merged commit 6c584d7 into PowerBroker2:master Jan 5, 2024
@jimwhitelaw jimwhitelaw deleted the 211-update branch March 29, 2024 04:00
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.

2 participants