frontend: fix usage of autopilot_data instead of autopilot#3983
Conversation
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="core/frontend/src/components/vehiclesetup/configuration/ArdupilotVehicleBodySetup.vue" line_range="68" />
<code_context>
},
frame_type_parameter(): Parameter | undefined {
- switch (autopilot_data.vehicle_type) {
+ switch (autopilot.vehicle_type) {
case 'Submarine':
case 'Surface Boat':
</code_context>
<issue_to_address>
**issue (bug_risk):** Potentially inconsistent use of `autopilot` vs `autopilot_data` when switching on `vehicle_type`.
In other parts of this component, parameters come from `autopilot_data`, and this line previously used `autopilot_data.vehicle_type`. If `autopilot` and `autopilot_data` can differ, using `autopilot.vehicle_type` here might cause the frame type to no longer match the parameter source. Please confirm `autopilot.vehicle_type` is the intended authoritative value, or standardise on one of these objects for consistency.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Automated PR Review0. Summary
One-line bug fix in No further comments, nice job 👍 Generated by PR Review Bot. This is advisory, a human reviewer must still approve. |
Summary by Sourcery
Bug Fixes: