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

INGM-518 Fix symmetry check calculation #252

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [Unreleased]
### Fixed
- Feedback symmetry check calculation.

## [0.8.5] - 2024-08-27
### Fixed
- Remove SBC registers that have been removed on FW
Expand Down
4 changes: 3 additions & 1 deletion ingeniamotion/wizard_tests/feedbacks_tests/feedback_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def check_symmetry(self, positive: float, negative: float) -> ResultType:
self.logger.info("SYMMETRY CHECK")
if not isinstance(self.feedback_resolution, int):
raise TypeError("Feedbacks has to be set before symetry checking.")
error = 100 * abs(positive + negative) / self.feedback_resolution
if not isinstance(self.pair_poles, int):
raise TypeError("Pole pairs has to be set before symetry checking.")
error = (positive + negative) / (self.feedback_resolution / self.pair_poles) * 100
self.logger.info("Detected symmetry mismatch of: %.3f%%", error)
error_msg = (
"ERROR: A mismatch in resolution has been "
Expand Down