Skip to content

Fix bug where start/end values are not updated correctly after initialization#27

Merged
SBlokhuizen merged 2 commits intodevelopfrom
bugfix/fix-implicit-linking
Mar 4, 2025
Merged

Fix bug where start/end values are not updated correctly after initialization#27
SBlokhuizen merged 2 commits intodevelopfrom
bugfix/fix-implicit-linking

Conversation

@SBlokhuizen
Copy link
Copy Markdown
Collaborator

@SBlokhuizen SBlokhuizen commented Mar 4, 2025

This fixes a recently introduced bug, where the start_value and end_value would not get updated. self.values_changed = True
is now called at the end of initialization of the tendency to ensure the start_value and end_value are updated accordingly. This fixes an issue where the end_value would not get updated, and the next tendency would take the wrong start value. For example:

waveform:
- {type: sine-wave, base: 8, amplitude: 2, duration: 1.75}
- {type: linear, duration: 2, to: 2}

Would before give:
image

And now:
image

Also, this fixes the issue where a warning would be given because the end of previous tendency would not exactly equal the start of the current tendency, due to floating point precision.

@SBlokhuizen SBlokhuizen self-assigned this Mar 4, 2025
@SBlokhuizen SBlokhuizen requested a review from maarten-ic March 4, 2025 13:48
@SBlokhuizen SBlokhuizen merged commit f0eabeb into develop Mar 4, 2025
4 checks passed
@SBlokhuizen SBlokhuizen deleted the bugfix/fix-implicit-linking branch March 4, 2025 15:59
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