HAL_PX4: allow for missing SPIDevice table entries

removed panic
This commit is contained in:
Andrew Tridgell 2016-11-08 14:02:31 +11:00
parent bd84e592f8
commit 20cd165476
1 changed files with 2 additions and 1 deletions

View File

@ -176,7 +176,8 @@ SPIDeviceManager::get_device(const char *name)
}
}
if (device_table[i].name == nullptr) {
AP_HAL::panic("SPI: invalid device name: %s", name);
printf("SPI: Invalid device name: %s\n", name);
return AP_HAL::OwnPtr<AP_HAL::SPIDevice>(nullptr);
}
SPIDesc &desc = device_table[i];