-
-
Notifications
You must be signed in to change notification settings - Fork 8
Fix ddop filename #22
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
base: develop
Are you sure you want to change the base?
Fix ddop filename #22
Conversation
When the activity is suspended (e.g. AUX-N master switch) the painting is also suspended in AgOpenGPS.
… into gunicsba/section-fixes
…üller Jobrechner ECU.
…ement. Fixed the parameter names in the help function of the console.
…onfusing that it works with 2 boolean values at the same time.
…onfusing that it works with 2 boolean values at the same time. + Fix formatting
…AOG-TaskController into gunicsba/section-fixes
…onfusing that it works with 2 boolean values at the same time.
…AOG-TaskController into gunicsba/section-fixes
The ISO Wheel and Radar speed is coming from the Tractor BUS and is provided by the Tractor ECU. The NMEA2000 speed was x10
…enGPS other than enabling Zones)
…csba/AOG-TaskController into develop # Conflicts: # src/app.cpp Bump stack version to the latest and the minor version to 1.3
…ext" ASCII character in their name. Also the extension should be .ddop not .iop
|
Run clang format |
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.
Pull request overview
This PR fixes the DDOP (Device Descriptor Object Pool) filename generation and implements several enhancements to the Task Controller functionality. The main change updates the file extension from ".iop" to ".ddop" and adds proper handling for label trimming when null or ETX (0x03) characters are present.
Key changes:
- Fixed DDOP filename extension from ".iop" to ".ddop" and improved label string handling to trim at null or ETX characters
- Added per-element work state management to properly handle section states based on master element work states
- Increased section capacity from 16 to 64 sections and added support for both modern ECU (SetpointCondensedWorkState) and fallback (ActualCondensedWorkState) communication patterns
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/task_controller.cpp | Fixed DDOP filename extension, added element work state tracking, improved section state calculation, and enhanced fallback logic for ECU compatibility |
| src/main.cpp | Updated help text to reflect correct command-line parameter names (can_adapter, can_channel) |
| src/app.cpp | Added separate TECU control function creation, improved null pointer guards for speed/NMEA interfaces, and expanded section data handling to support 64 sections |
| include/task_controller.hpp | Added new methods for per-element work state management and included data dictionary header |
| include/app.hpp | Added tecuCF member variable to store TECU control function reference |
| CMakeLists.txt | Updated version to 1.3.0 and updated isobus library dependency to newer commit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| auto labelBytes = deviceObject->get_localization_label(); | ||
| std::string label(reinterpret_cast<const char *>(labelBytes.data()), labelBytes.size()); | ||
| // trim at first occurrence of null or ETX (0x03) |
Copilot
AI
Dec 30, 2025
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.
The comment uses lowercase "ddop" but the actual file extension is ".ddop". For consistency and clarity, consider using uppercase "DDOP" in the comment to match the file extension and standard terminology.
| value |= (clients[client].get_section_setpoint_state(sectionOffset + i) << (2 * i)); | ||
| } | ||
|
|
||
| // Modern ECU? (DDI 290 SetpointCondensedWorkState1_16 exists) |
Copilot
AI
Dec 30, 2025
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.
There's an extra space in the comment between "290" and "SetpointCondensedWorkState1_16". Should be a single space for consistency.
| // Modern ECU? (DDI 290 SetpointCondensedWorkState1_16 exists) | |
| // Modern ECU? (DDI 290 SetpointCondensedWorkState1_16 exists) |
| return; | ||
| } | ||
|
|
||
| std::cout << "[TC Server] Neither condensed nor controllable-actual work state supported Missing DDI 290 and 141!" << std::endl; |
Copilot
AI
Dec 30, 2025
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.
The error message has a missing period before "Missing". Should be: "Neither condensed nor controllable-actual work state supported. Missing DDI 290 and 141!"
| std::cout << "[TC Server] Neither condensed nor controllable-actual work state supported Missing DDI 290 and 141!" << std::endl; | |
| std::cout << "[TC Server] Neither condensed nor controllable-actual work state supported. Missing DDI 290 and 141!" << std::endl; |
| sectionStates.push_back(data[6] & (1 << i)); | ||
| } | ||
| for (std::uint8_t i = 0; i < 8; i++) | ||
| for (std::uint8_t scb = 0; scb < 8; scb++) |
Copilot
AI
Dec 30, 2025
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.
There's trailing whitespace after 'scb' on this line. Consider removing it for code cleanliness.
| for (std::uint8_t scb = 0; scb < 8; scb++) | |
| for (std::uint8_t scb = 0; scb < 8; scb++) |
| sectionStates.push_back(data[6] & (1 << i)); | ||
| } | ||
| for (std::uint8_t i = 0; i < 8; i++) | ||
| for (std::uint8_t scb = 0; scb < 8; scb++) |
Copilot
AI
Dec 30, 2025
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.
The variable name 'scb' is unclear and cryptic. Consider using a more descriptive name like 'byteIndex' or 'sectionByte' to improve code readability.
| void mark_measurement_commands_sent(); | ||
| std::uint16_t get_element_number_for_ddi(isobus::DataDescriptionIndex ddi) const; | ||
| void set_element_number_for_ddi(isobus::DataDescriptionIndex ddi, std::uint16_t elementNumber); | ||
| // Element work state management these act like master / override for actual sections |
Copilot
AI
Dec 30, 2025
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.
The comment is missing proper capitalization at the start. It should be: "Element work state management: these act like master/override for actual sections" or split into a proper sentence structure.
| // Element work state management these act like master / override for actual sections | |
| // Element work state management: these act like master/override for actual sections |
Filename should be DDOP.
some implements have the Ascii 3 character meaning no more text which we should consider.