Repository navigation
qtvcp: make HAL pin type enums resolvable by uic again - #4846
Open
grandixximo wants to merge 1 commit into
Open
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
uic resolves `<enum>HalBar::REAL</enum>` with getattr(HalBar, 'REAL'). Since the HAL API break those class attributes were hal.Type members, which the HALPinType property rejects, so HalBar, PushButton and HALPad always came up with their default pin type. On qtdragon_lathe the load bars became SINT and lathe_postgui.hal failed to link them to joint.N.vel-cmd. Copy the HALPinType members onto each class instead of keeping a second hand-written list, and declare the current names first so that BOOL, SINT and REAL are the member names and BIT, S32 and FLOAT their aliases. Fixes LinuxCNC#4843
Contributor
|
Wondering,... how long do we need to keep the old names? |
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.
Fixes #4843.
uic resolves
<enum>HalBar::REAL</enum>withgetattr(HalBar, 'REAL'). Since the HAL API break those class attributes arehal.Typemembers, which theHALPinTypeproperty rejects, so HalBar, PushButton and HALPad always come up with their default pin type. On qtdragon_lathe the load bars become SINT andlathe_postgui.halfails to link them tojoint.N.vel-cmd, so the config does not start.I now copy the
HALPinTypemembers onto each class instead of keeping a second hand-written list, and declare the current names first, so BOOL, SINT and REAL are the member names and BIT, S32 and FLOAT their aliases. Otherwise Designer writes the old names back when it saves a .ui.I ran sim.qtdragon_lathe.basic_xz_lathe before and after: before it stops after loading the postgui file, after it starts with both load pins real and linked. Loading a .ui by uic gives REAL for both
HalBar::REALandHalBar::FLOAT.@BsAtHome, this touches the type names from the API break, could you have a look?