-
Notifications
You must be signed in to change notification settings - Fork 76
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
Refactor the compu methods #306
Commits on May 23, 2024
-
now, they work as they are defined by the XSD: all parameters are set by the fields specified by the basic `CompuMethod` class, and the specific behavior of the individual categories are implemented by subclasses. This encompasses extracting the relevant data from their generic form via `__post_init__()` methods in the subclasses and doing the actual computations to translate internal values to/from physical values. This approach has the advantages that it is quite a bit cleaner than the previous code (albeit still quite messy IMO), that all compu methods can be handled using the same output writing code and -- most importantly -- that the code now reflects the specification reasonably closely now. Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Katja Köhler <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 67d2b30 - Browse repository at this point
Copy the full SHA 67d2b30View commit details -
compu methods: unify handling constants
the XSD is very redundant and messy here: it defines multiple identical groups and does not use inheritance. That said, that does not prevent it to do it better... thanks to [at]kayoub5 for the nudge! Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Katja Köhler <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cbd5a8f - Browse repository at this point
Copy the full SHA cbd5a8fView commit details -
TabIntpCompuMethod: improve docstring
Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Katja Köhler <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 53f2841 - Browse repository at this point
Copy the full SHA 53f2841View commit details -
compu methods: raise En-/DecodeError when encountering incorrect runt…
…ime data feeding incorrect data to be en-/decoded should only trigger `EncodeError` or `DecodeError`. (`OdxError` means "incorrect ODX model detected") Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Katja Köhler <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 10bc14b - Browse repository at this point
Copy the full SHA 10bc14bView commit details -
don't postfix private class functions with double underscores
these are reservered for "magic" functions and according to PEP 8 should never be newly created by user code. thanks to [at]kayoub5 for the catch! Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Katja Köhler <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 58ea631 - Browse repository at this point
Copy the full SHA 58ea631View commit details -
make the latest version of
ruff
happySigned-off-by: Andreas Lauser <[email protected]> Signed-off-by: Katja Köhler <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eea043c - Browse repository at this point
Copy the full SHA eea043cView commit details -
scale linear compu methods: improve detection of invertibility
this makes the code conform to section 7.3.6.6.4 of the spec. Note that DOPs using non-invertible SCALE-LINEAR compu methods currently cannot be encoded. Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Katja Köhler <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7cf8993 - Browse repository at this point
Copy the full SHA 7cf8993View commit details