| | |
| | | "echo out > /sys/class/gpio/gpio12/direction ", |
| | | "echo 0 > /sys/class/gpio/gpio12/value " |
| | | ); |
| | | System.out.println(commandResult); |
| | | System1.out.println(commandResult); |
| | | } |
| | | { |
| | | CommandResult commandResult = Shell.SU.run("cd /sys/class/gpio/", |
| | |
| | | "echo out > /sys/class/gpio/gpio157/direction ", |
| | | "echo 1 > /sys/class/gpio/gpio157/value " |
| | | ); |
| | | System.out.println(commandResult); |
| | | System1.out.println(commandResult); |
| | | } |
| | | // System.out.println("RelayServerUtil2.run 开门"); |
| | | // System1.out.println("RelayServerUtil2.run 开门"); |
| | | } |
| | | } |
| | | if (System.currentTimeMillis() - lastOpenDoorThread > BaseSettingManager.getOpenDoorDurationSeconds() * 1000) { |
| | |
| | | "echo 0 > /sys/class/gpio/gpio157/value " |
| | | ); |
| | | } |
| | | // System.out.println("RelayServerUtil2.run 关门"); |
| | | // System1.out.println("RelayServerUtil2.run 关门"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | synchronized (openDoorThreadQueue) { |
| | | openDoorThreadQueue.add(System.currentTimeMillis() + ""); |
| | | } |
| | | // System.out.println("RelayServerUtil2.open"); |
| | | // System1.out.println("RelayServerUtil2.open"); |
| | | // IOUtil.initIOUtil().openUNLOCK(); |
| | | return true; |
| | | // } else { |
| | |
| | | // String ret = ""; |
| | | // while ((len = inputStream.read(buff)) != -1) { |
| | | // ret = new String(buff, "UTF-8"); |
| | | // System.out.println(ret); |
| | | // System1.out.println(ret); |
| | | // Log.e("test111", ret); |
| | | // break; |
| | | // } |
| | |
| | | // outputStream.flush(); |
| | | // while ((len = inputStream.read(buff)) != -1) { |
| | | // ret = new String(buff, "ISO8859-1"); |
| | | //// System.out.println(ret); |
| | | //// System1.out.println(ret); |
| | | // Log.e("test222", ret); |
| | | // break; |
| | | // } |
| | | // } catch (Exception e) { |
| | | //// e.printStackTrace(); |
| | | //// System.out.println("RelayServerUtil2.open " + e.getMessage()); |
| | | //// System1.out.println("RelayServerUtil2.open " + e.getMessage()); |
| | | // } finally { |
| | | // try { |
| | | // if (outputStream != null) { |