You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/documentation/board-info.md
+47-1Lines changed: 47 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,4 +99,50 @@ console.println("Throttled states description: " + BoardInfoHelper.getBoardReadi
99
99
[main] INFO com.pi4j.util.Console - - UNDERVOLTAGE_DETECTED
100
100
[main] INFO com.pi4j.util.Console - - SOFT_TEMPERATURE_LIMIT_ACTIVE
101
101
[main] INFO com.pi4j.util.Console - Throttled states description: Under-voltage detected, Soft temperature limit active
102
-
```
102
+
```
103
+
104
+
## Overriding the Detected Board
105
+
106
+
In case the detected board is wrong or unknown, you can override it since V3.0.1 with the following method. Make sure to do this before the Pi4J context is initialized, so the correct plugins are loaded.
Two generic boards where created for this use-case, but of course, you can also use one of the other [BoardModel](https://github.com/Pi4J/pi4j/blob/develop/pi4j-core/src/main/java/com/pi4j/boardinfo/definition/BoardModel.java) enum values.
122
+
123
+
```java
124
+
// Generic model, this can be used to force the library
125
+
// to load Raspberry Pi plugins on other board types
126
+
GENERIC("Generic board compatible with Raspberry Pi 4", SINGLE_BOARD_COMPUTER,
127
+
newArrayList<>(),
128
+
PiModel.MODEL_B,
129
+
HeaderVersion.TYPE_3,
130
+
LocalDate.now(),
131
+
Soc.UNKNOWN,
132
+
Cpu.UNKNOWN, 4,
133
+
newArrayList<>(),
134
+
newArrayList<>()),
135
+
GENERIC_RP1("Generic board compatible with Raspberry Pi 5", SINGLE_BOARD_COMPUTER,
0 commit comments