-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding mcc23 #19
Adding mcc23 #19
Conversation
AlejoPm03
commented
Mar 5, 2024
- Added mcc23 new modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Type: Enhancement
PR Summary: This pull request introduces significant enhancements to the CAN ID generator and parser types, focusing on the addition of new modules and the refinement of existing ones. It includes the consolidation of similar modules, introduction of auxiliary measurement topics, and updates to module signatures and topic IDs. The changes aim to improve the modularity, extendibility, and clarity of the CAN communication system within the project.
Decision: Comment
📝 Type: 'Enhancement' - not supported yet.
- Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
📝 Complexity: the changes are too large or complex for Sourcery to approve.
- Unsupported files: the diff contains files that Sourcery does not currently support during reviews.
- Big diff: the diff is too large to approve with confidence.
General suggestions:
- Given the extensive changes, especially with the introduction of
add_multiple_modules
functionality and updates to module signatures and topic IDs, it's crucial to ensure that these modifications do not introduce regressions or affect the system's stability. Consider a thorough review of the integration points within the system to ensure compatibility. - The refactor and enhancements made to the modules and topics suggest a broader impact on the system's data handling and communication protocols. It would be beneficial to verify that these changes align with the overall system architecture and future scalability plans.
- The addition of auxiliary measurement topics and the consolidation of module definitions indicate a move towards more granular and flexible data reporting. It's important to ensure that these changes are well-documented, both in the code and in external documentation, to facilitate understanding and future development efforts.
Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨
module_mvc19_1.add_topic(topic_state) | ||
can.add_module(module_mvc19_1) | ||
module_mvc19.add_topic(topic_state) | ||
can.add_multiple_modules(module_mvc19, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): It appears that the test coverage for the newly added add_multiple_modules
function usage is missing. This function is critical for adding multiple instances of a module, and its behavior should be verified, especially in edge cases such as adding zero, one, or a negative number of modules.
module_mcc23.add_topic(topic_state) | ||
module_mcc23.add_topic(topic_measurements) | ||
module_mcc23.add_topic(topic_aux_measurements) | ||
can.add_multiple_modules(module_mcc23, 9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): The addition of module_mcc23
with 9 instances via add_multiple_modules
is significant and should be accompanied by tests to ensure that all instances are correctly added and identifiable. Please ensure there are tests covering this functionality, including validation of the signature
and description
fields for each instance.
@@ -1505,7 +761,7 @@ | |||
#### TOPIC: PUMPS | |||
topic_pumps = can.Topic( | |||
msg="pumps", | |||
id=0b11010010, | |||
id=224, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): The change in the ID for the pumps
topic from 0b11010010
to 224
should be reflected in the tests. Please add or update tests to verify that the new ID is correctly used in communications and that it does not conflict with other IDs in the system.
can.add_module(module_mcc19_3) | ||
module_mcc23.add_topic(topic_state) | ||
module_mcc23.add_topic(topic_measurements) | ||
module_mcc23.add_topic(topic_aux_measurements) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): The addition of topic_aux_measurements
to module_mcc23
introduces new data points that should be covered by tests. Ensure there are tests verifying the correct handling and reporting of output_current_l
and output_current_h
within this topic, including boundary and error conditions.
} can_mcc23_1_measurements_msg_t; | ||
|
||
// Auxiliary measurements from the converter | ||
typedef struct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): I noticed the addition of new can_mcc23_x_aux_measurements_msg_t
structs for auxiliary measurements. It's crucial to ensure that tests are added to verify the correct parsing and handling of these new message types. This includes validating the structure's fields, such as signature
, output_current
, output_current_l
, and output_current_h
, to ensure they are correctly populated from raw data. If tests for these aspects are missing, please consider adding them to cover these new code paths comprehensively.
} can_mcc23_1_measurements_msg_t; | ||
|
||
// Auxiliary measurements from the converter | ||
typedef struct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): The addition of can_mcc23_x_state_msg_t
structs introduces new state reporting capabilities. It's essential to have tests that cover the serialization and deserialization of these structs, especially focusing on the control
bitfields. Tests should verify that each bit within control
correctly represents its respective state and that no bits are inadvertently altered during processing. Please ensure such tests are in place to maintain the integrity of state reporting.
} can_mcc23_1_measurements_msg_t; | ||
|
||
// Auxiliary measurements from the converter | ||
typedef struct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (llm): The introduction of multiple can_mcc23_x_measurements_msg_t
structs for different modules suggests a significant expansion in the measurement capabilities. Comprehensive tests should be added to validate the accuracy of measurements reported by these structs, including edge cases such as maximum and minimum values. Additionally, it would be beneficial to include tests that simulate real-world scenarios to ensure the system's reliability under various conditions. If such tests are not yet part of the test suite, I recommend prioritizing their addition.
can_mcc19_5_measurements_msg_t mcc19_5_measurements; | ||
can_mcc19_6_state_msg_t mcc19_6_state; | ||
can_mcc19_6_measurements_msg_t mcc19_6_measurements; | ||
can_mcc23_1_state_msg_t mcc23_1_state; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): It appears that the pull request introduces a comprehensive update to the CAN message structures, including state, measurements, and auxiliary measurements for multiple modules. While the structural changes are clear, it's crucial to ensure that integration tests are in place to verify the end-to-end functionality of these updates. This includes testing the integration with the CAN bus, ensuring messages are correctly formatted, sent, and received, and that the system behaves as expected in response to these messages. If integration tests covering these aspects are missing, please add them to ensure the system's robustness.