Skip to content

issue with duplicate module field names #3075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
UglyRooster opened this issue Jan 3, 2023 · 2 comments
Closed

issue with duplicate module field names #3075

UglyRooster opened this issue Jan 3, 2023 · 2 comments
Labels
duplicate Will close because another PR or issue is the same. (please link to it when using this label)

Comments

@UglyRooster
Copy link

Related to issue 2666.
The SSME engine has two fields named "throttle". The first selects use of the main throttle or independent throttle. As a result the 2nd one (the actual independent throttle) isn't accessible.

Additionally, the check in Allfields, FieldIsVisible doesn't actually return true for the 2nd throttle, even when it is visible in the gui. Possibly the field isPersistant could also be used in the FieldisVisible check, as isPersistant seems to be only true for fields that appear in the GUI (even if at times hidden).
My test code shows isPersistant true for the scaler throttle even when using the main throttle. This seems fine since would be nice to set the independent throttle BEFORE enabling it!

Not sure how one access to the 2nd or more duplicated field. Would be nice if get/setfield had an optional parameter to get at the 2nd field....

@nuggreat
Copy link

nuggreat commented Jan 3, 2023

Duplicate of issue #2943
Though as with modules themselves there having a method to get fields by index as apposed to just name would be nice though this is the only module this has be a problem for and only recently.

@UglyRooster
Copy link
Author

UglyRooster commented Jan 4, 2023

Was thinking of, in the case of duplicates, in addition to keeping the current behavior, add the duplicates with a suffix representing the type. And if their are duplicates again, adding numbers.

Allfields for the SSME module would return in part:
throttle
throttle_b is a bool
throttle_s is a single

What are the negative side effects of using isPersistant in FieldisVisible?
Possibly during development, the fields only allowed because of isPersistant could have the prefix "p_"

@JonnyOThan JonnyOThan added the duplicate Will close because another PR or issue is the same. (please link to it when using this label) label Aug 1, 2024
@JonnyOThan JonnyOThan closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Will close because another PR or issue is the same. (please link to it when using this label)
Projects
None yet
Development

No branches or pull requests

3 participants