RPi-Distro / raspi-config

Configuration tool for the Raspberry Pi
Other
565 stars 207 forks source link

Update raspi-config #190

Closed KalleDK closed 2 years ago

KalleDK commented 2 years ago

Added zero and four

XECDesign commented 2 years ago

@spl237 Are those meant to map onto anything specific? Seems odd to skip pi 3 and return '3' for pi zero.

spl237 commented 2 years ago

It's an old function that has never been updated. It's probably worth updating to return the correct values for Pis 0, 3 and 4, but this patch doesn't do that! I'll have a look at it myself, so please don't accept the patch - we certainly shouldn't return 0 for a Pi 3.

KalleDK commented 2 years ago

The values was just choose as 'enum' - I came across this building ansible facts for rpi

spl237 commented 2 years ago

I've added a proper function for detecting Pi 3, and integrated that and the 0 and 4 detect functions with get_pi_type - it now returns a sensible value for all known platforms, and a -1 if it can't identify one...