Skip to content

[backport/1.4] fix: detect Raspberry Pi Compute Module 4/5 in get_cpu_type() - #4077

Draft
joaoantoniocardoso wants to merge 3 commits into
bluerobotics:1.4-devfrom
joaoantoniocardoso:backports/1.4/detect-cm4-cm5-cpu-type
Draft

[backport/1.4] fix: detect Raspberry Pi Compute Module 4/5 in get_cpu_type()#4077
joaoantoniocardoso wants to merge 3 commits into
bluerobotics:1.4-devfrom
joaoantoniocardoso:backports/1.4/detect-cm4-cm5-cpu-type

Conversation

@joaoantoniocardoso

Copy link
Copy Markdown
Member

This is a backport of #4011 into 1.4.

BrageGZP and others added 2 commits August 3, 2026 23:08
get_cpu_type() greps /proc/cpuinfo for the literal strings
"Raspberry Pi 4" / "Raspberry Pi 5", but Compute Modules report
themselves as "Raspberry Pi Compute Module 4/5", so CM4/CM5 returned
CpuType.Other and Navigator detection never ran. Accept the Compute
Module model strings as PI4/PI5 and add a regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Importing general.py in the new test_general.py pulled general.py and
commands.py into the coverage measurement for the first time, dropping
total coverage below the 75% gate (72.43% in CI). Cover the remaining
general.py helpers (host OS detection, file deletion, lsof-based open
checks, local identifiers, device id) to clear the gate.


Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joaoantoniocardoso joaoantoniocardoso added the merge-after-stable Should be merged only after next stable release label Aug 4, 2026
1.4's delete_everything has no ignore= kwarg, and file_is_open helpers
differ from master. Drop/adjust those cases so pylint and pytest pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-after-stable Should be merged only after next stable release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants