Skip to content

Commit

Permalink
Delete unused private methods.
Browse files Browse the repository at this point in the history
Fixes openhab#11167

Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur committed Aug 27, 2021
1 parent 541308d commit af91f4a
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ private boolean getBoolean(byte[] operation, byte[] register) throws IOException
return communicationController.sendRobustRequest(operation, register)[0] != 0;
}

private void setSetting(byte[] register, boolean value) throws IOException {
setSetting(register, value ? (byte) 1 : (byte) 0);
}

private short getWord(byte[] operation, byte[] register) throws IOException {
byte[] resultBytes = communicationController.sendRobustRequest(operation, register);
return (short) ((resultBytes[0] << 8) | (resultBytes[1] & 0xFF));
Expand All @@ -87,14 +83,6 @@ private void set(byte[] operation, byte[] register, byte value) throws IOExcepti
communicationController.sendRobustRequest(operation, register, valueArray);
}

private void set(byte[] operation, byte[] register, short value) throws IOException {
communicationController.sendRobustRequest(operation, register, shortToBytes(value));
}

private byte[] shortToBytes(short s) {
return new byte[] { (byte) ((s & 0xFF00) >> 8), (byte) (s & 0x00FF) };
}

private short getShort(byte[] operation, byte[] register) throws IOException {
byte[] result = communicationController.sendRobustRequest(operation, register);
return (short) ((result[0] << 8) + (result[1] & 0xff));
Expand Down Expand Up @@ -141,14 +129,6 @@ private static float asPercentByte(byte b) {
return f * 100 / 255;
}

private void setSetting(byte[] register, short value) throws IOException {
byte[] valueArray = new byte[2];
valueArray[0] = (byte) (value >> 8);
valueArray[1] = (byte) value;

communicationController.sendRobustRequest(REGISTER_1_WRITE, register, valueArray);
}

public String getUnitName() throws IOException {
return getString(REGISTER_1_READ, UNIT_NAME);
}
Expand Down

0 comments on commit af91f4a

Please sign in to comment.