Added one more compatibility step

This commit is contained in:
Andrea Cavalli 2017-05-01 22:00:04 +02:00
parent 7edd7f1bbb
commit e4a0fbb48e

View File

@ -5,6 +5,7 @@ import org.warp.picalculator.gui.DisplayManager;
import org.warp.picalculator.gui.screens.LoadingScreen;
import org.warp.picalculator.gui.screens.Screen;
import com.pi4j.system.SystemInfo.BoardType;
import com.pi4j.wiringpi.Gpio;
public class Main {
@ -37,7 +38,8 @@ public class Main {
}
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.pinMode(12, Gpio.PWM_OUTPUT);
} else {