From 23d7927766b47b97cfefcb70b40a72e67fd3edb0 Mon Sep 17 00:00:00 2001 From: Frank Delporte Date: Mon, 3 Jun 2024 16:30:59 +0200 Subject: [PATCH] Avoid error message on PC --- .../java/com/pi4j/spring/boot/ContextConfiguration.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConfiguration.java b/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConfiguration.java index e26b383..f12bbe7 100644 --- a/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConfiguration.java +++ b/pi4j-spring-boot/src/main/java/com/pi4j/spring/boot/ContextConfiguration.java @@ -29,7 +29,7 @@ public class ContextConfiguration { public ContextConfiguration() { try { - if ( BoardInfoHelper.current().getBoardModel() == BoardModel.UNKNOWN) { + if (BoardInfoHelper.current().getBoardModel() == BoardModel.UNKNOWN) { this.pi4j = Pi4J.newContextBuilder() .add(new MockPlatform()) .add(MockAnalogInputProvider.newInstance(), @@ -42,9 +42,9 @@ public ContextConfiguration() { MockDigitalOutputProvider.newInstance()) .build(); } else { - this.pi4j = Pi4J.newAutoContext(); + this.pi4j = Pi4J.newAutoContext(); } - } catch (Error e) { // TODO Temporary fix for https://github.com/Pi4J/pi4j-v2/issues/354 + } catch (Error e) { logger.error("Pi4J library failed to load: {}", e.getMessage()); } }