Browse Source

AP_HAL_Linux: supporting RPI-Zero 2 W

gps-1.3.1
HefnySco 3 years ago committed by Lucas De Marchi
parent
commit
b80393b2cd
  1. 7
      libraries/AP_HAL_Linux/Util_RPI.cpp

7
libraries/AP_HAL_Linux/Util_RPI.cpp

@ -48,6 +48,13 @@ int UtilRPI::_check_rpi_version() @@ -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) {

Loading…
Cancel
Save