Dev#10
Merged
Merged
Conversation
added 2 commits
April 24, 2026 02:31
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the Referee launcher telemetry pack to carry richer data structures and adjusts the GitHub Actions build to use C++20, aligning runtime data publishing and CI with the new launcher data model and language standard. Sequence diagram for publishing updated LauncherPack telemetrysequenceDiagram
participant Referee
participant RefereeData as data_
participant LauncherPack as lp_
participant LauncherTopic as launcherpack_topic_
participant Subscriber
Referee->>RefereeData: read robot_status
Referee->>RefereeData: read robot_buff
Referee->>RefereeData: read launcher_data
Referee->>RefereeData: read dart_client
Referee->>LauncherPack: lp_.rs = data_.robot_status
Referee->>LauncherPack: lp_.rb = data_.robot_buff
Referee->>LauncherPack: lp_.ld = data_.launcher_data
Referee->>LauncherPack: lp_.dc = data_.dart_client
Referee->>LauncherTopic: Publish(lp_)
LauncherTopic-->>Subscriber: deliver LauncherPack with rs, rb, ld, dc
Class diagram for updated Referee LauncherPack data modelclassDiagram
class Referee {
- LauncherPack lp_
- ChassisPack cp_
- StatusPack sp_
- RefereeData data_
- Topic~LauncherPack~ launcherpack_topic_
- Topic~ChassisPack~ chassispack_topic_
- Topic~StatusPack~ statuspack_topic_
}
class LauncherPack {
RobotStatus rs
RobotBuff rb
LauncherData ld
DartClient dc
}
class RefereeData {
RobotStatus robot_status
PowerHeat power_heat
RobotBuff robot_buff
LauncherData launcher_data
DartClient dart_client
}
class RobotStatus {
+ uint16_t shooter_cooling_value
+ uint16_t shooter_heat_limit
+ uint16_t chassis_pwr_buff
..other_fields..
}
class RobotBuff {
+ int cooling_boost
+ int power_boost
..other_fields..
}
class LauncherData {
+ float launcher_id1_17_rate
+ float launcher_id2_17_rate
..other_fields..
}
class DartClient {
+ bool dart_launcher_available
+ uint8_t dart_count
..other_fields..
}
class PowerHeat {
+ uint16_t chassis_pwr_buff
+ uint16_t launcher_id1_17_heat
..other_fields..
}
class ChassisPack {
RobotStatus rs
uint16_t power_buffer
}
class StatusPack {
RobotStatus rs
GameStatus gs
}
class GameStatus {
..fields..
}
class Topic~T~ {
+ void Publish(T message)
}
Referee --> LauncherPack : uses
Referee --> RefereeData : reads
RefereeData --> RobotStatus
RefereeData --> RobotBuff
RefereeData --> LauncherData
RefereeData --> DartClient
RefereeData --> PowerHeat
LauncherPack --> RobotStatus
LauncherPack --> RobotBuff
LauncherPack --> LauncherData
LauncherPack --> DartClient
ChassisPack --> RobotStatus
StatusPack --> RobotStatus
StatusPack --> GameStatus
Referee --> Topic~LauncherPack~
Referee --> Topic~ChassisPack~
Referee --> Topic~StatusPack~
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
LauncherPackis[[gnu::packed]]and now embeds additional structs (RobotBuff,LauncherData,DartClient), double-check that these types are trivially copyable/POD and safe to pack to avoid undefined behavior or misaligned accesses. - The new
LauncherPacklayout replaces the old heat-only fields; make sure any code that serializes/deserializes or otherwise assumes the previous field order/size of this struct is updated to match the new schema. - After switching the workflow test project to
CMAKE_CXX_STANDARD 20, consider also specifyingtarget_compile_features(xr_test PUBLIC cxx_std_20)in the generated CMakeLists to align with modern CMake practice and avoid relying solely on the global standard variable.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since `LauncherPack` is `[[gnu::packed]]` and now embeds additional structs (`RobotBuff`, `LauncherData`, `DartClient`), double-check that these types are trivially copyable/POD and safe to pack to avoid undefined behavior or misaligned accesses.
- The new `LauncherPack` layout replaces the old heat-only fields; make sure any code that serializes/deserializes or otherwise assumes the previous field order/size of this struct is updated to match the new schema.
- After switching the workflow test project to `CMAKE_CXX_STANDARD 20`, consider also specifying `target_compile_features(xr_test PUBLIC cxx_std_20)` in the generated CMakeLists to align with modern CMake practice and avoid relying solely on the global standard variable.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.
更新launcher pack,适配cpp20
Summary by Sourcery
Adapt referee launcher data structures and CI build configuration for C++20 support.
New Features:
Bug Fixes:
Enhancements:
Build: