AP_HAL_Linux: supporting RPI-Zero 2 W

This commit is contained in:
HefnySco 2022-01-14 02:02:13 +02:00 committed by Lucas De Marchi
parent 0475dd1e79
commit b80393b2cd
1 changed files with 7 additions and 0 deletions

View File

@ -48,6 +48,13 @@ int UtilRPI::_check_rpi_version()
return _rpi_version;
}
ret = strncmp(buffer, "Raspberry Pi Zero 2", 19);
if (ret == 0) {
_rpi_version = 2; // Raspberry PI Zero 2 W e.g. Raspberry Pi Zero 2 Rev 1.0.
printf("%s. (intern: %d)\n", buffer, _rpi_version);
return _rpi_version;
}
ret = sscanf(buffer + 12, "%d", &_rpi_version);
if (ret != EOF) {
if (_rpi_version > 3) {