open-scd
open-scd copied to clipboard
IED DAI edit wizard doesn't use the correct stepSize from the data object
Describe the bug
When editing a DAI float value (e.g. a FLOAT32) within an IED, the edit field uses a default step size of 0.1
. This is hardcoded.
https://github.com/openscd/open-scd/blob/2706f82283cc7a58a8da5ca4cb775bfec7c6b986/src/wizards/foundation/dai-field-type.ts#L129C1-L157C4
Some DAI float values have defined step sizes (and min/max limits), using the stepSize
Struct within the data object. These can be smaller than 0.1.
Here is a VRtg example from the TVTR logical node, where the stepSize
is 0.01
:
This issue restricts permitted values when editing using the IED editor.
To Reproduce Steps to reproduce the behaviour:
- Open a SCL file with an IED (refer to
7UT85_ICT_scd
) - Click on 'IED'
- Filter to IED
XAT_502_M2
, logical nodeTVTR
- Expand down to the
VRtg.setMag.f
data attribute and click the edit button. - Enter
63.51
as the Val. - The value is unable to be saved.
Expected behaviour
The value of 63.51
should be allowed. Values beyond the stepSize
should be disallowed.
Screenshots
The error message.
Desktop (please complete the following information):
- OS: Windows 11 22H2
- Browser: Google Chrome
- Version 115.0.5790.110 64-bit
Additional context
It would be good to check if stepSize
, minVal
and maxVal
DAIs exist in the data object and use these when rendering the edit field.
Hello there,
Thank you for opening this issue! We appreciate your interest in our project. However, it seems that this issue hasn't had any activity for a while. To ensure that our issue tracker remains organized and efficient, we occasionally review and address stale issues.
If you believe this issue is still relevant and requires attention, please provide any additional context, updates, or details that might help us understand the problem better. Feel free to continue the conversation here.
If the issue is no longer relevant, you can simply close it. If you're uncertain, you can always reopen it later.
Remember, our project thrives on community contributions, and your input matters. We're here to collaborate and improve. Thank you for being part of this journey!