Fix whitespace issues - no code changes

Replaced spaces with tabs for indentation and removed some unnecessary
white space.
This commit is contained in:
Tom Manley
2016-01-18 10:42:42 -06:00
parent 553b45a3f3
commit e51a38eb28
3 changed files with 371 additions and 382 deletions

View File

@@ -317,7 +317,6 @@ def getTemperature(value) {
if (rawValue == 255) {} if (rawValue == 255) {}
else { else {
if (volts > 3.5) { if (volts > 3.5) {
result.descriptionText = "${linkText} battery has too much power (${volts} volts)." result.descriptionText = "${linkText} battery has too much power (${volts} volts)."
} }
@@ -327,7 +326,8 @@ def getTemperature(value) {
def pct = (volts - minVolts) / (maxVolts - minVolts) def pct = (volts - minVolts) / (maxVolts - minVolts)
result.value = Math.min(100, (int) pct * 100) result.value = Math.min(100, (int) pct * 100)
result.descriptionText = "${linkText} battery was ${result.value}%" result.descriptionText = "${linkText} battery was ${result.value}%"
}} }
}
return result return result
} }
@@ -377,10 +377,8 @@ def getTemperature(value) {
def refreshCmds = [] def refreshCmds = []
if (device.getDataValue("manufacturer") == "SmartThings") { if (device.getDataValue("manufacturer") == "SmartThings") {
log.debug "Refreshing Values for manufacturer: SmartThings " log.debug "Refreshing Values for manufacturer: SmartThings "
refreshCmds = refreshCmds + [ refreshCmds = refreshCmds + [
/* These values of Motion Threshold Multiplier(01) and Motion Threshold (7602) /* These values of Motion Threshold Multiplier(01) and Motion Threshold (7602)
seem to be giving pretty accurate results for the XYZ co-ordinates for this manufacturer. seem to be giving pretty accurate results for the XYZ co-ordinates for this manufacturer.
Separating these out in a separate if-else because I do not want to touch Centralite part Separating these out in a separate if-else because I do not want to touch Centralite part
@@ -394,13 +392,9 @@ def getTemperature(value) {
"zcl mfg-code ${manufacturerCode}", "delay 200", "zcl mfg-code ${manufacturerCode}", "delay 200",
"zcl global write 0xFC02 2 0x21 {7602}", "delay 200", "zcl global write 0xFC02 2 0x21 {7602}", "delay 200",
"send 0x${device.deviceNetworkId} 1 1", "delay 400", "send 0x${device.deviceNetworkId} 1 1", "delay 400",
] ]
} else { } else {
refreshCmds = refreshCmds + [ refreshCmds = refreshCmds + [
/* sensitivity - default value (8) */ /* sensitivity - default value (8) */
"zcl mfg-code ${manufacturerCode}", "delay 200", "zcl mfg-code ${manufacturerCode}", "delay 200",
"zcl global write 0xFC02 0 0x20 {02}", "delay 200", "zcl global write 0xFC02 0 0x20 {02}", "delay 200",
@@ -422,12 +416,10 @@ def getTemperature(value) {
} }
def configure() { def configure() {
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui) String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
log.debug "Configuring Reporting" log.debug "Configuring Reporting"
def configCmds = [ def configCmds = [
"zcl global write 0x500 0x10 0xf0 {${zigbeeEui}}", "delay 200", "zcl global write 0x500 0x10 0xf0 {${zigbeeEui}}", "delay 200",
"send 0x${device.deviceNetworkId} 1 ${endpointId}", "delay 500", "send 0x${device.deviceNetworkId} 1 ${endpointId}", "delay 500",
@@ -455,7 +447,6 @@ def getTemperature(value) {
"zcl mfg-code ${manufacturerCode}", "zcl mfg-code ${manufacturerCode}",
"zcl global send-me-a-report 0xFC02 0x0014 0x29 1 3600 {01}", "zcl global send-me-a-report 0xFC02 0x0014 0x29 1 3600 {01}",
"send 0x${device.deviceNetworkId} 1 ${endpointId}", "delay 500" "send 0x${device.deviceNetworkId} 1 ${endpointId}", "delay 500"
] ]
return configCmds + refresh() return configCmds + refresh()
@@ -582,5 +573,3 @@ private byte[] reverseArray(byte[] array) {
} }
return array return array
} }