From 08099f8de46b3b0cbaaea0d46fca741eada2e17b Mon Sep 17 00:00:00 2001 From: Zhivka Dimova Date: Thu, 19 Sep 2024 15:07:15 +0200 Subject: [PATCH] [enocean] fix typos Rename constants name from *RESPONE to *RESPONSE Signed-off-by: Zhivka Dimova --- .../binding/enocean/internal/eep/D2_01/D2_01.java | 15 ++++++++------- .../enocean/internal/eep/D2_05/D2_05_00.java | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_01/D2_01.java b/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_01/D2_01.java index 3c0e3dfa86d..a52b1ec7d29 100644 --- a/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_01/D2_01.java +++ b/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_01/D2_01.java @@ -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_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_RESPONE = 0x07; + protected static final byte CMD_ACTUATOR_MEASUREMENT_RESPONSE = 0x07; protected static final byte ALL_CHANNELS_MASK = 0x1e; protected static final byte CHANNEL_A_MASK = 0x00; @@ -85,7 +85,7 @@ public abstract class D2_01 extends _VLDMessage { } 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); } @@ -97,7 +97,8 @@ public abstract class D2_01 extends _VLDMessage { } 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); } @@ -126,7 +127,7 @@ public abstract class D2_01 extends _VLDMessage { } 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)); } @@ -142,7 +143,7 @@ public abstract class D2_01 extends _VLDMessage { } protected State getEnergyMeasurementData() { - if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONE) { + if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONSE) { float factor = 1; switch (bytes[1] >>> 5) { @@ -169,7 +170,7 @@ public abstract class D2_01 extends _VLDMessage { } protected State getPowerMeasurementData() { - if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONE) { + if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONSE) { float factor = 1; switch (bytes[1] >>> 5) { diff --git a/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_05/D2_05_00.java b/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_05/D2_05_00.java index 5253357b523..edc0d110dc5 100644 --- a/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_05/D2_05_00.java +++ b/bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_05/D2_05_00.java @@ -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_STOP = 0x02; 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 CHANNEL_A_MASK = 0x00; @@ -86,7 +86,7 @@ public class D2_05_00 extends _VLDMessage { } protected State getPositionData() { - if (getCMD() == CMD_ACTUATOR_POSITION_RESPONE) { + if (getCMD() == CMD_ACTUATOR_POSITION_RESPONSE) { int position = bytes[0] & 0x7f; if (position != 127) { return new PercentType(position);