Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.readyforsky.connection.bluetooth.manager.redmond.protocol.response;
- public class Kettle171Response extends ByteResponse
- implements ResponseFactory<Kettle171Response>
- {
- public Kettle171Response()
- {
- }
- public Kettle171Response(byte paramByte, byte[] paramArrayOfByte)
- {
- super(paramByte, paramArrayOfByte);
- }
- public Kettle171Response create(byte paramByte, byte[] paramArrayOfByte)
- {
- return new Kettle171Response(paramByte, paramArrayOfByte);
- }
- public int getCurrentTemperature()
- {
- if (this.value[10] < 0)
- return 256 + this.value[10];
- return this.value[10];
- }
- public int getError()
- {
- return this.value[9];
- }
- public int getProgram()
- {
- return this.value[0];
- }
- public int getRemainingTimeAsMinutes()
- {
- return 60 * this.value[5] + this.value[6];
- }
- public int getRemainingTimeHours()
- {
- return this.value[5];
- }
- public int getRemainingTimeMinutes()
- {
- return this.value[6];
- }
- public int getSetTemperature()
- {
- return this.value[2];
- }
- public int getState()
- {
- return this.value[8];
- }
- public boolean isHeating()
- {
- return this.value[7] == 1;
- }
- public String toString()
- {
- int i = 1;
- StringBuilder localStringBuilder = new StringBuilder().append("Kettle171Response{program=").append(this.value[0]).append(", setTemperature=").append(this.value[2]).append(", remainingTimeHours=").append(this.value[5]).append(", remainingTimeMinutes=").append(this.value[6]).append(", heating=");
- if (this.value[7] == i);
- while (true)
- {
- return i + ", state=" + this.value[8] + ", error=" + this.value[9] + ", currentTemperature=" + this.value[10] + '}';
- int j = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement