Patch Re-Validation when MGWidget returns an overlay configuration - #216
Merged
Conversation
…oups are the same
… if given mg is not a motion group
…or signal blocking the controller widgets
… when updating the displays so we do NOT get into an infinite signal loop
… when updating the displays
MGWidget returns an overlay configuration
…updating the displays
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Yhoshua was experiencing a bug where the
MGWidgetwould not fully enable itself after configurating a motion builder. I [@rocco8773] have not been able to duplicate this one my Windows 10 development setup. The Motion PC is a Windows 11 setup.However, I did notice that when returning from a drive configuration we were being seeded into an infinite signal loop (see below)
Since I could not reproduce Yhoshua's error case, I can not confirm is signal-loop was causing it. However, it does have the potential to do so.
To mitigate this infinite signal loop two things were done:
DriveControlWidget.update_controller_displays()was given theblockkwarg to block any signals fromDriveBaseController. Thus, preventing theDriveBaseController.driveStatusChangedsignal from being emitted. This is only done whenupdate_controller_display()is called from withingDriveControlWidget.link_motion_group().isalready linked, thenlink_motion_group()will just return. Also, breaking the signal-loop.is Noneconditionals withisinstance().pass.DriveBaseController.link_motion_group: unlink motion group and return if the given motion group is invalid.DriveControlWidget.update_controller_displays(): addkwargblockso we can blockDriveBaseControllersignals.DriveControlWidget.link_motion_group()useblockwhen executingupdate_controller_displays().