Conversation
适配上位机云台控制新指令 新增底盘小模式命令
Reviewer's GuideThis PR updates command data structures in CMD.hpp by introducing a chassis mode enum, replacing a boolean flag with this enum in the chassis command, extending the gimbal command with velocity/acceleration fields, and cleaning up an unused header include. Class diagram for updated CMD command structuresclassDiagram
class CMD {
}
class Mode {
<<enumeration>>
CMD_SAFE
CMD_RC_CTRL
CMD_KEY_MOUSE_CTRL
CMD_UART_CTRL
CMD_AUTO_CTRL
}
class ChasStat {
<<enumeration>>
NONE
BOOST
STRETCH
}
class ChassisCMD {
float x
float y
float z
ChasStat self_define
}
class GimbalCMD {
float yaw
float pit
float rol
float yaw_dot
float yaw_ddot
float pit_dot
float pit_ddot
float rol_dot
float rol_ddot
}
CMD .. Mode
CMD .. ChasStat
CMD .. ChassisCMD
CMD .. GimbalCMD
ChassisCMD --> ChasStat
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since
ChasStatusesint8_tas an underlying type, ensure the appropriate header (e.g.,<cstdint>) is included in this or a common header so the type is always available. - Replacing the
boostflag with aChasStat self_defineenum changes the layout and semantics ofChassisCMD; double-check that all callers are updated accordingly and that there is a clear mapping from previousboostbehavior to the new enum values. - The new gimbal command fields (
*_dot,*_ddot) andself_defineinChasStatare somewhat generic; consider clarifying their intended usage with more precise names or comments so future readers understand how these values should be produced and consumed.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since `ChasStat` uses `int8_t` as an underlying type, ensure the appropriate header (e.g., `<cstdint>`) is included in this or a common header so the type is always available.
- Replacing the `boost` flag with a `ChasStat self_define` enum changes the layout and semantics of `ChassisCMD`; double-check that all callers are updated accordingly and that there is a clear mapping from previous `boost` behavior to the new enum values.
- The new gimbal command fields (`*_dot`, `*_ddot`) and `self_define` in `ChasStat` are somewhat generic; consider clarifying their intended usage with more precise names or comments so future readers understand how these values should be produced and consumed.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Extend control command interfaces for chassis and gimbal modes.
New Features:
Enhancements: