Patch switching drive in MGWidget - #215
Merged
Merged
Conversation
…l to handle blocking and disconnecting of all signals
…g target position
…ist instead of None ... Position signal expects a list
…hanged so we do not have a signal connected to a signal
…ged so we do not have a signal connected to a signal
…so we do not have a signal connected to a signal
…is not fully connected
…n group not being fully connected to the motors
…established emit the driveStatusChanged signal
…on try to reconnect a motor
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.
Mechanics around the drive drop-down menu are not behaving as expected:
LostConnectionDialogto popup, which makes the drive change glitch.This PR addresses both issues.
kwargdisconnect_signalstoEventActor.terminateand all its sub-classes. The default value isFalse. This allows for actors who utilize signals to disconnect (or not) its signals during termination.Motor.terminateto always block signals when terminated, but only disconnect signals ifdisconnect_signals = True.MotorSignals:set_blocking: block or unblock allSimpleSignal'sdisconnect: disconnect specified callback from allSimpleSignal'sdisconnect_all: disconnect all callbacks from allSimpleSignal'sdisconnect_signalsfor all uses of.terminate().DriveBaseControllerhave_drive_connection_establishedand_drive_connection_lostemit tehdriveStatusChangedsignal. This allows for connection lost and established to be communicated up to theMGWidget.DriveConfigOverlay._validate_drive()so the validate button will attempt to restart an axis if its TCP connection is NOT currently established. This was done, since before the only way to reestablish a motor connection was to edit the IP address field. Even if the current IP address is correct.MGWidget: Created@Slot_handle_drive_status_changedwhich is connected to thedriveStatusChangedsignal. This is done so the GUI can be updated when a motor connection is lost or established, as well as communicating an update of the drive position in the display.MGWidget: Crated (and implemented) method_terminate_mgto handle terminating the attached motion group.MGWidget: Updated_validate_driveto handle with a drive loses (or establishes) a TCP connection. Before it only handled if a drive was terminated. If a connection is lost, then the drive gear icon will turn back to read and have a tooltip indicating which axes were lost.