From afcfe0857643007d542f20f1d9d4b45db44e6003 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Sun, 27 Oct 2024 10:40:34 +0100 Subject: [PATCH] fpga: Fix I2c causing an error when Dino FMC is not connected. We loose the self check, but this is not really possible if there is no Dino FMC. Signed-off-by: Niklas Eiling --- fpga/lib/ips/i2c.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fpga/lib/ips/i2c.cpp b/fpga/lib/ips/i2c.cpp index 6243f73cf..9b034d5cc 100644 --- a/fpga/lib/ips/i2c.cpp +++ b/fpga/lib/ips/i2c.cpp @@ -65,7 +65,8 @@ bool I2c::check() { if (!initDone) { throw RuntimeError("I2C not initialized"); } - return getSwitch().selfTest(); + //FIXME: There might not be a switch - then this will fail even though the I2C might be working + return 1; //getSwitch().selfTest(); } bool I2c::stop() { return reset(); }