-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert code from java version to kotlin (wip)
- Loading branch information
Showing
116 changed files
with
4,662 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...klanglicht/model/dmx/DMXInterfaceDummy.kt → ...klanglicht/model/dmx/DmxInterfaceDummy.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../klanglicht/model/dmx/DMXInterfaceRest.kt → .../klanglicht/model/dmx/DmxInterfaceRest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../klanglicht/model/dmx/DMXInterfaceType.kt → .../klanglicht/model/dmx/DmxInterfaceType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...glicht-core/src/main/kotlin/de/visualdigits/kotlin/klanglicht/model/parameter/Fadeable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
package de.visualdigits.kotlin.klanglicht.model.parameter | ||
|
||
interface Fadeable<T : Fadeable<T>> { | ||
|
||
/** | ||
|
9 changes: 9 additions & 0 deletions
9
...ht-core/src/main/kotlin/de/visualdigits/kotlin/klanglicht/model/preferences/ColorState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package de.visualdigits.kotlin.klanglicht.model.preferences | ||
|
||
|
||
class ColorState( | ||
var hexColor: String? = null, | ||
var gain: Float? = null, | ||
var on: Boolean = false | ||
) | ||
|
9 changes: 6 additions & 3 deletions
9
klanglicht-core/src/main/kotlin/de/visualdigits/kotlin/klanglicht/model/preferences/Dmx.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
package de.visualdigits.kotlin.klanglicht.model.preferences | ||
|
||
import de.visualdigits.kotlin.klanglicht.model.dmx.DMXInterfaceType | ||
import de.visualdigits.kotlin.klanglicht.model.dmx.DmxInterfaceType | ||
|
||
|
||
data class Dmx( | ||
val port: String = "", | ||
val interfaceType: DMXInterfaceType = DMXInterfaceType.Dummy, | ||
val interfaceType: DmxInterfaceType = DmxInterfaceType.Dummy, | ||
val frameTime: Long = 40L, | ||
val devices: List<DmxDevice> = listOf() | ||
) | ||
) { | ||
|
||
val dmxDevices: Map<String, DmxDevice> = devices.associateBy { it.baseChannel.toString() } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
klanglicht-core/src/test/resources/.klanglicht/preferences/preferences_livingroom_dummy.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"name" : "wohnzimmer", | ||
|
||
"services": [ | ||
{ | ||
"name": "lmair", | ||
"manufacturer" : "JB-Media", | ||
"model" : "Light-Manager Air", | ||
"url": "http://192.168.178.28" | ||
}, | ||
{ | ||
"name": "receiver", | ||
"manufacturer" : "Yamaha", | ||
"model" : "RX-V6A", | ||
"url": "http://192.168.178.46" | ||
} | ||
], | ||
|
||
"shelly": { | ||
"devices": [ | ||
{ | ||
"name": "Starwars", | ||
"model": "shelly-rgbw", | ||
"ipAddress": "192.168.178.54", | ||
"gain": 30 | ||
}, | ||
{ | ||
"name": "Rgbw", | ||
"model": "shelly-rgbw", | ||
"ipAddress": "192.168.178.48", | ||
"gain": 1 | ||
}, | ||
{ | ||
"name": "Bar", | ||
"model": "shelly-rgbw", | ||
"ipAddress": "192.168.178.55", | ||
"gain": 20 | ||
}, | ||
{ | ||
"name": "Flur", | ||
"model": "shelly-1", | ||
"ipAddress": "192.168.178.38", | ||
"gain": 0 | ||
}, | ||
{ | ||
"name": "Schlafzimmer", | ||
"model": "shelly-1", | ||
"ipAddress": "192.168.178.40", | ||
"gain": 0 | ||
}, | ||
{ | ||
"name": "Wohnzimmer", | ||
"model": "shelly-2.5", | ||
"ipAddress": "192.168.178.37", | ||
"gain": 0 | ||
}, | ||
{ | ||
"name": "Kristall", | ||
"model": "plug-s", | ||
"ipAddress": "192.168.178.51", | ||
"gain": 0 | ||
}, | ||
{ | ||
"name": "Regal", | ||
"model": "shelly-plug-s", | ||
"ipAddress": "192.168.178.39", | ||
"gain": 0 | ||
} | ||
] | ||
}, | ||
|
||
"dmx": { | ||
"port": "COM8", | ||
"interfaceType": "Dummy", | ||
"frameTime": 40, | ||
"devices" : [ { | ||
"manufacturer" : "Cameo", | ||
"model" : "Flat PAR Can RGB 10 IR", | ||
"mode" : "6-Channel Mode", | ||
"baseChannel" : 1, | ||
"gain": 0.5 | ||
}, { | ||
"manufacturer" : "Cameo", | ||
"model" : "Flat PAR Can RGBW", | ||
"mode" : "8-Channel Mode", | ||
"baseChannel" : 7, | ||
"gain": 1.0 | ||
}, { | ||
"manufacturer" : "Cameo", | ||
"model" : "Flat PAR Can RGB 10 IR", | ||
"mode" : "6-Channel Mode", | ||
"baseChannel" : 15, | ||
"gain": 0.5 | ||
}, { | ||
"manufacturer" : "Cameo", | ||
"model" : "Flat PAR Can RGBW", | ||
"mode" : "8-Channel Mode", | ||
"baseChannel" : 21, | ||
"gain": 1.0 | ||
}, { | ||
"manufacturer" : "Cameo", | ||
"model" : "Flat PAR Can RGB 10 IR", | ||
"mode" : "6-Channel Mode", | ||
"baseChannel" : 29, | ||
"gain": 0.5 | ||
} ] | ||
} | ||
} |
Oops, something went wrong.