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).
This commit is contained in:
dgrat 2016-06-06 16:38:51 +02:00 committed by Gustavo Jose de Sousa
parent 15a915edd3
commit 0b5ab7162d
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}