mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[enocean] fix typos
Rename constants name from *RESPONE to *RESPONSE Signed-off-by: Zhivka Dimova <zhivka.dimova@myforest.net>
This commit is contained in:
parent
5c6b74b960
commit
08099f8de4
@ -48,9 +48,9 @@ public abstract class D2_01 extends _VLDMessage {
|
|||||||
|
|
||||||
protected static final byte CMD_ACTUATOR_SET_STATUS = 0x01;
|
protected static final byte CMD_ACTUATOR_SET_STATUS = 0x01;
|
||||||
protected static final byte CMD_ACTUATOR_STATUS_QUERY = 0x03;
|
protected static final byte CMD_ACTUATOR_STATUS_QUERY = 0x03;
|
||||||
protected static final byte CMD_ACTUATOR_STATUS_RESPONE = 0x04;
|
protected static final byte CMD_ACTUATOR_STATUS_RESPONSE = 0x04;
|
||||||
protected static final byte CMD_ACTUATOR_MEASUREMENT_QUERY = 0x06;
|
protected static final byte CMD_ACTUATOR_MEASUREMENT_QUERY = 0x06;
|
||||||
protected static final byte CMD_ACTUATOR_MEASUREMENT_RESPONE = 0x07;
|
protected static final byte CMD_ACTUATOR_MEASUREMENT_RESPONSE = 0x07;
|
||||||
|
|
||||||
protected static final byte ALL_CHANNELS_MASK = 0x1e;
|
protected static final byte ALL_CHANNELS_MASK = 0x1e;
|
||||||
protected static final byte CHANNEL_A_MASK = 0x00;
|
protected static final byte CHANNEL_A_MASK = 0x00;
|
||||||
@ -85,7 +85,7 @@ public abstract class D2_01 extends _VLDMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected State getSwitchingData() {
|
protected State getSwitchingData() {
|
||||||
if (getCMD() == CMD_ACTUATOR_STATUS_RESPONE) {
|
if (getCMD() == CMD_ACTUATOR_STATUS_RESPONSE) {
|
||||||
return OnOffType.from((bytes[bytes.length - 1] & OUTPUT_VALUE_MASK) != STATUS_SWITCHING_OFF);
|
return OnOffType.from((bytes[bytes.length - 1] & OUTPUT_VALUE_MASK) != STATUS_SWITCHING_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +97,8 @@ public abstract class D2_01 extends _VLDMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected State getSwitchingData(byte channel) {
|
protected State getSwitchingData(byte channel) {
|
||||||
if (getCMD() == CMD_ACTUATOR_STATUS_RESPONE && (getChannel() == channel || getChannel() == ALL_CHANNELS_MASK)) {
|
if (getCMD() == CMD_ACTUATOR_STATUS_RESPONSE
|
||||||
|
&& (getChannel() == channel || getChannel() == ALL_CHANNELS_MASK)) {
|
||||||
return OnOffType.from((bytes[bytes.length - 1] & OUTPUT_VALUE_MASK) != STATUS_SWITCHING_OFF);
|
return OnOffType.from((bytes[bytes.length - 1] & OUTPUT_VALUE_MASK) != STATUS_SWITCHING_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +127,7 @@ public abstract class D2_01 extends _VLDMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected State getDimmingData() {
|
protected State getDimmingData() {
|
||||||
if (getCMD() == CMD_ACTUATOR_STATUS_RESPONE) {
|
if (getCMD() == CMD_ACTUATOR_STATUS_RESPONSE) {
|
||||||
return new PercentType((bytes[bytes.length - 1] & OUTPUT_VALUE_MASK));
|
return new PercentType((bytes[bytes.length - 1] & OUTPUT_VALUE_MASK));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +143,7 @@ public abstract class D2_01 extends _VLDMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected State getEnergyMeasurementData() {
|
protected State getEnergyMeasurementData() {
|
||||||
if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONE) {
|
if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONSE) {
|
||||||
float factor = 1;
|
float factor = 1;
|
||||||
|
|
||||||
switch (bytes[1] >>> 5) {
|
switch (bytes[1] >>> 5) {
|
||||||
@ -169,7 +170,7 @@ public abstract class D2_01 extends _VLDMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected State getPowerMeasurementData() {
|
protected State getPowerMeasurementData() {
|
||||||
if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONE) {
|
if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONSE) {
|
||||||
float factor = 1;
|
float factor = 1;
|
||||||
|
|
||||||
switch (bytes[1] >>> 5) {
|
switch (bytes[1] >>> 5) {
|
||||||
|
@ -44,7 +44,7 @@ public class D2_05_00 extends _VLDMessage {
|
|||||||
protected static final byte CMD_ACTUATOR_SET_POSITION = 0x01;
|
protected static final byte CMD_ACTUATOR_SET_POSITION = 0x01;
|
||||||
protected static final byte CMD_ACTUATOR_STOP = 0x02;
|
protected static final byte CMD_ACTUATOR_STOP = 0x02;
|
||||||
protected static final byte CMD_ACTUATOR_POSITION_QUERY = 0x03;
|
protected static final byte CMD_ACTUATOR_POSITION_QUERY = 0x03;
|
||||||
protected static final byte CMD_ACTUATOR_POSITION_RESPONE = 0x04;
|
protected static final byte CMD_ACTUATOR_POSITION_RESPONSE = 0x04;
|
||||||
|
|
||||||
protected static final byte ALL_CHANNELS_MASK = 0x1e;
|
protected static final byte ALL_CHANNELS_MASK = 0x1e;
|
||||||
protected static final byte CHANNEL_A_MASK = 0x00;
|
protected static final byte CHANNEL_A_MASK = 0x00;
|
||||||
@ -86,7 +86,7 @@ public class D2_05_00 extends _VLDMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected State getPositionData() {
|
protected State getPositionData() {
|
||||||
if (getCMD() == CMD_ACTUATOR_POSITION_RESPONE) {
|
if (getCMD() == CMD_ACTUATOR_POSITION_RESPONSE) {
|
||||||
int position = bytes[0] & 0x7f;
|
int position = bytes[0] & 0x7f;
|
||||||
if (position != 127) {
|
if (position != 127) {
|
||||||
return new PercentType(position);
|
return new PercentType(position);
|
||||||
|
Loading…
Reference in New Issue
Block a user