Skip to content
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

VT client doesn't resize child objects of softkey correctly #223

Open
GwnDaan opened this issue Mar 23, 2023 · 4 comments
Open

VT client doesn't resize child objects of softkey correctly #223

GwnDaan opened this issue Mar 23, 2023 · 4 comments
Labels
bug Something isn't working iso: virtual terminal Related to the ISO-11783:7 standard

Comments

@GwnDaan
Copy link
Member

GwnDaan commented Mar 23, 2023

Describe the bug
The child objects of a soft key are not scaled according to "softkey-scalefactor", but scaled according to the "datamask-scalefactor". This leads to inconsistency when there is a great difference between the 2 scaling factors. E.g. when the datamask should be scaled by x2 and the soft key by x0.5. Then we'll end up with the contents of the soft key being four times the intended size.

Supporting Documentation
In this snippet we can see that it only checks whether the object is softkey when applying the "softkey-scalefactor":
https://github.com/ad3154/Isobus-plus-plus/blob/44a2941ca23f50f0a7ed07b4f74b460c91db0815/isobus/src/isobus_virtual_terminal_client.cpp#L3469-L3480

Possible solutions

  • First iterate over the complete object pool to find all children of a soft key
  • Scale each object one by one in hierarchy

These are my initial thoughts, but there could be better alternatives?

@GwnDaan GwnDaan added the investigating Looking into this issue / need more info label Mar 23, 2023
@GwnDaan
Copy link
Member Author

GwnDaan commented Mar 23, 2023

We should also keep in mind #224 while finding a solution for this issue

@ad3154
Copy link
Member

ad3154 commented Apr 6, 2023

This one could be tricky, because objects that are children of a key object can be children of things on the data mask also, so both approaches are incorrect, haha

@GwnDaan
Copy link
Member Author

GwnDaan commented Apr 12, 2023

This one could be tricky, because objects that are children of a key object can be children of things on the data mask also, so both approaches are incorrect, haha

Ahh dang, I see how that wouldn't work... We could make a copy of those objects with seperate id's and then that wouldn't be an issue... But that is rather complicated and has lots of other side effects that need to be considered with not much to gain I feel like :/

Any ideas welcome here, if the standard just left the scaling part to the VT server this all would be alot easier 😛. But they probably have good reasons to not do that I guess

@GwnDaan GwnDaan added iso: virtual terminal Related to the ISO-11783:7 standard bug Something isn't working and removed investigating Looking into this issue / need more info labels Nov 10, 2023
@GwnDaan
Copy link
Member Author

GwnDaan commented Jan 9, 2024

This one could be tricky, because objects that are children of a key object can be children of things on the data mask also

Hmm, now that I think about it... I think, to make this all easier, we can set as a condition for auto-scaling that an object cannot be a child of a key mask and data mask. Otherwise we make life way too hard for this niche occurence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iso: virtual terminal Related to the ISO-11783:7 standard
Projects
None yet
Development

No branches or pull requests

2 participants