Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ static int detect_superpix_sensor(sensor_ctx_t *ctx, int fd,
return true;
// Omnivision-SuperPix OV2735
case 0x2735:
sprintf(ctx->sensor_id, "OV%04x", res);
strcpy(ctx->sensor_id, "SP2305");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Misleading ov2735 comment 🐞 Bug ⚙ Maintainability

In detect_superpix_sensor(), the 0x2735 case now sets ctx->sensor_id to "SP2305" while the adjacent
comment still references "OV2735", leaving the code’s documentation inconsistent with its behavior.
This can mislead maintainers about what sensor/model is actually being reported for that register
value.
Agent Prompt
### Issue description
The SuperPix detection switch case for `0x2735` now returns the model string `"SP2305"`, but the nearby comment still says `OV2735`, which is inconsistent and confusing for future maintenance.

### Issue Context
This PR changed the model string for `case 0x2735:` from `OV%04x` to a literal `SP2305`, but did not update the comment explaining the case.

### Fix Focus Areas
- src/sensors.c[907-910]

### Suggested fix
Update the comment to accurately describe why `0x2735` maps to `SP2305` (e.g., note that SP2305 reports an OV2735-compatible ID), or adjust the mapping/code so the comment and returned model name are consistent.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

return true;
case 0x4308:
sprintf(ctx->sensor_id, "OS04B10");
Expand Down