Closed KalleDK closed 2 years ago
@spl237 Are those meant to map onto anything specific? Seems odd to skip pi 3 and return '3' for pi zero.
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.
The values was just choose as 'enum' - I came across this building ansible facts for rpi
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...
Added zero and four