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

[addon] show application Version as ETS #50

Merged
merged 8 commits into from
Sep 12, 2024

Conversation

olterion
Copy link
Contributor

@olterion olterion commented Sep 6, 2024

The ETS shows the version of the application as hex number with a minor version after a point. This behavior is recreated with this change.

Now it looks like:

app_version

The ETS shows the version of the application as hex number with a minor version after a point.
This behavior is recreated with this change.
@thewhobox
Copy link
Member

Im not shure if this is a good option.
The "Replaces the following Versions" is decimal (17 not 1.1).
You should at least show the decimal verstion too, or allow both (dec and ets, there is enough room for another textbox :))

Also it doesnt work on my project:
image

@thewhobox
Copy link
Member

If i enter 1 and 5 it makes 1.5?

@olterion
Copy link
Contributor Author

olterion commented Sep 6, 2024

Here I made changes to add a new field below the original version in application tab.
So the user can choose, if he wants to change the version like ETS style or XML style.

Yes, if you enter 1 and 5 it will be version 1.5
If you want to change the mayor version, you can set the cursor to the place and change it.

@thewhobox
Copy link
Member

Perfect, could you fix it so Versions lower 16 are not shown as hex :)
Then i will merge it.

If there is a version 12(dez) in ETS version field should not show "C".
Now it shows nothing, if there is a not numeric ETS version.
@olterion
Copy link
Contributor Author

Now every not numeric version is not shown in the ETS version field.
It will be blank, if the version contains a not numeric digit (as hex conversion)

@thewhobox
Copy link
Member

There are still versions that dont work.

10 - 15
25 - 31
etc...
so every version which would be x.10-15 since ToString("X") would do x.A-F

why not something like:

int major = Math.Floor(value / 16);
int minor = value % 16;
return $"{major}.{minor}"

In ETS versions from 10 to 15 (0xA...0xF) are displayed as x.10...x.15
For example version 2.13 is 45(dec) = 0x2D
@olterion
Copy link
Contributor Author

I added some code to convert the input back to int.
Now there should be no possibility to enter a wrong version number into the textfield.

@thewhobox
Copy link
Member

this works perfect :)

@thewhobox thewhobox merged commit f6c8a56 into OpenKNX:master Sep 12, 2024
1 check passed
@olterion olterion deleted the addon_version_usability branch September 12, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants