From 53c8f9b78250a0132a474830e2d2cb988bccc072 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 31 May 2023 20:00:20 -0700 Subject: [PATCH] boardd: less spam msgs on PC (#28353) old-commit-hash: c67759c7f0d5ae977bfd71744ea50974c292b800 --- selfdrive/boardd/spi.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selfdrive/boardd/spi.cc b/selfdrive/boardd/spi.cc index fe237d5f2..e10fd744d 100644 --- a/selfdrive/boardd/spi.cc +++ b/selfdrive/boardd/spi.cc @@ -68,6 +68,10 @@ PandaSpiHandle::PandaSpiHandle(std::string serial) : PandaCommsHandle(serial) { // revs of the comma three may not support this speed uint32_t spi_speed = 50000000; + if (!util::file_exists(SPI_DEVICE)) { + goto fail; + } + spi_fd = open(SPI_DEVICE.c_str(), O_RDWR); if (spi_fd < 0) { LOGE("failed opening SPI device %d", spi_fd);