Browse Source

AP_HAL_Linux: Changes in RPi version detection

If the RPi version detection fails, the standard version is now RPi2/3 instead of RPi1.
I think this is useful, because the RPi1 is not really supported (performance reasons).
mission-4.1.18
dgrat 9 years ago committed by Gustavo Jose de Sousa
parent
commit
0b5ab7162d
  1. 8
      libraries/AP_HAL_Linux/Util_RPI.cpp

8
libraries/AP_HAL_Linux/Util_RPI.cpp

@ -33,15 +33,15 @@ int UtilRPI::_check_rpi_version() @@ -33,15 +33,15 @@ int UtilRPI::_check_rpi_version()
hw = Util::from(hal.util)->get_hw_arm32();
if (hw == UTIL_HARDWARE_RPI2) {
printf("Raspberry Pi 2 with BCM2709!\n");
printf("Raspberry Pi 2/3 with BCM2709!\n");
_rpi_version = 2;
} else if (hw == UTIL_HARDWARE_RPI1) {
printf("Raspberry Pi 1 with BCM2708!\n");
_rpi_version = 1;
} else {
/* defaults to 1 */
fprintf(stderr, "Could not detect RPi version, defaulting to 1\n");
_rpi_version = 1;
/* defaults to RPi version 2/3 */
fprintf(stderr, "Could not detect RPi version, defaulting to 2/3\n");
_rpi_version = 2;
}
return _rpi_version;
}

Loading…
Cancel
Save