Added one more compatibility step
This commit is contained in:
parent
7edd7f1bbb
commit
e4a0fbb48e
@ -5,6 +5,7 @@ import org.warp.picalculator.gui.DisplayManager;
|
|||||||
import org.warp.picalculator.gui.screens.LoadingScreen;
|
import org.warp.picalculator.gui.screens.LoadingScreen;
|
||||||
import org.warp.picalculator.gui.screens.Screen;
|
import org.warp.picalculator.gui.screens.Screen;
|
||||||
|
|
||||||
|
import com.pi4j.system.SystemInfo.BoardType;
|
||||||
import com.pi4j.wiringpi.Gpio;
|
import com.pi4j.wiringpi.Gpio;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
@ -37,7 +38,8 @@ public class Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void beforeStart() {
|
public void beforeStart() {
|
||||||
if (Utils.isRunningOnRaspberry() && !Utils.isInArray("-noraspi", args)) {
|
boolean isRaspi = false; try {isRaspi = com.pi4j.system.SystemInfo.getBoardType() != BoardType.UNKNOWN;} catch (Exception e) {}
|
||||||
|
if (Utils.isRunningOnRaspberry() && !Utils.isInArray("-noraspi", args) && isRaspi) {
|
||||||
Gpio.wiringPiSetupPhys();
|
Gpio.wiringPiSetupPhys();
|
||||||
Gpio.pinMode(12, Gpio.PWM_OUTPUT);
|
Gpio.pinMode(12, Gpio.PWM_OUTPUT);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user