Skip to content

Commit

Permalink
[tacmi] executed mvn spotless:apply to fix formatting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Niessner <[email protected]>
  • Loading branch information
marvkis committed May 24, 2020
1 parent 8279d7b commit 434d40d
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 31 deletions.
3 changes: 2 additions & 1 deletion bundles/org.openhab.binding.tacmi/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand Down
10 changes: 5 additions & 5 deletions bundles/org.openhab.binding.tacmi/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.tacmi-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>

<feature name="openhab-binding-tacmi" description="TACmi Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.tacmi/${project.version}</bundle>
</feature>
<feature name="openhab-binding-tacmi" description="TACmi Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.tacmi/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ public class TACmiBindingConstants {
public static final ThingTypeUID THING_TYPE_CMI = new ThingTypeUID(BINDING_ID, "cmi");
public static final ThingTypeUID THING_TYPE_COE_BRIDGE = new ThingTypeUID(BINDING_ID, "coe-bridge");

public static final ChannelTypeUID CHANNEL_TYPE_COE_DIGITAL_IN_UID = new ChannelTypeUID(BINDING_ID, "coe-digital-in");
public static final ChannelTypeUID CHANNEL_TYPE_COE_DIGITAL_IN_UID = new ChannelTypeUID(BINDING_ID,
"coe-digital-in");
public static final ChannelTypeUID CHANNEL_TYPE_COE_ANALOG_IN_UID = new ChannelTypeUID(BINDING_ID, "coe-analog-in");

public static final ChannelTypeUID CHANNEL_TYPE_COE_DIGITAL_OUT_UID = new ChannelTypeUID(BINDING_ID, "coe-digital-out");
public static final ChannelTypeUID CHANNEL_TYPE_COE_ANALOG_OUT_UID = new ChannelTypeUID(BINDING_ID, "coe-analog-out");
public static final ChannelTypeUID CHANNEL_TYPE_COE_DIGITAL_OUT_UID = new ChannelTypeUID(BINDING_ID,
"coe-digital-out");
public static final ChannelTypeUID CHANNEL_TYPE_COE_ANALOG_OUT_UID = new ChannelTypeUID(BINDING_ID,
"coe-analog-out");

// Channel specific configuration items
public final static String CHANNEL_CONFIG_OUTPUT = "output";

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ public boolean equals(@Nullable Object other) {
TACmiChannelConfiguration o = (TACmiChannelConfiguration) other;
return this.output == o.output;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ public boolean equals(@Nullable Object other) {
TACmiChannelConfigurationAnalog o = (TACmiChannelConfigurationAnalog) other;
return this.output == o.output && this.type == o.type;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ public void handleCoE(final Message message) {
updateState(channel.getUID(), state ? OnOffType.ON : OnOffType.OFF);
}
}

}

public void monitor() {
Expand Down Expand Up @@ -335,5 +334,4 @@ public void monitor() {
if (scu != null)
scu.persistStates(podDatas.values());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@ public boolean hasPortnumber(int portNumber) {

@Override
public void debug(Logger logger) {

}

@Override
public MessageType getType() {
return MessageType.A;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class AnalogValue {
*/
public AnalogValue(int rawValue, int type) {
measureType = TACmiMeasureType.fromInt(type);
value = ((double)rawValue) / measureType.getOffset();
value = ((double) rawValue) / measureType.getOffset();
if (measureType.equals(TACmiMeasureType.UNSUPPORTED)) {
logger.warn("Unsupported measure type {}, value is {}", type, value);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,4 @@ public void debug(Logger logger) {
public MessageType getType() {
return MessageType.D;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ public PodData(byte podId, MessageType messageType) {
this.podId = podId;
this.messageType = messageType;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
*/
@NonNullByDefault
public class PodState {

public int value;
public int measureType;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ public class StateCache {

// could be Nullable due to json.read
public @Nullable Collection<PodStates> pods;

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
import java.util.Collection;
import java.util.Iterator;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tacmi.internal.message.Message;
import org.openhab.binding.tacmi.internal.podData.PodData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
* The {@link StateCache} class defines common constants, which are used across
* the whole binding.
Expand Down Expand Up @@ -73,7 +73,7 @@ public StateCacheUtils(final File file, final Collection<@Nullable PodData> podD
@Nullable // seems quit idiotic here as null checks also generate warnings... ?
final PodState ps = spi.next();
// if (ps == null) {
// message.setValue(id, (short) 0, 0);
// message.setValue(id, (short) 0, 0);
// } else {
message.setValue(id, (short) (ps.value & 0xffff), ps.measureType);
// }
Expand Down Expand Up @@ -145,5 +145,4 @@ public void persistStates(final Collection<@Nullable PodData> data) {
logger.warn("Persistance of state file {} failed: {}", this.stateCacheFile, t.getMessage(), t);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Sample Thing Type -->
<thing-type id="cmi" extensible="coe-digital-in,coe-digital-out,coe-analog-in,coe-analog-out">
<supported-bridge-type-refs>
<bridge-type-ref id="coe-bridge" />
<bridge-type-ref id="coe-bridge"/>
</supported-bridge-type-refs>

<label>TA C.M.I. CoE Connection</label>
Expand All @@ -32,7 +32,7 @@
<item-type>Switch</item-type>
<label>Digital Input (C.M.I. -> OH)</label>
<description>A digital channel sent from C.M.I. to OpenHAB</description>
<state readOnly="true" />
<state readOnly="true"/>
<config-description>
<parameter name="output" type="integer" min="1" max="32" required="true">
<label>Output</label>
Expand All @@ -56,7 +56,7 @@
<item-type>Number</item-type>
<label>Analog Input Channel (C.M.I. -> OH)</label>
<description>A Analog Channel received from the C.M.I.</description>
<state readOnly="true" />
<state readOnly="true"/>
<config-description>
<parameter name="output" type="integer" min="1" max="32" required="true">
<label>Output</label>
Expand Down

0 comments on commit 434d40d

Please sign in to comment.