Skip to content

Remove dead code and references: ffb module, OpenJVS HAT, ghost declarations, and invalid ENCODINGS macro#152

Closed
Copilot wants to merge 4 commits intomasterfrom
copilot/remove-unused-openjvs-hat-code
Closed

Remove dead code and references: ffb module, OpenJVS HAT, ghost declarations, and invalid ENCODINGS macro#152
Copilot wants to merge 4 commits intomasterfrom
copilot/remove-unused-openjvs-hat-code

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 11, 2026

Audit and removal of code that is compiled or declared but never reachable. The ENCODINGS macro was additionally invalid C syntax (array literal expression used as a macro).

Removed

  • src/ffb/ — entire module deleted. initFFB(), bindController(), closeFFB() have no call sites outside the module. Removed ffb.c, ffb.h, the CMakeLists.txt source entry, and the stale #include "ffb/ffb.h" in modernjvs.c.
  • src/jvs/io.hgetCapabilities() and getState() declared with no implementation in io.c and no call sites.
  • src/jvs/jvs.hDEVICE_ID, ENCODINGS (also syntactically invalid), STATUS_UNSUPPORTED, STATUS_OVERFLOW, REPORT_PARAMETER_ERROR2, REPORT_BUSY, and the JVS_STATUS_ERROR_UNSUPPORTED_COMMAND enum value — none referenced in any .c file.
  • src/hardware/device.hsetupGPIO() and setGPIODirection() removed from the public header; both are only ever called within device.c via internal forward-declarations.

Note: DEVICE_ID, STATUS_UNSUPPORTED, STATUS_OVERFLOW, REPORT_PARAMETER_ERROR2, REPORT_BUSY, and JVS_STATUS_ERROR_UNSUPPORTED_COMMAND were subsequently restored per author request — only ENCODINGS remains removed.

Also, OpenJVS HAT dead code, references were removed.

Hardening

Tightened the setupGPIO return-value check from !setupGPIO() to setupGPIO() != 1 to be defensive against any future return-value range changes.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: dazzaXx <48131734+dazzaXx@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove unused code related to OpenJVS HAT Remove unused OpenJVS HAT remnants from device.c and config Mar 11, 2026
Co-authored-by: dazzaXx <48131734+dazzaXx@users.noreply.github.com>
Copilot AI changed the title Remove unused OpenJVS HAT remnants from device.c and config Remove dead code throughout codebase Mar 11, 2026
@dazzaXx dazzaXx marked this pull request as ready for review March 11, 2026 22:22
Co-authored-by: dazzaXx <48131734+dazzaXx@users.noreply.github.com>
Copilot AI changed the title Remove dead code throughout codebase Remove dead code: ffb module, ghost declarations, and invalid ENCODINGS macro Mar 11, 2026
@dazzaXx dazzaXx changed the title Remove dead code: ffb module, ghost declarations, and invalid ENCODINGS macro Remove dead code and references: ffb module, OpenJVS HAT, ghost declarations, and invalid ENCODINGS macro Mar 11, 2026
@dazzaXx
Copy link
Copy Markdown
Owner

dazzaXx commented Mar 13, 2026

@copilot check if the PR branch needs updating as the master branch as changed since this PR was made.

Copilot AI requested a review from dazzaXx March 13, 2026 13:08
Copilot stopped work on behalf of dazzaXx due to an error March 13, 2026 13:08
@dazzaXx dazzaXx closed this Mar 13, 2026
@dazzaXx dazzaXx deleted the copilot/remove-unused-openjvs-hat-code branch March 13, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants